Skip to content

Commit

Permalink
fix crossref BTE configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kstamatis authored and zuki committed Nov 28, 2013
1 parent 9e4fe86 commit 970a5f8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
Expand Up @@ -59,7 +59,7 @@ public static Record convertCrossRefDomToRecord(Element dataRoot)
String itemType = doi != null ? XMLUtils.getElementAttribute(dataRoot,
"doi", "type") : "unspecified";
if (itemType != null)
record.addValue("itemType", new StringValue(itemType));
record.addValue("doiType", new StringValue(itemType));

List<Element> identifier = XMLUtils.getElementList(dataRoot, "issn");
for (Element ident : identifier)
Expand All @@ -69,24 +69,38 @@ public static Record convertCrossRefDomToRecord(Element dataRoot)
{
String issn = ident.getTextContent().trim();
if (issn != null)
record.addValue("issn", new StringValue(issn));
record.addValue("printISSN", new StringValue(issn));
}
else
{
String eissn = ident.getTextContent().trim();
if (eissn != null)
record.addValue("eissn", new StringValue(eissn));
record.addValue("electronicISSN", new StringValue(eissn));
}
}

List<Element> identifierisbn = XMLUtils.getElementList(dataRoot, "isbn");
for (Element ident : identifierisbn)
{
if ("print".equalsIgnoreCase(ident.getAttribute("type"))
|| StringUtils.isNotBlank(ident.getAttribute("type")))
{
String issn = ident.getTextContent().trim();
if (issn != null)
record.addValue("printISBN", new StringValue(issn));
}
else
{
String eissn = ident.getTextContent().trim();
if (eissn != null)
record.addValue("electronicISBN", new StringValue(eissn));
}
}

String isbn = XMLUtils.getElementValue(dataRoot, "isbn");
if (isbn != null)
record.addValue("isbn", new StringValue(isbn));

String editionNumber = XMLUtils.getElementValue(dataRoot,
"editionNumber");
if (editionNumber != null)
record.addValue("volume", new StringValue(editionNumber));
record.addValue("editionNumber", new StringValue(editionNumber));

String volume = XMLUtils.getElementValue(dataRoot, "volume");
if (volume != null)
Expand Down
17 changes: 15 additions & 2 deletions dspace/config/spring/api/bte.xml
Expand Up @@ -413,14 +413,27 @@
<entry key="journalTitle" value="journal" />
<entry key="doi" value="doi" />
<entry key="authors" value="authors" />
<entry key="issn" value="jissn" />
<entry key="eissn" value="jeissn" />
<entry key="printISSN" value="jissn" />
<entry key="electronicISSN" value="jeissn" />
<entry key="year" value="issued" />
<entry key="articleTitle" value="title" />
<entry key="volume" value="volume" />
<entry key="issue" value="issue" />
<entry key="firstPage" value="firstpage" />
<entry key="lastPage" value="lastpage" />
<entry key="printISBN" value="pisbn" />
<entry key="electronicISBN" value="eisbn" />
<entry key="editionNumber" value="editionnumber" />
<entry key="seriesTitle" value="seriestitle" />
<entry key="volumeTitle" value="volumetitle" />
<entry key="editors" value="editors" />
<entry key="translators" value="translators" />
<entry key="chairs" value="chairs" />
<entry key="doyType" value="subtype" />
<!-- Not used -->
<!--
<entry key="publicationType" value="" />
-->
</map>
</constructor-arg>
</bean>
Expand Down

0 comments on commit 970a5f8

Please sign in to comment.