diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..03405ed74 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "lookup-tables"] + path = lookup-tables + url = https://github.com/hbz/lookup-tables +[submodule "vocabs"] + path = vocabs + url = https://github.com/lobid/vocabs +[submodule "link-templates"] + path = link-templates + url = https://github.com/hbz/link-templates diff --git a/README.textile b/README.textile index a32864463..8d13152d7 100644 --- a/README.textile +++ b/README.textile @@ -102,6 +102,10 @@ If you've added and commited everything, check again if all is ok: This should result in *BUILD SUCCESS*. Push your changes. You're done :) +h2. Tables as gitsubmodules +Some lookup tables are provided through gitsubmodules. To make a @git pull@ also +update these tables you can e.g. do @git config --local submodule.recurse true@ once. + h2. Propagate the context.json to lobid-resources-web The generated _context.jsonld_ is automatically written to the proper directory diff --git a/link-templates b/link-templates new file mode 160000 index 000000000..692c7a796 --- /dev/null +++ b/link-templates @@ -0,0 +1 @@ +Subproject commit 692c7a7965aea5b0e5c244f6d4b6ff460dc71ec7 diff --git a/lookup-tables b/lookup-tables new file mode 160000 index 000000000..cdac9205b --- /dev/null +++ b/lookup-tables @@ -0,0 +1 @@ +Subproject commit cdac9205ba72aa40a9f1b952cc62023d712b87b8 diff --git a/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java b/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java index 69c8f129a..878373e85 100644 --- a/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java +++ b/src/main/java/org/lobid/resources/run/AlmaMarcXmlFix2lobidJsonEs.java @@ -116,23 +116,21 @@ public void run() { fixVariables.put("institution-code", "DE-605"); // the './' is mandatory to get play to use the "conf" directory. Base is the root directory of the fix, which is "alma": fixVariables.put("deweyLabels", "./maps/deweyLabels.tsv"); - fixVariables.put("dnbSachgruppen", "./maps/dnbSachgruppen.tsv"); - fixVariables.put("nwbib-spatial", "./../nwbib-spatial.tsv"); - fixVariables.put("wd_itemLabelTypesCoordinates", "./../wd_itemLabelTypesCoordinates.tsv"); + fixVariables.put("dnbSachgruppen", "./maps/dnbSachgruppen.tsv"); fixVariables.put("maps-institutions.tsv", "./maps/institutions.tsv"); - fixVariables.put("sublibraryIsil", "./maps/generatedAlmaSublibraryCode2Isil.tsv"); - fixVariables.put("suppressedLocations", "./maps/generatedAlmaSuppressedLocations.tsv"); + fixVariables.put("sublibraryIsil", "../../../../../../lookup-tables/data/almaSublibraryCode2Isil/generated/generatedAlmaSublibraryCode2Isil.tsv"); + fixVariables.put("suppressedLocations", "../../../../../../lookup-tables/data/almaSuppressedLocations/generated/generatedAlmaSuppressedLocations.tsv"); fixVariables.put("picaCreatorId2Isil.tsv", "./maps/picaCreatorId2Isil.tsv"); fixVariables.put("nwbibWikidataLabelTypeCoords.tsv", "./maps/nwbibWikidataLabelTypeCoords.tsv"); fixVariables.put("classification.tsv", "./maps/classification.tsv"); fixVariables.put("formangabe.tsv", "./maps/formangabe.tsv"); - fixVariables.put("almaMmsId2rpbId", "./maps/almaMmsId2rpbId.tsv"); + fixVariables.put("almaMmsId2rpbId", "../../../../../../lookup-tables/data/almaMmsId2rpbId.tsv"); fixVariables.put("lobidOrganisationsMapping.tsv", "./maps/lobidOrganisationsMapping.tsv"); fixVariables.put("hbzowner2sigel.tsv", "./maps/hbzowner2sigel.tsv"); fixVariables.put("isilRedirect.tsv", "./maps/isilRedirect.tsv"); - fixVariables.put("rpb2.ttl", "./maps/rpb2.ttl"); - fixVariables.put("rpb-spatial.ttl", "./maps/rpb-spatial.ttl"); - fixVariables.put("rpb.ttl", "./maps/rpb.ttl"); + 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("hbzId2zdbId.tsv", "./maps/hbzId2zdbId.tsv.gz"); XmlElementSplitter xmlElementSplitter = new XmlElementSplitter(); diff --git a/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java b/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java index 99379889b..4a1cd0320 100644 --- a/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java +++ b/src/test/java/org/lobid/resources/AlmaMarc21XmlToLobidJsonMetafixTest.java @@ -59,24 +59,22 @@ public void setup() { fixVariables.put("catalogid", "DE-605"); fixVariables.put("createEndTime", "0"); // 0 <=> false fixVariables.put("institution-code", "DE-605"); - fixVariables.put("deweyLabels", "src/test/resources/deweyLabels.tsv"); + fixVariables.put("deweyLabels", "src/test/resources/alma/maps/deweyLabels.tsv"); fixVariables.put("dnbSachgruppen", "src/main/resources/alma/maps/dnbSachgruppen.tsv"); - fixVariables.put("nwbib-spatial", "src/main/resources/nwbib-spatial.tsv"); - fixVariables.put("wd_itemLabelTypesCoordinates", "src/main/resources/wd_itemLabelTypesCoordinates.tsv"); fixVariables.put("classification.tsv", "src/main/resources/alma/maps/classification.tsv"); fixVariables.put("formangabe.tsv", "src/main/resources/alma/maps/formangabe.tsv"); fixVariables.put("maps-institutions.tsv", "src/main/resources/alma/maps/institutions.tsv"); - fixVariables.put("sublibraryIsil", "src/main/resources/alma/maps/generatedAlmaSublibraryCode2Isil.tsv"); - fixVariables.put("suppressedLocations", "src/main/resources/alma/maps/generatedAlmaSuppressedLocations.tsv"); + fixVariables.put("sublibraryIsil", "src/test/resources/alma/maps/generatedAlmaSublibraryCode2Isil.tsv"); + fixVariables.put("suppressedLocations", "src/test/resources/alma/maps/generatedAlmaSuppressedLocations.tsv"); fixVariables.put("picaCreatorId2Isil.tsv", "src/main/resources/alma/maps/picaCreatorId2Isil.tsv"); fixVariables.put("nwbibWikidataLabelTypeCoords.tsv", "src/main/resources/alma/maps/nwbibWikidataLabelTypeCoords.tsv"); - fixVariables.put("almaMmsId2rpbId", "src/main/resources/alma/maps/almaMmsId2rpbId.tsv"); + fixVariables.put("almaMmsId2rpbId", "src/test/resources/alma/maps/almaMmsId2rpbId.tsv"); fixVariables.put("lobidOrganisationsMapping.tsv", "src/main/resources/alma/maps/lobidOrganisationsMapping.tsv"); fixVariables.put("hbzowner2sigel.tsv", "src/main/resources/alma/maps/hbzowner2sigel.tsv"); fixVariables.put("isilRedirect.tsv", "src/main/resources/alma/maps/isilRedirect.tsv"); - fixVariables.put("rpb2.ttl", "src/main/resources/alma/maps/rpb2.ttl"); - fixVariables.put("rpb-spatial.ttl", "src/main/resources/alma/maps/rpb-spatial.ttl"); - fixVariables.put("rpb.ttl", "src/main/resources/alma/maps/rpb.ttl"); + fixVariables.put("rpb2.ttl", "src/test/resources/alma/maps/rpb2.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("hbzId2zdbId.tsv", "src/main/resources/alma/maps/hbzId2zdbId.tsv.gz"); } diff --git a/src/main/resources/alma/maps/almaMmsId2rpbId.tsv b/src/test/resources/alma/maps/almaMmsId2rpbId.tsv similarity index 100% rename from src/main/resources/alma/maps/almaMmsId2rpbId.tsv rename to src/test/resources/alma/maps/almaMmsId2rpbId.tsv diff --git a/src/test/resources/deweyLabels.tsv b/src/test/resources/alma/maps/deweyLabels.tsv similarity index 100% rename from src/test/resources/deweyLabels.tsv rename to src/test/resources/alma/maps/deweyLabels.tsv diff --git a/src/main/resources/alma/maps/generatedAlmaSublibraryCode2Isil.tsv b/src/test/resources/alma/maps/generatedAlmaSublibraryCode2Isil.tsv similarity index 100% rename from src/main/resources/alma/maps/generatedAlmaSublibraryCode2Isil.tsv rename to src/test/resources/alma/maps/generatedAlmaSublibraryCode2Isil.tsv diff --git a/src/main/resources/alma/maps/generatedAlmaSuppressedLocations.tsv b/src/test/resources/alma/maps/generatedAlmaSuppressedLocations.tsv similarity index 100% rename from src/main/resources/alma/maps/generatedAlmaSuppressedLocations.tsv rename to src/test/resources/alma/maps/generatedAlmaSuppressedLocations.tsv diff --git a/src/main/resources/alma/maps/rpb-spatial.ttl b/src/test/resources/alma/maps/rpb-spatial.ttl similarity index 100% rename from src/main/resources/alma/maps/rpb-spatial.ttl rename to src/test/resources/alma/maps/rpb-spatial.ttl diff --git a/src/main/resources/alma/maps/rpb.ttl b/src/test/resources/alma/maps/rpb.ttl similarity index 100% rename from src/main/resources/alma/maps/rpb.ttl rename to src/test/resources/alma/maps/rpb.ttl diff --git a/src/main/resources/alma/maps/rpb2.ttl b/src/test/resources/alma/maps/rpb2.ttl similarity index 100% rename from src/main/resources/alma/maps/rpb2.ttl rename to src/test/resources/alma/maps/rpb2.ttl diff --git a/vocabs b/vocabs new file mode 160000 index 000000000..967ca1324 --- /dev/null +++ b/vocabs @@ -0,0 +1 @@ +Subproject commit 967ca1324784c9a0bc53f8f5523cb8fb5f982d7c