Commit 3a75a6f7 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Merge branch 'master' of...

Merge branch 'master' of gitlab.switch.ch:memoriav/memobase-2020/services/import-process/import-process-cli
parents 706f2841 094dc2af
......@@ -112,9 +112,9 @@ physical:
access: accessPhysical
usage:
name:
const: "Copyright Not Evaluated (CNE)"
const: "In Copyright - Educational Use Permitted (InC-EDU)"
sameAs:
const: "http://rightsstatements.org/vocab/CNE/1.0/"
const: "http://rightsstatements.org/vocab/InC-EDU/1.0/"
digital:
......
......@@ -46,13 +46,36 @@
</xsl:template>
<!-- content of typeLabel is transformed to an element name and content of child node is copied to it-->
<xsl:template match="description[@typeLabel] | alternativeTitle[@typeLabel] | subject[@typeLabel] | relation[@typeLabel]">
<xsl:template match="alternativeTitle[@typeLabel] | subject[@typeLabel] | relation[@typeLabel]">
<xsl:variable name="typeLabel" select="@typeLabel"/>
<xsl:element name="{$typeLabel}">
<xsl:value-of select="child::*"/>
</xsl:element>
</xsl:template>
<xsl:template match="description[@typeLabel]">
<xsl:variable name="typeLabel" select="@typeLabel"/>
<xsl:choose>
<xsl:when test="$typeLabel = 'Remarks'">
<xsl:if test="matches(., '&lt;br&gt; &lt;br&gt; ')">
<xsl:element name="{$typeLabel}">
<xsl:value-of select="substring-after(child::*, '&lt;br&gt; &lt;br&gt; ')"/>
</xsl:element>
</xsl:if>
</xsl:when>
<xsl:when test="$typeLabel = 'Context'">
<xsl:element name="{$typeLabel}">
<xsl:value-of select="replace(replace(replace(child::*, 'https://memobase.ch/#document/SFW_CJS_CGS-', 'bar-001-'), 'https://memobase.ch/#find/extended\[bcast-title\]|https://memobase.ch/de#find/extended\[bcast-title\]', '../search?field[0][0][term]'), '&amp;order=4', '&amp;field[0][0][type]=all_titles&amp;field[0][op]=AND&amp;sort=id_asc')"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{$typeLabel}">
<xsl:value-of select="child::*"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- content of typeLabel is copied as content of the node -->
<xsl:template match="format/medium | format/dataFormat/captioningFormat | type/genre">
<xsl:element name="{local-name()}">
......@@ -90,8 +113,26 @@
<xsl:template match="identifier">
<xsl:variable name="typeLabel" select="@typeLabel"/>
<xsl:variable name="idprefix" select="substring(preceding::identifier[@typeLabel='Original']/ns2:identifier, 1, 3)"/>
<xsl:element name="identifier{$typeLabel}">
<xsl:value-of select="child::ns2:identifier"/>
<xsl:choose>
<xsl:when test="$typeLabel = 'CallNumber'">
<xsl:choose>
<xsl:when test="$idprefix = 'SFW'">
<xsl:value-of select="concat('Schweizerisches Bundesarchiv: ', child::ns2:identifier)"/>
</xsl:when>
<xsl:when test="$idprefix = 'CJS'">
<xsl:value-of select="concat('Archives fédérales suisses : ', child::ns2:identifier)"/>
</xsl:when>
<xsl:when test="$idprefix = 'CGS'">
<xsl:value-of select="concat('Archivio federale svizzero: ', child::ns2:identifier)"/>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="child::ns2:identifier"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template>
......@@ -209,10 +250,10 @@
<xsl:text>public</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
<xsl:text>In Copyright - Educational Use Permitted (InC-EDU)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
<xsl:text>http://rightsstatements.org/vocab/InC-EDU/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'private')">
......@@ -220,10 +261,10 @@
<xsl:text>private</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
<xsl:text>In Copyright - Educational Use Permitted (InC-EDU)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
<xsl:text>http://rightsstatements.org/vocab/InC-EDU/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'faro')">
......@@ -231,10 +272,10 @@
<xsl:text>faro</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
<xsl:text>In Copyright - Educational Use Permitted (InC-EDU)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
<xsl:text>http://rightsstatements.org/vocab/InC-EDU/1.0/</xsl:text>
</xsl:element>
</xsl:if>
</xsl:otherwise>
......@@ -248,8 +289,19 @@
</xsl:template>
<xsl:template match="rights[@typeLabel='Usage']/ns2:rights">
<xsl:variable name="idprefix" select="substring(preceding::identifier[@typeLabel='Original']/ns2:identifier, 1, 3)"/>
<xsl:element name="rightsUsage">
<xsl:value-of select="."/>
<xsl:choose>
<xsl:when test="$idprefix = 'SFW'">
<xsl:text>Die Nutzungsrechte können von den oben erwähnten Rechteinhabern vergeben werden. &lt;br&gt; &lt;br&gt; Cinémathèque suisse (wahlweise vollständige Ausgaben, Beiträge oder Ausschnitte nach Wunsch): &lt;br&gt; &lt;a href=&quot;https://www.cinematheque.ch/d/service/kontakt/ausschnitt-aus-dem-bildarchiv-bestellen/&quot; target=&quot;_blank&quot;&gt;https://www.cinematheque.ch/d/service/kontakt/ausschnitt-aus-dem-bildarchiv-bestellen/&lt;/a&gt; &lt;br&gt; &lt;br&gt; Schweizerisches Bundesarchiv: &lt;br&gt; Der Eintrag im Feld &quot;Link zur Originalbeschreibung&quot; unter &quot;Zugang&quot; führt direkt auf die Recherche- und Bestellfunktion des Online-Zugangs zum Bundesarchiv.</xsl:text>
</xsl:when>
<xsl:when test="$idprefix = 'CJS'">
<xsl:text>Les droits d’utilisation peuvent être affectés par les ayants droits ci-dessus.&lt;br&gt; &lt;br&gt; Cinémathèque suisse (éditions complètes, numéros ou extraits au choix) : &lt;br&gt; &lt;a href=&quot;https://www.cinematheque.ch/f/infos-pratiques/contacts/demander-des-extraits-du-cine-journal-suisse/&quot; target=&quot;_blank&quot;&gt;https://www.cinematheque.ch/f/infos-pratiques/contacts/demander-des-extraits-du-cine-journal-suisse/&lt;/a&gt; &lt;br&gt; &lt;br&gt; Archives fédérales suisses : &lt;br&gt; L'entrée dans le champ &quot;Lien vers la description originale&quot; sous &quot;Accès&quot; mène directement à la fonction de recherche et de commande de l'accès en ligne aux Archives fédérales.</xsl:text>
</xsl:when>
<xsl:when test="$idprefix = 'CGS'">
<xsl:text>I diritti di utilizzo possono essere assegnati dai titolari dei diritti di cui sopra. &lt;br&gt; &lt;br&gt; Cinémathèque suisse (opzionale edizione completa, contributi o ritagli, secondo scelta): &lt;br&gt; &lt;a href=&quot;https://www.cinematheque.ch/f/infos-pratiques/contacts/demander-des-extraits-du-cine-journal-suisse/&quot; target=&quot;_blank&quot;&gt;https://www.cinematheque.ch/f/infos-pratiques/contacts/demander-des-extraits-du-cine-journal-suisse/&lt;/a&gt; &lt;br&gt; &lt;br&gt; Archivio federale svizzero: &lt;br&gt; La voce nel campo &quot;Link alla descrizione originale&quot; sotto &quot;Accesso&quot; porta direttamente alla funzione di ricerca e ordine dell'accesso online all'Archivio federale.</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:element>
</xsl:template>
......
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