Commit a2e0a15d 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 0bc6aff6 c50bb0ee
......@@ -23,7 +23,7 @@ record:
- content: language
- caption: captioningFormat
subject:
- prefLabel: Keywords
- prefLabel: subject
genre:
- prefLabel: genre
placeOfCapture:
......
......@@ -39,7 +39,7 @@
</xsl:template>
<!-- content of child node is copied to parent node -->
<xsl:template match="title | format/essenceLocator | format/duration | format/start | language | references | coverage/spatial/location">
<xsl:template match="title | format/essenceLocator | format/duration | format/start | language | references | coverage/spatial/location | subject[not(@typeLabel)]">
<xsl:element name="{local-name()}">
<xsl:value-of select="child::*"/>
</xsl:element>
......
......@@ -24,6 +24,7 @@ record:
- caption: captioningFormat
subject:
- prefLabel: Keywords
- prefLabel: subject
genre:
- prefLabel: genre
placeOfCapture:
......
......@@ -39,7 +39,7 @@
</xsl:template>
<!-- content of child node is copied to parent node -->
<xsl:template match="title | format/essenceLocator | format/duration | format/start | language | references | coverage/spatial/location">
<xsl:template match="title | format/essenceLocator | format/duration | format/start | language | references | coverage/spatial/location | subject[not(@typeLabel)]">
<xsl:element name="{local-name()}">
<xsl:value-of select="child::*"/>
</xsl:element>
......
......@@ -2,9 +2,6 @@ splitEntity:
- type: skos:Concept
property: skos:prefLabel
delimiter: ";"
- type: rico:Person
property: rico:name
delimiter: ";"
- type: rico:CorporateBody
property: rico:name
delimiter: ";"
......@@ -12,10 +9,6 @@ splitEntity:
property: rico:name
delimiter: ";"
normalizePerson:
splitEntity:
type: rico:Person
property: rico:name
delimiter: ";"
creationRelationName: # only tries to extract a value if a DUMMY-VALUE rico:name is property is present in the relation.
pattern: "\\((?<relation>.+)\\)" # " are necessary to ensure pattern is parsed correctly. Pattern needs to be double escaped!
language: NONE
......
......@@ -48,9 +48,30 @@
<!-- 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:variable name="typeLabel" select="@typeLabel"/>
<xsl:element name="{$typeLabel}">
<xsl:value-of select="child::*"/>
</xsl:element>
<xsl:choose>
<xsl:when test="$typeLabel = 'FeaturedIndividual'">
<xsl:analyze-string select ="replace(child::*, ' ; ', 'x;x')" regex = ";\s">
<xsl:matching-substring/>
<xsl:non-matching-substring>
<xsl:element name="FeaturedIndividual">
<xsl:choose>
<xsl:when test="matches(., ',')">
<xsl:value-of select="replace(concat(substring-after(., ', '), ' ', substring-before(., ', ')), 'x;x', ' ; ')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="replace(., 'x;x', ' ; ')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:non-matching-substring>
</xsl:analyze-string>
</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 -->
......
......@@ -192,49 +192,53 @@
</xsl:template>
<xsl:template match="rights[@typeLabel='Access']/ns2:rights">
<xsl:if test="matches(.,'onsite')">
<xsl:element name="accessPhysical">
<xsl:text>onsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'noonsite')">
<xsl:element name="accessPhysical">
<xsl:text>noonsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'public')">
<xsl:element name="accessDigital">
<xsl:text>public</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'private')">
<xsl:element name="accessDigital">
<xsl:text>private</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'faro')">
<xsl:element name="accessDigital">
<xsl:text>faro</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:choose>
<xsl:when test="matches(.,'noonsite')">
<xsl:element name="accessPhysical">
<xsl:text>noonsite</xsl:text>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:if test="matches(.,'onsite')">
<xsl:element name="accessPhysical">
<xsl:text>onsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'public')">
<xsl:element name="accessDigital">
<xsl:text>public</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'private')">
<xsl:element name="accessDigital">
<xsl:text>private</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'faro')">
<xsl:element name="accessDigital">
<xsl:text>faro</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="rights[@typeLabel='Holder']/rightsHolder/contactDetails/name | rights[@typeLabel='Holder']/ns2:rights">
......
......@@ -16,6 +16,6 @@ normalizePerson:
creationRelationName: # only tries to extract a value if a DUMMY-VALUE rico:name is property is present in the relation.
pattern: "\\((?<relation>.+)\\)" # " are necessary to ensure pattern is parsed correctly. Pattern needs to be double escaped!
language: NONE
nameOrder: "first-to-last" #works for creator, for featuredIndividual it should be last-to-first with nameDelimiter:SPACE
nameOrder: "last-to-first"
singleNameIsLastName: true
nameDelimiter: SPACE
\ No newline at end of file
......@@ -178,7 +178,14 @@
<xsl:when test="child::contactDetails">
<xsl:element name="{$type}Person">
<xsl:element name="name">
<xsl:value-of select="descendant::name"/>
<xsl:choose>
<xsl:when test="descendant::name = 'WILLIAM RITTER'">
<xsl:value-of select="'RITTER WILLIAM'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="descendant::name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<xsl:if test="$role">
<xsl:element name="role">
......
......@@ -14,4 +14,4 @@ normalizePerson:
language: NONE
nameOrder: "last-to-first"
singleNameIsLastName: true
nameDelimiter: ,
\ No newline at end of file
nameDelimiter: ","
\ No newline at end of file
......@@ -116,9 +116,7 @@ physical:
sameAs:
const: "http://rightsstatements.org/vocab/CNE/1.0/"
digital:
locator: essenceLocator
rights:
access: accessDigital
usage:
......
......@@ -24,6 +24,7 @@ record:
- caption: captioningFormat
subject:
- prefLabel: Keywords
- prefLabel: subject
genre:
- prefLabel: genre
placeOfCapture:
......
......@@ -39,7 +39,7 @@
</xsl:template>
<!-- content of child node is copied to parent node -->
<xsl:template match="title | format/essenceLocator | format/duration | format/start | language | references | coverage/spatial/location">
<xsl:template match="title | format/essenceLocator | format/duration | format/start | language | references | coverage/spatial/location | subject[not(@typeLabel)]">
<xsl:element name="{local-name()}">
<xsl:value-of select="child::*"/>
</xsl:element>
......
......@@ -19,6 +19,6 @@ normalizePerson:
creationRelationName: # only tries to extract a value if a DUMMY-VALUE rico:name is property is present in the relation.
pattern: "\\((?<relation>.+)\\)" # " are necessary to ensure pattern is parsed correctly. Pattern needs to be double escaped!
language: NONE
nameOrder: "frist-to-last"
nameOrder: "first-to-last"
singleNameIsLastName: true
nameDelimiter: SPACE
\ No newline at end of file
......@@ -36,6 +36,7 @@ record:
creators:
- person:
name: creatorPerson.name
relationName: creatorPerson.role
- corporateBody:
name: creatorCorporateBody.name
relationName: creatorCorporateBody.role
......
......@@ -192,49 +192,53 @@
</xsl:template>
<xsl:template match="rights[@typeLabel='Access']/ns2:rights">
<xsl:if test="matches(.,'onsite')">
<xsl:element name="accessPhysical">
<xsl:text>onsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'noonsite')">
<xsl:element name="accessPhysical">
<xsl:text>noonsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'public')">
<xsl:element name="accessDigital">
<xsl:text>public</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'private')">
<xsl:element name="accessDigital">
<xsl:text>private</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'faro')">
<xsl:element name="accessDigital">
<xsl:text>faro</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:choose>
<xsl:when test="matches(.,'noonsite')">
<xsl:element name="accessPhysical">
<xsl:text>noonsite</xsl:text>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:if test="matches(.,'onsite')">
<xsl:element name="accessPhysical">
<xsl:text>onsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'public')">
<xsl:element name="accessDigital">
<xsl:text>public</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'private')">
<xsl:element name="accessDigital">
<xsl:text>private</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'faro')">
<xsl:element name="accessDigital">
<xsl:text>faro</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="rights[@typeLabel='Holder']/rightsHolder/contactDetails/name | rights[@typeLabel='Holder']/ns2:rights">
......
......@@ -198,49 +198,53 @@
</xsl:template>
<xsl:template match="rights[@typeLabel='Access']/ns2:rights">
<xsl:if test="matches(.,'onsite')">
<xsl:element name="accessPhysical">
<xsl:text>onsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'noonsite')">
<xsl:element name="accessPhysical">
<xsl:text>noonsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'public')">
<xsl:element name="accessDigital">
<xsl:text>public</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'private')">
<xsl:element name="accessDigital">
<xsl:text>private</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'faro')">
<xsl:element name="accessDigital">
<xsl:text>faro</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:choose>
<xsl:when test="matches(.,'noonsite')">
<xsl:element name="accessPhysical">
<xsl:text>noonsite</xsl:text>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:if test="matches(.,'onsite')">
<xsl:element name="accessPhysical">
<xsl:text>onsite</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'public')">
<xsl:element name="accessDigital">
<xsl:text>public</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'private')">
<xsl:element name="accessDigital">
<xsl:text>private</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
<xsl:if test="matches(.,'faro')">
<xsl:element name="accessDigital">
<xsl:text>faro</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementText">
<xsl:text>Copyright Not Evaluated (CNE)</xsl:text>
</xsl:element>
<xsl:element name="rightsStatementURL">
<xsl:text>http://rightsstatements.org/vocab/CNE/1.0/</xsl:text>
</xsl:element>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="rights[@typeLabel='Holder']/rightsHolder/contactDetails/name | rights[@typeLabel='Holder']/ns2:rights">
......
......@@ -13,7 +13,7 @@ splitEntity:
delimiter: ";"
normalizePerson:
creationRelationName: # only tries to extract a value if a DUMMY-VALUE rico:name is property is present in the relation.
pattern: "\\( - ?<relation>.+\\)" # " are necessary to ensure pattern is parsed correctly. Pattern needs to be double escaped!
pattern: " (?<relation>.+)"
# pattern is "Name - relation"
language: NONE
nameOrder: "last-to-first"
......
......@@ -189,18 +189,22 @@
</xsl:element>
</xsl:when>
<xsl:when test="descendant::name != ''">
<xsl:element name="name">
<xsl:value-of select="descendant::name"/>
</xsl:element>
<xsl:if test="$role">
<xsl:element name="role">
<xsl:value-of select="$role"/>
<xsl:element name="{$type}Person">
<xsl:element name="name">
<xsl:value-of select="descendant::name"/>
</xsl:element>
</xsl:if>
<xsl:if test="$role">
<xsl:element name="role">
<xsl:value-of select="$role"/>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="name">
<xsl:value-of select="$role"/>
<xsl:element name="{$type}Person">
<xsl:element name="name">
<xsl:value-of select="$role"/>
</xsl:element>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
......
......@@ -77,6 +77,9 @@ physical:
- prefix:
value: "TV Norm: "
field: videoFormatTVSystem
- prefix:
value: "TV Norm: "
field: videoFormatMode
- prefix:
value: "Bemerkung: "
field: videoFormatRemarks
......
Supports Markdown
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