Commit dc9c7467 authored by Steinberg, Jan's avatar Steinberg, Jan

smaller changes to ARL sources: corporateeditor & publisher

parent eb51ba0f
......@@ -167,6 +167,8 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.author", "Kohring, Jarrit") ) );
assertEquals( 2 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.author") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.editor", "Scholich, Dietmar") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "1129") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.contributor.corporateeditor") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.contributor.institution", "ARL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.review", "1") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review") ).count() );
......@@ -203,7 +205,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "kleinräumige Konzentrationsprozesse") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Wohnstandortentscheidungen") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Small and medium-sized towns") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL - Akademie für Raumforschung und Landesplanung") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.publisher") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.city", "Hannover") ) );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.wgl.collection", "true") ) );
......@@ -252,6 +254,8 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.editor", "Göb, Angelina") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.editor", "Thimm, Insa") ) );
assertEquals( 8 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.editor") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "1129") ) );
assertEquals( 1 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.corporateeditor") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.contributor.institution", "ARL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.review", "1") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review") ).count() );
......@@ -288,7 +292,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Agenten des Wandels") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Change Agents") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "civic energy cooperatives") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL - Akademie für Raumforschung und Landesplanung") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.publisher") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.city", "Hannover") ) );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.wgl.collection", "true") ) );
......@@ -322,7 +326,8 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.editor", "Steinführer, Annett") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.editor", "Sondermann, Martin") ) );
assertEquals( 3 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.editor") ).count() );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "381") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "1129") ) );
assertEquals( 1 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.corporateeditor") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.contributor.institution", "ARL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.review", "1") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review") ).count() );
......@@ -357,7 +362,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Entwicklung ländlicher Räume") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Stadtforschung") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Raumforschung") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL - Akademie für Raumforschung und Landesplanung") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.city", "Hannover") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.publisher") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.wgl.collection", "true") ) );
......@@ -392,7 +397,8 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.editor", "Hilti, Nicola") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.editor", "Tippel, Cornelia") ) );
assertEquals( 4 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.editor") ).count() );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "381") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "1129") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.contributor.corporateeditor") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.contributor.institution", "ARL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.review", "1") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review") ).count() );
......@@ -427,7 +433,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Mobilität") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Räumliche Entwicklung") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Multilocality") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL - Akademie für Raumentwicklung in der Leibniz-Gemeinschaft") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.city", "Hannover") ) );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.wgl.collection", "true") ) );
......@@ -440,7 +446,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
metadata2.stream().map(Object::toString).forEach(LOG::info);
assertTrue( metadata2.contains( new SimpleMetadatum("dc.type.stock", "collection") ) );
assertTrue( metadata2.contains( new SimpleMetadatum("dc.type.document", "24") ) );
assertTrue( metadata2.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "Akademie für Raumforschung und Landesplanung") ) );
assertTrue( metadata2.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "1129") ) );
}
@Test
......@@ -469,7 +475,8 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.author", "Löwer, Markus") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.author", "Wiellowicz, Kathrin") ) );
assertEquals( 12 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.author") ).count() );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "381") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "1129") ) );
assertEquals( 1 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.corporateeditor") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.contributor.institution", "ARL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.review", "1") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review") ).count() );
......@@ -504,7 +511,8 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Zentrenentwicklung") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Zentrentransformation") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.subject.other", "Nutzungen") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL - Akademie für Raumentwicklung in der Leibniz-Gemeinschaft") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher", "Verlag der ARL") ) );
assertEquals( 1 , metadata.stream().filter(m -> m.getKey().equals("dc.publisher") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.city", "Hannover") ) );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.wgl.collection", "true") ) );
......@@ -2361,7 +2369,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.author", "Siegrist, Dominik") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.author", "Weixlbaumer, Norbert") ) );
assertEquals( 4 , metadata.stream().filter(m -> m.getKey().equals("dc.contributor.author") ).count() );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "381") ) );
// assertTrue( metadata.contains( new SimpleMetadatum("dc.contributor.corporateeditor", "1129") ) );
// assertTrue( metadata.contains( new SimpleMetadatum("ssoar.contributor.institution", "WZB") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.description.review", "1") ) );
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.description.review") ).count() );
......
......@@ -936,17 +936,23 @@
<xsl:with-param name="value" select="'ARL'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'1129'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.review'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'1'"/>
</xsl:call-template>
<!-- xsl:call-template name="new-metadatum">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Verlag der ARL'"/>
</xsl:call-template -->
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'internal.status'"/>
......@@ -1262,32 +1268,14 @@
<xsl:template match="dc:publisher" mode="ARLArbArt">
<xsl:if test="not(//dc:type/text() = 'doc-type:article')">
<xsl:choose>
<xsl:when test="contains(text(),'Wissenschaftszentrum Berlin')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'381'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Berlin'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains(text(), ': ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="substring-before(text(), ': ')"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(text(), ': '))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:choose>
</xsl:if>
</xsl:template>
......@@ -1370,17 +1358,23 @@
<xsl:with-param name="value" select="'ARL'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'1129'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.review'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'1'"/>
</xsl:call-template>
<!-- xsl:call-template name="new-metadatum">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Verlag der ARL'"/>
</xsl:call-template -->
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'internal.status'"/>
......@@ -1696,30 +1690,12 @@
<xsl:template match="dc:publisher" mode="ARLForArt">
<xsl:if test="not(//dc:type/text() = 'doc-type:article')">
<xsl:choose>
<xsl:when test="contains(text(),'Wissenschaftszentrum Berlin')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'381'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Berlin'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains(text(), ': ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="substring-before(text(), ': ')"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(text(), ': '))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:if>
......@@ -1787,6 +1763,12 @@
<xsl:with-param name="value" select="'DEU'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Verlag der ARL'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'ssoar.urn.registration'"/>
<xsl:with-param name="language" select="''"/>
......@@ -2035,32 +2017,19 @@
<xsl:template match="dc:publisher" mode="ARLArbMono">
<xsl:if test="not(//dc:type/text() = 'doc-type:article')">
<xsl:choose>
<xsl:when test="contains(text(),'Wissenschaftszentrum Berlin')">
<xsl:call-template name="new-metadatum">
<xsl:when test="contains(text(), ': ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'381'"/>
<xsl:with-param name="value" select="'1129'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Berlin'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains(text(), ': ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="substring-before(text(), ': ')"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(text(), ': '))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:choose>
</xsl:if>
</xsl:template>
......@@ -2142,6 +2111,18 @@
<xsl:with-param name="value" select="'ARL'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'1129'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Verlag der ARL'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.review'"/>
<xsl:with-param name="language" select="''"/>
......@@ -2217,11 +2198,7 @@
<xsl:template match="dc:creator" mode="ARLForMono">
<xsl:choose>
<xsl:when test="contains(text(),'Akademie für Raumforschung und Landesplanung')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="text()"/>
</xsl:call-template>
<!-- DO nothing! It is in anyway. -->
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="new-metadatum">
......@@ -2342,32 +2319,14 @@
<xsl:template match="dc:publisher" mode="ARLForMono">
<xsl:if test="not(//dc:type/text() = 'doc-type:article')">
<xsl:choose>
<xsl:when test="contains(text(),'Wissenschaftszentrum Berlin')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'381'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Berlin'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains(text(), ': ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="substring-before(text(), ': ')"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(text(), ': '))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:choose>
</xsl:if>
</xsl:template>
......@@ -2434,6 +2393,12 @@
<xsl:with-param name="value" select="'DEU'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Verlag der ARL'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'ssoar.urn.registration'"/>
<xsl:with-param name="language" select="''"/>
......@@ -2452,6 +2417,12 @@
<xsl:with-param name="value" select="'ARL'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'1129'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.description.review'"/>
<xsl:with-param name="language" select="''"/>
......@@ -2723,30 +2694,12 @@
<xsl:template match="dc:publisher" mode="arlpos">
<xsl:if test="not(//dc:type/text() = 'doc-type:article')">
<xsl:choose>
<xsl:when test="contains(text(),'Wissenschaftszentrum Berlin')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.contributor.corporateeditor'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'381'"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="'Berlin'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains(text(), ': ')">
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher.city'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="substring-before(text(), ': ')"/>
</xsl:call-template>
<xsl:call-template name="new-metadatum">
<xsl:with-param name="key" select="'dc.publisher'"/>
<xsl:with-param name="language" select="''"/>
<xsl:with-param name="value" select="normalize-space(substring-after(text(), ': '))"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:if>
......
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