Commit 2f496ece by Steinberg, Jan

changed wzb to new econstor api, added logger for filter

parent 0cd4b259
......@@ -134,7 +134,7 @@ public class FeedingContextFactory {
log.info("using Aseas2SsoarBundleFilter");
result = new Aseas2SsoarBundleFilter();
break;
case "http://www.econstor.eu/dspace-oai/request$$ssoar":
case "https://www.econstor.eu/oai/request$$ssoar":
log.info("using Wzb2SsoarBundleFilter");
result = new Wzb2SsoarBundleFilter();
break;
......
......@@ -24,7 +24,7 @@ public class Wzb2SsoarBundleFilter implements BundleFilter {
Metadatum yearIssued = metadata.stream().filter( m -> m.getKey().equals("dc.date.issued") ).findFirst().orElse(null);
if (null != yearIssued) {
String yearIssuedValueString = yearIssued.getValue();
LOG.debug("year issued: {}", yearIssuedValueString);
try {
int yearIssuedValue = Integer.parseInt(yearIssuedValueString);
......
......@@ -1185,7 +1185,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
getResourceAsStream("xslt/wzb-oai_dc-2-xmlbundle.xslt"), StandardCharsets.UTF_8);
map.put("oai_dc", oaiDcXsltString);
XsltTransformerOaiPmhBundlesStreamSource bss = new XsltTransformerOaiPmhBundlesStreamSource("http://www.econstor.eu/dspace-oai/request", map);
XsltTransformerOaiPmhBundlesStreamSource bss = new XsltTransformerOaiPmhBundlesStreamSource("https://www.econstor.eu/oai/request", map);
Bundle bundle = bss.getBundle("oai:econstor.eu:10419/43900");
......
......@@ -34,7 +34,10 @@
<xsl:template match="/">
<xsl:element name="bundle">
<xsl:element name="metadata">
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc" />
<!-- Only datasets of the 'Alle Publikationen von Forscherinnen und Forschern des WZB' set -->
<xsl:if test="/oai:OAI-PMH/oai:GetRecord/oai:record/oai:header/oai:setSpec/text() = 'hdl_10419_48639'">
<xsl:apply-templates select="oai:OAI-PMH/oai:GetRecord/oai:record/oai:metadata/oai_dc:dc" />
</xsl:if>
</xsl:element>
</xsl:element>
</xsl:template>
......@@ -570,6 +573,13 @@
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'monograph'"/>
</xsl:call-template>
<xsl:if test="contains(., 'report')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.type.document'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'12'"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</xsl:when>
<xsl:otherwise>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment