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 browseCategories #67

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

sbJson 2.0 browseCategories #67

stansmith907 opened this issue Mar 8, 2017 · 2 comments

Comments

@stansmith907
Copy link
Contributor

stansmith907 commented Mar 8, 2017

Mapping of sbJson browseCategories to mdTranslator internal data structure:

  • reader complete
  • writer complete
{
   "browseCategories": [
      "Data",
      "Publication",
      "Project",
      "Physical Item"
   ]
}

Definition: A type of tag that defines the category of an item. These are mostly set internally by ScienceBase.

Mapping...

  • browseCategories: The tag value.
    Map to: [schema][metadata][resourceInfo][resourceTypes][n].type
    view mdTools

Mapping to mdTranslator

   def newBase
      intObj = {
         metadata: {
            resourceInfo: {
               resourceTypes: [
                  {
                     type: 'Data',
                     name: ''
                  },
                  {
                     type: 'Publication'
                  },
                  {
                     type: 'Project'
                  },
                  {
                     type: 'Physical Item'
                  },
               ]
            }
         }
      }
   end

Translation to mdJson

{
   "metadata": {
      "resourceInfo": {
         "resourceType": [
            {
               "type": "Data"
            },
            {
               "type": "Publication"
            },
            {
               "type": "Project"
            },
            {
               "type": "Physical Item"
            }
         ]
      }
   }
}
@stansmith907
Copy link
Contributor Author

stansmith907 commented Mar 8, 2017

In mdTranslator and mdJson resourceType < type is an ISO code selected from MD_ScopeCode. The browseCategories in the above example are included in MD_ScopeCode as well except for"Physical Item", but there may be appropriate substitutes in MD_ScopeCode. I'm not sure how browseCategories are used so can't really suggest using the ISO codes instead.

@stansmith907
Copy link
Contributor Author

stansmith907 commented Mar 31, 2017

The ScienceBase is an enumerated list, cannot be extended.
Not all ScienceBase items have a browseCategory.

Writing:

  • always write 'data' tag
  • if project write 'project'
  • others if they map to non-ambiguous tags
  • may 'physicalItem' to our code list
  • write all mdJson 'resourceTypes' to tags (see sbJson 2.0 tags #69)

Reading:

  • map the ones that are non-ambiguous tags
  • if blank set as 'dataset'

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