Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
🚀
This server has been upgraded to GitLab release
15.7
.
🚀
Open sidebar
memoriav
Memobase 2020
utilities
Import Process CLI
Commits
c50bb0ee
Commit
c50bb0ee
authored
Feb 26, 2021
by
Silvia Witzig
Browse files
improve persons
parent
9e6eb9cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
deployment/configurations/apf-001/mappings/localTransforms.yml
View file @
c50bb0ee
...
...
@@ -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
...
...
deployment/configurations/apf-001/mappings/transform.xslt
View file @
c50bb0ee
...
...
@@ -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 -->
...
...
deployment/configurations/bpu-001/mappings/localTransforms.yml
View file @
c50bb0ee
...
...
@@ -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
deployment/configurations/bpu-001/mappings/transform.xslt
View file @
c50bb0ee
...
...
@@ -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"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment