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 titles #53

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

sbJson 2.0 titles #53

stansmith907 opened this issue Mar 4, 2017 · 2 comments

Comments

@stansmith907
Copy link
Contributor

stansmith907 commented Mar 4, 2017

Mapping of sbJson titles to mdTranslator internal data structure:

  • reader complete
  • writer complete
{
    "title":"Item Title"
}

Definition: (none)

  • Map to resource citation title: [schema][metadata][resourceInfo][citation].title
    view mdTools

{
   "subTitle":"Item Subtitle"
}

Definition: A subtitle may be an explanatory or alternate title that provides additional information about the item. The subtitle may clarify the theme of the item, enhancing the title.

  • Map to resource citation title: [schema][metadata][resourceInfo][citation][alternateTitle][0]
    view mdTools

{
   "alternateTitles": [
      "Alternate Titles",
      "Alternate Titles 2",
      "Alternate Titles 3"
   ]
}

Definition: (none)

  • Map to resource citation title: [schema][metadata][resourceInfo][citation][alternateTitle][n]
    view MdTools

Mapping to mdTranslator

   def newBase
      intObj = {
         metadata: {
            resourceInfo: {
               citation: {
                  title: 'Item Title',
                  alternateTitles: [
                     'Item Subtitle',
                     'Alternate Titles',
                     'Alternate Titles 2',
                     'Alternate Titles 3'
                  ]
               }
            }
         }
      }
   end

Translation to mdJson

{
   "metadata": {
      "resourceInfo": {
         "citation": {
            "title": "Item Title",
            "alternateTitle": [
               "Item Subtitle",
               "Alternate Titles",
               "Alternate Titles 2",
               "Alternate Titles 3"
            ]
         }
      }
   }
}
@stansmith907
Copy link
Contributor Author

If there is a subtitle in sbJson the reader will map it to 'alternateTitles[0]'. However, if there is no subTitle, alternateTitles will begin filling in 'alternateTitles' beginning at position [0]. Thus there is no way to guarantee subTitle is actually a sub title when writing sbJson from the translator. Is this a problem?

@stansmith907
Copy link
Contributor Author

Decided to output the subtitles and alternate titles into alternate titles.

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