Skip to content

Commit

Permalink
Add gnd#SubjectHeading as rdf:type
Browse files Browse the repository at this point in the history
- add nameOfCreatingCorporateBodyG
- add gnd#Person

See hbz/lobid-rdf-to-json#25.
  • Loading branch information
dr0i committed Sep 13, 2016
1 parent 6b7ffb6 commit b7bf95a
Show file tree
Hide file tree
Showing 93 changed files with 1,268 additions and 420 deletions.
49 changes: 41 additions & 8 deletions src/main/resources/morph-hbz01-to-lobid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@
<data source="@subjectIdOrElseLiteral" name="http://d-nb.info/standards/elementset/gnd#preferredName">
<regexp match="^[^http].*"/>
</data>

<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="${a}"
>
<choose name="a" flushWith="$[field]-[-12].9|record">
<data source="@subjectPerson">
<regexp match=".*"/>
</data>
</choose>
</combine>


<combine name="@preferredNameForTheSubjectHeading" value="${a}" sameEntity="true">
<data source="9[01234][27]-[-12].[szf]"/>
<data source="@preferredName" name="a"/>
</combine>
</entity>
<!-- ####################### -->
<!-- ####### Get subject uri of each record -->
Expand Down Expand Up @@ -926,6 +941,7 @@
<data source="@nameOfCreatingCorporateBodyK"/>
</choose>
</combine>
<data source="2?[02468][-a][12].g" name="@nameOfCreatingCorporateBodyG"/>
<!-- only contributor, not creator -->
<data source="2?[02468][bcfep][12].k" name="@nameOfContributingCorporateBodyK">
<replace pattern="&gt;&gt;" with=""/>
Expand Down Expand Up @@ -1273,14 +1289,23 @@
</concat>
</combine>
<!-- START contributor/creator -->
<combine name="$[ns-gnd]preferredNameForThePerson" value="${a}" sameEntity="true"
reset="true">
<combine name="@preferredNameForThePerson" value="${a}" sameEntity="true" reset="true">
<data source="@preferredName" name="a">
<replace pattern="&gt;&gt;" with=""/>
<replace pattern="&lt;&lt;" with=""/>
</data>
<data source="@creatorPersonId|@contributorPersonId"/>
</combine>
<data source="@preferredNameForThePerson" name="$[ns-gnd]preferredNameForThePerson"/>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#Person">
<data source="@preferredNameForThePerson"/>
</combine>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#Person"
flushWith="@preferredNameP">
<data source="@subjectPerson">
<regexp match=".*"/>
</data>
</combine>
<combine name="$[ns-gnd]preferredNameForTheCorporateBody" value="${a}"
flushWith="@creatorCorporateBodyId">
<data source="@nameOfCreatingCorporateBody" name="a"/>
Expand Down Expand Up @@ -1317,22 +1342,30 @@
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#Work">
<data source="@preferredNameForTheWork"/>
</combine>
<combine name="$[ns-gnd]preferredNameForTheSubjectHeading" value="${a}"
sameEntity="true">
<data source="9[01234][27]-[-12].s"/>
<!-- default, generic type -->
<combine name="@preferredNameForTheSubjectHeading" value="${a}" sameEntity="true">
<data source="9[01234][27]-[-12].[szf]"/>
<data source="@preferredName" name="a"/>
</combine>
<data source="@preferredNameForTheSubjectHeading" name="$[ns-gnd]preferredNameForTheSubjectHeading"/>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#SubjectHeading">
<data source="@preferredNameForTheSubjectHeading"/>
</combine>
<combine name="@preferredNameForThePlaceOrGeographicName" value="${a}"
sameEntity="true">
<data source="@subjectLinks"/>
<data source="9[01234][27]-[-12].g"/>
<data source="@preferredNameConcatSubject" name="a"/>
</combine>
<data source="@preferredNameForThePlaceOrGeographicName" name="$[ns-gnd]preferredNameForThePlaceOrGeographicName"/>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
value="http://d-nb.info/standards/elementset/gnd#TerritorialCorporateBodyOrAdministrativeUnit">
<data source="@preferredNameForThePlaceOrGeographicName|@nameOfCreatingCorporateBodyG"
name="$[ns-gnd]preferredNameForThePlaceOrGeographicName"/>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#PlaceOrGeographicName">
<data source="@preferredNameForThePlaceOrGeographicName"/>
</combine>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#PlaceOrGeographicName"
flushWith="@creatorCorporateBodyId|@contributorCorporateBodyId" sameEntity="true">
<data source="@nameOfCreatingCorporateBodyG"/>
</combine>
<combine name="$[ns-gnd]dateOfBirth" value="${a}" sameEntity="true">
<data source="@subjectLinks"/>
<data source="@preferredNameP"/>
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl -XGET http://gaia.hbz-nrw.de:9200/resources-smalltest-20160315-132731/item/HT008351497:DE-6:46%205244
Loading

0 comments on commit b7bf95a

Please sign in to comment.