diff --git a/.gitmodules b/.gitmodules index 6a25c8bfc..6559bd504 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,7 @@ [submodule "vocabs"] path = vocabs url = https://github.com/lobid/vocabs +[submodule "lbz-vocabs"] + path = lbz-vocabs + url = https://github.com/hbz/lbz-vocabs + branch = main diff --git a/README.textile b/README.textile index 6bd1b2136..91f22ee9d 100644 --- a/README.textile +++ b/README.textile @@ -114,8 +114,9 @@ You're done :) h2. Tables as gitsubmodules -Some lookup tables are provided through gitsubmodules. +Some lookup tables are provided through gitsubmodules (s. @.gitmodules@). To initialize the submodules do @git submodule update --init --remote@. +To add a submodule do @git submodule add $repoUrl@. To make a @git pull@ also update these tables you can e.g. do @git config --local submodule.recurse true@ once and @git submodule update --recursive --remote@ after every @git pull@ ! This is necessary to be on the HEAD of the master of the submodules. diff --git a/lbz-vocabs b/lbz-vocabs new file mode 160000 index 000000000..e83ed547a --- /dev/null +++ b/lbz-vocabs @@ -0,0 +1 @@ +Subproject commit e83ed547a56ab27703fcaf59cd11878e6930179a diff --git a/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java b/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java index 221edf1e6..5805bc70d 100644 --- a/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java +++ b/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java @@ -128,9 +128,9 @@ public void run() { fixVariables.put("rvk.tsv", "../../../../../../lookup-tables/data/rvk.tsv"); fixVariables.put("lobidOrganisationsMapping.tsv", "./maps/lobidOrganisationsMapping.tsv"); fixVariables.put("hbzowner2sigel.tsv", "./maps/hbzowner2sigel.tsv"); - fixVariables.put("rpb2.ttl", "../../../../../../vocabs/rpb/rpb2.ttl"); - fixVariables.put("rpb-spatial.ttl", "../../../../../../vocabs/rpb/rpb-spatial.ttl"); - fixVariables.put("rpb.ttl", "../../../../../../vocabs/rpb/rpb.ttl"); + fixVariables.put("lbz-notationen.ttl", "../../../../../../lbz-vocabs/lbz-notationen.ttl"); + fixVariables.put("rpb-spatial.ttl", "../../../../../../lbz-vocabs/rpb-spatial.ttl"); + fixVariables.put("rpb.ttl", "../../../../../../lbz-vocabs/rpb.ttl"); fixVariables.put("nwbib.ttl", "../../../../../../vocabs/nwbib/nwbib.ttl"); fixVariables.put("nwbib-spatial.ttl", "../../../../../../vocabs/nwbib/nwbib-spatial.ttl"); fixVariables.put("hbzId2zdbId.tsv", "./maps/hbzId2zdbId.tsv.gz"); diff --git a/src/main/resources/alma/fix/maps.fix b/src/main/resources/alma/fix/maps.fix index abde61dfc..74e9f1e0b 100644 --- a/src/main/resources/alma/fix/maps.fix +++ b/src/main/resources/alma/fix/maps.fix @@ -30,7 +30,7 @@ put_filemap("$[classification.tsv]","classificationCode2Uri", sep_char:"\t",key_ put_filemap("$[rvk.tsv]","rvk", sep_char:"\t") # RPB SKOS Maps -put_rdfmap("$[rpb2.ttl]", "rpb2", target: "skos:prefLabel", select_language: "de") # LBZ-Notationen aka rpb2 fka RPB-Sachgruppen und Zusätze +put_rdfmap("$[lbz-notationen.ttl]", "lbz-notationen", target: "skos:prefLabel", select_language: "de") # LBZ-Notationen fka rpb2 fka RPB-Sachgruppen und Zusätze put_rdfmap("$[rpb-spatial.ttl]", "rpbr", target: "skos:prefLabel", select_language: "de") # RPB-Raumsystematik aka rpbr put_rdfmap("$[rpb.ttl]", "rpb", target: "skos:prefLabel", select_language: "de") # RPB-Sachsystematik fka. Systematik der Rheinland-Pfälzischen Bibliographie diff --git a/src/main/resources/alma/fix/subjects.fix b/src/main/resources/alma/fix/subjects.fix index 6655cff91..d06c01dd4 100644 --- a/src/main/resources/alma/fix/subjects.fix +++ b/src/main/resources/alma/fix/subjects.fix @@ -271,14 +271,14 @@ do list(path:"084??", "var":"$i") do list(path:"$i.a", "var":"$j") copy_field("$j", "subject[].$append.notation") set_array("subject[].$last.type[]","Concept") - # LBZ-Notationen aka rpb2 fka RPB-Sachgruppen und Zusätze + # LBZ-Notationen fka rpb2 fka RPB-Sachgruppen und Zusätze if any_match("$i.2", "rpb") if any_match("$j","\\d{3}") - copy_field("$j","$i.@rpb2NotationId") - prepend("$i.@rpb2NotationId","https://w3id.org/lobid/rpb2#n") - copy_field("$i.@rpb2NotationId","subject[].$last.id") - lookup("$i.@rpb2NotationId","rpb2") - move_field("$i.@rpb2NotationId","subject[].$last.label") + copy_field("$j","$i.@lbz-notationenId") + prepend("$i.@lbz-notationenId","https://w3id.org/lobid/rpb2#n") + copy_field("$i.@lbz-notationenId","subject[].$last.id") + lookup("$i.@lbz-notationenId","lbz-notationen") + move_field("$i.@lbz-notationenId","subject[].$last.label") add_field("subject[].$last.source.id", "https://w3id.org/lobid/rpb2") add_field("subject[].$last.source.label", "LBZ-Notationen") # RPB-Sachsystematik fka. Systematik der Rheinland-Pfälzischen Bibliographie diff --git a/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java b/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java index a168467f8..5eeab3fa4 100644 --- a/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java +++ b/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java @@ -72,7 +72,7 @@ public void setup() { fixVariables.put("rvk.tsv", "src/test/resources/cg/rvk.tsv"); fixVariables.put("lobidOrganisationsMapping.tsv", "src/test/resources/alma/maps/lobidOrganisationsMapping.tsv"); fixVariables.put("hbzowner2sigel.tsv", "src/main/resources/alma/maps/hbzowner2sigel.tsv"); - fixVariables.put("rpb2.ttl", "src/test/resources/alma/maps/rpb2.ttl"); + fixVariables.put("lbz-notationen.ttl", "src/test/resources/alma/maps/lbz-notationen.ttl"); fixVariables.put("rpb-spatial.ttl", "src/test/resources/alma/maps/rpb-spatial.ttl"); fixVariables.put("rpb.ttl", "src/test/resources/alma/maps/rpb.ttl"); fixVariables.put("nwbib.ttl", "src/test/resources/alma/maps/nwbib.ttl"); diff --git a/src/test/resources/alma/maps/rpb2.ttl b/src/test/resources/alma/maps/lbz-notationen.ttl similarity index 100% rename from src/test/resources/alma/maps/rpb2.ttl rename to src/test/resources/alma/maps/lbz-notationen.ttl