Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbJson 2.0 provenance #61

Closed
2 tasks done
stansmith907 opened this issue Mar 5, 2017 · 7 comments
Closed
2 tasks done

sbJson 2.0 provenance #61

stansmith907 opened this issue Mar 5, 2017 · 7 comments

Comments

@stansmith907
Copy link
Contributor

stansmith907 commented Mar 5, 2017

Mapping of sbJson provenance to mdTranslator internal data structure:

  • reader complete
  • writer complete
"provenance":
{
    "annotation":"Provenance1",
    "dataSouce":"Input directly",
    "dateCreated":"2015-11-09T19:02:45Z",
    "lastUpdated":"2015-11-09T19:02:45Z",
    "lastUpdatedBy":"[email protected]",
    "createdBy":"[email protected]",
    "fileProcess": "???",
    "linkProcess": "???"
}

Definition...

  • dataSource: Who/what created the metadata record

Set to 'generated using ADIwg mdTranslator 2.0.0'

  • dateCreated: The date and time the item was created.

Map to metadata metadataInfo metadataDate:
[schema][metadata][metadataInfo][metadataDate][n].date
view mdTools
[schema][metadata][metadataInfo][metadataDate][n].dateType
view mdTools

  • lastUpdated: The date and time the item was last updated.
    Map to metadata metadataInfo metadataDate:
    [schema][metadata][metadataInfo][metadataDate][n].date
    view mdTools
    [schema][metadata][metadataInfo][metadataDate][n].dateType
    view mdTools

  • createdBy: The person or organization who created the item.
    Reading sbJson: ignore
    Writing sbJson:
    [schema][metadata][metadataInfo][metadatacontact][n].role when in list
    [ originator author resourceProvider coAuthor ]. All [party][contactId] > [contact][n][name] will be concatenated.
    view mdTools

  • lastUpdatedBy: The last person or organization to update the item.
    Reading sbJson: ignore
    Writing sbJson:
    [schema][metadata][metadataInfo][metadatacontact][n].role when in list
    [ custodian ]. All [party][contactId] > [contact][n][name] will be concatenated.
    view mdTools

  • Not Mapped:

    • annotation
    • fileProcess
    • linkProcess

Mapping to mdTranslator from sbJson

def newBase
   {
      metadata: {
         metadataInfo: {
            metadataIdentifier: {},
            parentMetadata: {},
            defaultMetadataLocale: {},
            otherMetadataLocales: [],
            metadataContacts: [],
            metadataDates: [
               {
                  date: '2015-11-09T19:02:45Z',
                  dateResolution: 'YMDhmsZ',
                  dateType: 'creation',
                  description: nil
               },
               {
                  date: '2015-11-09T19:02:45Z',
                  dateResolution: 'YMDhmsZ',
                  dateType: 'lastUpdate',
                  description: nil
               }
            ],
            metadataLinkages: [],
            metadataMaintenance: {},
            alternateMetadataReferences: [],
            metadataStatus: nil,
            extensions: []
         }
      }
   }
end
@stansmith907
Copy link
Contributor Author

The createdBy and lastUpdatedBy roles are converted to ISO standard roles 'originator' and 'editor' in 'responsibleParty' respectively. The ScienceBase names for these roles are preserved in 'contact[n].contactType' providing an additional means of linking.

@jlblcc
Copy link
Member

jlblcc commented Mar 6, 2017

I think the provenance object is referring to the ScienceBase item record, not the resource (all the sbJSON examples I've seen indicate this). Therefore the lineage mapping wouldn't apply. The dateCreated and lastUpdated properties could be mapped to metadata > metadataInfo > metadataDate.

@stansmith907
Copy link
Contributor Author

Well, then that was a big waste of time. I guess I need to stop thinking of sbJson as metadata about the resource - item.

@jlblcc
Copy link
Member

jlblcc commented Mar 6, 2017

Sorry. The definition in the docs is confusing. It indicates that it is akin to lineage, but I've never seen it used that way.

sbJSON is about the resource - some of it anyway. It's not super clear what's what from just looking at the raw JSON though.

@stansmith907
Copy link
Contributor Author

I guess we should try and get some clarification from Lei Ann.

@stansmith907
Copy link
Contributor Author

stansmith907 commented Mar 23, 2017

These are about the metadata more than the record.

Capture the creationDate, updateDate,
dateSource = 'generated using ADIwg mdTranslator 2.0.0'
createdBy = use metadataContact, email > name > organization
annotation field is editable so don't use it.

ignore other fields

@stansmith907
Copy link
Contributor Author

stansmith907 commented May 22, 2017

When writing sbJson createdBy will be written from [metadataInfo][metadataContact][party][n] when [roleName] = one of [ originator author resourceProvider coAuthor ] in that order and sbJson lastUpdatedBy will be written from [metadataInfo][metadataContact][party][n] when [roleName] = [ custodian ].

When reading sbJson createdBy and lastUpdatedBy will be ignored since there is not enough or even consistent information to create a contact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants