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

add itemKeys to MODS #1930

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

rettinghaus
Copy link

This PR adds a recordInfo to every Item on MODS export, containing the itemKey.
Proposed here: https://forums.zotero.org/discussion/76884

@annplaksin
Copy link

Thanks for adding the itemKeys to MODS.
This is very helpful!

Copy link
Contributor

@zuphilip zuphilip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this code? Two of the three lines are already in the code and the middle line should maybe moved to a better place. Moreover, you have to update the lastUpdate date at the beginning as well. Anyway, we should also discuss the PR in general.

MODS.js Outdated Show resolved Hide resolved
MODS.js Outdated Show resolved Hide resolved
@zuphilip zuphilip added the Improvements Pull requests that are improving existing translators label Jun 15, 2019
@zuphilip
Copy link
Contributor

Some considerations and things we should discuss:

  1. Can you give an example MODS data produced by this modified translator?
  2. Is it okay to save the URI in this field as well? (I haven't seen an example like that.)
  3. What about the source attribute? According to the documentation If <recordIdentifier> is used, the DLF/Aquifer guidelines recommend the use of the source attribute if possible.
  4. Should we consider this for importing as well? Most of our test cases have also a recordIdentifier field which could be imported as itemKey.

CC @adam3smith

@rettinghaus
Copy link
Author

Example:

<?xml version="1.0" encoding="UTF-8"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
  <mods>
    <titleInfo>
      <title>Das Orgelbüchlein des Mattseer Stiftsorganisten Johann Anton Graf aus dem Jahre 1738</title>
    </titleInfo>
    <titleInfo type="abbreviated">
      <title>Hintermaier 2002</title>
    </titleInfo>
    <typeOfResource>text</typeOfResource>
    <genre authority="local">journalArticle</genre>
    <name type="personal">
      <namePart type="family">Hintermaier</namePart>
      <namePart type="given">Ernst</namePart>
      <role>
        <roleTerm type="code" authority="marcrelator">aut</roleTerm>
      </role>
    </name>
    <recordInfo>
      <recordIdentifier>http://zotero.org/groups/2240469/items/2BQHJDF8</recordIdentifier>
    </recordInfo>
    <relatedItem type="host">
      <genre authority="marcgt">journal</genre>
      <part>
        <extent unit="pages">
          <start>84</start>
          <end>99</end>
        </extent>
      </part>
      <originInfo>
        <dateIssued>2002</dateIssued>
        <issuance>continuing</issuance>
      </originInfo>
      <titleInfo>
        <title>Bach - in Salzburg : Festschrift zum 25-jährigen Bestehen der Salzburger Bachgesellschaft ; eine Dokumentation des Symposions zum Bach-Jahr 2000 in Salzburg nach einer Idee von Albert F. Hartinger und Siegfried Mauser mit ergänzenden Beiträgen</title>
      </titleInfo>
    </relatedItem>
  </mods>
  <mods>
    <titleInfo>
      <title>Das Plauener Orgelbuch von 1708</title>
    </titleInfo>
    <typeOfResource>text</typeOfResource>
    <genre authority="local">journalArticle</genre>
    <name type="personal">
      <namePart type="family">Seiffert</namePart>
      <namePart type="given">Max</namePart>
      <role>
        <roleTerm type="code" authority="marcrelator">aut</roleTerm>
      </role>
    </name>
    <identifier type="doi">10.2307/929596</identifier>
    <location>
      <url usage="primary display" dateLastAccessed="2019-03-01 11:12:19">https://www.jstor.org/stable/929596</url>
    </location>
    <recordInfo>
      <recordIdentifier>http://zotero.org/groups/2240469/items/CJ8I7FRF</recordIdentifier>
      <recordContentSource>JSTOR</recordContentSource>
    </recordInfo>
    <relatedItem type="host">
      <genre authority="marcgt">journal</genre>
      <part>
        <detail type="volume">
          <number>2</number>
        </detail>
        <detail type="issue">
          <number>3</number>
        </detail>
        <extent unit="pages">
          <start>371</start>
          <end>393</end>
        </extent>
      </part>
      <originInfo>
        <dateIssued>1920</dateIssued>
        <issuance>continuing</issuance>
      </originInfo>
      <identifier type="issn">0003-9292</identifier>
      <titleInfo>
        <title>Archiv für Musikwissenschaft</title>
      </titleInfo>
    </relatedItem>
  </mods>
</modsCollection>

@rettinghaus
Copy link
Author

Thanks for the comments.
Originally I thought to put the URI into the <identifier>, but Zotero already puts in there the DOI/URI of the item. I'm not sure it's ok to mix the URI of the record with the URI of the item, so I put it in the <recordIdentifier>.

Others put the the record ID into recordIdenifier and the URI (which contains the ID) into <identifer>, e.g.:
http://kalliope.staatsbibliothek-berlin.de/en/standards/sru.html
http://kalliope-verbund.info/sru?version=1.2&operation=searchRetrieve&query=ead.id=DE-611-HS-1839379&recordSchema=mods

Any better idea where to store it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvements Pull requests that are improving existing translators
Development

Successfully merging this pull request may close these issues.

3 participants