Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow basis to fetch HEBIS Data RPB-225 #105

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install metafacture-fix 0.7.0
java-version: 11
- name: Install metafacture-fix 1.2.0
run: |
git clone https://github.com/metafacture/metafacture-fix.git -b 0.7.0
git clone https://github.com/metafacture/metafacture-fix.git -b 1.2.0
cd metafacture-fix
./gradlew publishToMavenLocal
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bin
.settings
/conf/maps/beacons/*.tsv
/conf/output/*
!/conf/output/test-output-*.json
!/conf/output/test*.json
!/conf/output/rpb-50*
/data/*
!/data/.empty
Expand Down
24 changes: 13 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ libraryDependencies ++= Seq(
cache,
javaWs,
"com.typesafe.play" % "play-test_2.11" % "2.4.11",
"org.metafacture" % "metafacture-elasticsearch" % "5.7.0",
"org.metafacture" % "metafacture-io" % "5.7.0",
"org.metafacture" % "metafacture-strings" % "5.7.0",
"org.metafacture" % "metafacture-json" % "5.7.0",
"org.metafacture" % "metafacture-flux" % "5.7.0",
"org.metafacture" % "metafacture-triples" % "5.7.0",
"org.metafacture" % "metafacture-formatting" % "5.7.0",
"org.metafacture" % "metafacture-monitoring" % "5.7.0",
"org.metafacture" % "metafacture-csv" % "5.7.0",
"org.metafacture" % "metafacture-linkeddata" % "5.7.0",
"org.metafacture" % "metafix" % "0.7.0",
"org.metafacture" % "metafacture-elasticsearch" % "6.2.0",
"org.metafacture" % "metafacture-io" % "6.2.0",
"org.metafacture" % "metafacture-xml" % "6.2.0",
"org.metafacture" % "metafacture-biblio" % "6.2.0",
"org.metafacture" % "metafacture-strings" % "6.2.0",
"org.metafacture" % "metafacture-json" % "6.2.0",
"org.metafacture" % "metafacture-flux" % "6.2.0",
"org.metafacture" % "metafacture-triples" % "6.2.0",
"org.metafacture" % "metafacture-formatting" % "6.2.0",
"org.metafacture" % "metafacture-monitoring" % "6.2.0",
"org.metafacture" % "metafacture-csv" % "6.2.0",
"org.metafacture" % "metafacture-linkeddata" % "6.2.0",
"org.metafacture" % "metafix" % "1.2.0",
"org.elasticsearch" % "elasticsearch" % "1.7.5" withSources(),
"com.github.jsonld-java" % "jsonld-java" % "0.5.0",
"org.apache.commons" % "commons-rdf-jena" % "0.5.0",
Expand Down
26 changes: 26 additions & 0 deletions conf/fetchAndTransformHebisRecord.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
default IDS = FLUX_DIR + "hebisTestIds.txt";
createEndTime = "0"; //needed for lobid transformation

IDS
| open-file
| as-lines
| match(pattern="^(.*)$", replacement="http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22$1%22&version=1.1&operation=searchRetrieve&stylesheet=http%3A%2F%2Fsru.hebis.de%2Fsru%2F%3Fxsl%3DsearchRetrieveResponse&recordSchema=marc21&maximumRecords=10&startRecord=1&recordPacking=xml&sortKeys=LST_Y%2Cpica%2C0%2C%2C")
| write(FLUX_DIR + "hebisSruLinks.txt")
;

FLUX_DIR + "hebisSruLinks.txt"
| open-file
| as-lines


// the hebis workflow could start with the following and enter the the hebisId in strapi you start a workflow with the hebisId as parameter.
//hebisId
//| template("http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22${o}%22&version=1.1&operation=searchRetrieve&stylesheet=http%3A%2F%2Fsru.hebis.de%2Fsru%2F%3Fxsl%3DsearchRetrieveResponse&recordSchema=marc21&maximumRecords=10&startRecord=1&recordPacking=xml&sortKeys=LST_Y%2Cpica%2C0%2C%2C")
| open-http(accept="application/xml")
| decode-xml
| handle-marcxml
| fix(FLUX_DIR + "hebisMarc2lobid-transformation/marcToLobid.fix",*)
| batch-reset(batchsize="1")
| encode-json(prettyPrinting="true")
| write(FLUX_DIR + "output/test-hebis-to-lobid-output-${i}.json")
;
14 changes: 14 additions & 0 deletions conf/fetchRpbForCompareTransformedHebisRecord.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
default IDS = FLUX_DIR + "rpbEntriesOfHebisRecords.txt";

IDS
| open-file
| as-lines
| match(pattern="^(.*)$", replacement="https://rpb.lbz-rlp.de/$1?format=json")
| open-http(accept="application/xml")
| as-records
| decode-json(recordPath="member")
| batch-reset(batchsize="1")
| encode-json(prettyPrinting="true")
| write(FLUX_DIR + "lobid-transformation/comparisonRpbRecords/rpb-hebis-records-${i}.json")
;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acka47 files named conf/hebisMarc2lobid-transformation/comparisonRpbRecords/rpb-hebis-records-n.json are for only for comparison they are records from the productive rpb.

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"extent" : "62 Seiten : Illustrationen",
"contribution" : [ {
"agent" : {
"id" : "http://rpb.lobid.org/sw/00Gn24m0017186a",
"label" : "Caltapanides, Anke",
"type" : [ "Person" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/edt",
"label" : "Herausgeber/in"
},
"type" : [ "Contribution" ]
}, {
"agent" : {
"id" : "https://d-nb.info/gnd/123750354X",
"label" : "Ingelheim am Rhein / Stadtverwaltung",
"type" : [ "CorporateBody" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/isb",
"label" : "Herausgebendes Organ"
},
"type" : [ "Contribution" ]
} ],
"rpbId" : "036t240017",
"subject" : [ {
"id" : "http://purl.org/lobid/rpb#n520100",
"label" : "Sozialwesen allgemein",
"source" : {
"id" : "http://purl.org/lobid/rpb",
"label" : "Systematik der Rheinland-Pfälzischen Bibliographie"
},
"type" : [ "Concept" ]
}, {
"id" : "http://purl.org/lobid/rpb#n843020",
"label" : "Öffentliches Gebäude",
"source" : {
"id" : "http://purl.org/lobid/rpb",
"label" : "Systematik der Rheinland-Pfälzischen Bibliographie"
},
"type" : [ "Concept" ]
}, {
"componentList" : [ {
"id" : "https://d-nb.info/gnd/4026954-1",
"label" : "Ingelheim am Rhein",
"source" : {
"id" : "https://d-nb.info/gnd/7749153-1",
"label" : "Gemeinsame Normdatei (GND)"
}
}, {
"id" : "https://d-nb.info/gnd/7607842-5",
"label" : "Mehrgenerationenhaus",
"source" : {
"id" : "https://d-nb.info/gnd/7749153-1",
"label" : "Gemeinsame Normdatei (GND)"
}
}, {
"id" : "http://rpb.lobid.org/sw/00Gn18k3167156a",
"label" : "Geschichte 2009-2019",
"source" : {
"id" : "http://rpb.lobid.org/sw",
"label" : "RPB-Sachsystematik"
}
} ],
"label" : "Ingelheim am Rhein | Mehrgenerationenhaus | Geschichte 2009-2019",
"type" : [ "ComplexSubject" ]
} ],
"publication" : [ {
"publishedBy" : [ "Stadtverwaltung Ingelheim am Rhein" ],
"location" : [ "Ingelheim am Rhein" ],
"type" : [ "PublicationEvent" ]
} ],
"responsibilityStatement" : [ "Redaktionsteam: Anke Caltapanides [und 3 weitere] ; Herausgeber: Stadtverwaltung Ingelheim am Rhein" ],
"inCollection" : [ {
"id" : "http://lobid.org/resources/HT013494180#!",
"label" : "Rheinland-Pfälzische Bibliographie",
"type" : [ "Collection" ]
} ],
"id" : "https://lobid.org/resources/036t240017",
"type" : [ "BibliographicResource", "Book" ],
"title" : "Wie wir wurden was wir sind - 10-jähriges Jubiläum des Mehrgenerationenhauses Ingelheim",
"spatial" : [ {
"id" : "https://rpb.lobid.org/spatial#n33900030",
"label" : "Ingelheim am Rhein, große kreisangeh. Stadt",
"source" : {
"id" : "https://rpb.lobid.org/spatial",
"label" : "RPB-Raumsystematik"
},
"type" : [ "Concept" ]
} ],
"@context" : "http://lobid.org/resources/context.jsonld"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"extent" : "1 gefaltetes Blatt (16 Seiten) : Illustrationen",
"note" : [ "Parallele Sprachausgabe: The ancient cathedral St. John" ],
"rpbId" : "036t240110",
"subject" : [ {
"id" : "http://purl.org/lobid/rpb#n844030",
"label" : "Sakralbau",
"source" : {
"id" : "http://purl.org/lobid/rpb",
"label" : "Systematik der Rheinland-Pfälzischen Bibliographie"
},
"type" : [ "Concept" ]
}, {
"componentList" : [ {
"id" : "https://d-nb.info/gnd/4369072-5",
"label" : "Sankt Johannis / Mainz",
"source" : {
"id" : "https://d-nb.info/gnd/7749153-1",
"label" : "Gemeinsame Normdatei (GND)"
}
} ],
"label" : "Sankt Johannis / Mainz",
"type" : [ "ComplexSubject" ]
} ],
"responsibilityStatement" : [ "Evangelisches Dekanat Mainz" ],
"alternativeTitle" : [ "The ancient cathedral St. John" ],
"inCollection" : [ {
"id" : "http://lobid.org/resources/HT013494180#!",
"label" : "Rheinland-Pfälzische Bibliographie",
"type" : [ "Collection" ]
} ],
"type" : [ "BibliographicResource", "Book" ],
"title" : "Alter Dom St. Johannis : 1500 Jahre Geschichte im Herzen von Mainz",
"@context" : "http://lobid.org/resources/context.jsonld",
"contribution" : [ {
"agent" : {
"id" : "https://d-nb.info/gnd/2009806-6",
"label" : "Evangelische Kirche in Hessen und Nassau",
"type" : [ "CorporateBody" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/isb",
"label" : "Herausgebendes Organ"
},
"type" : [ "Contribution" ]
} ],
"publication" : [ {
"publishedBy" : [ "Evangelisches Dekanat Mainz" ],
"location" : [ "Mainz" ],
"type" : [ "PublicationEvent" ]
} ],
"id" : "https://lobid.org/resources/036t240110",
"spatial" : [ {
"id" : "https://rpb.lobid.org/spatial#n31500000",
"label" : "Mainz, Kreisfreie Stadt",
"source" : {
"id" : "https://rpb.lobid.org/spatial",
"label" : "RPB-Raumsystematik"
},
"type" : [ "Concept" ]
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"extent" : "127 S. : zahlr. Ill., Kt.",
"rpbId" : "036t000008",
"subject" : [ {
"id" : "http://purl.org/lobid/rpb#n102050",
"label" : "Ortsbeschreibung",
"source" : {
"id" : "http://purl.org/lobid/rpb",
"label" : "Systematik der Rheinland-Pfälzischen Bibliographie"
},
"type" : [ "Concept" ]
}, {
"componentList" : [ {
"id" : "http://rpb.lobid.org/sw/z64",
"label" : "Geschichte 1945-",
"source" : {
"id" : "http://rpb.lobid.org/sw",
"label" : "RPB-Sachsystematik"
}
}, {
"id" : "https://d-nb.info/gnd/4155569-7",
"label" : "Führer",
"source" : {
"id" : "https://d-nb.info/gnd/7749153-1",
"label" : "Gemeinsame Normdatei (GND)"
}
} ],
"label" : "Geschichte 1945- | Führer",
"type" : [ "ComplexSubject" ]
} ],
"isbn" : [ "3-87439-488-3" ],
"responsibilityStatement" : [ "[Konzept und Texte: Frank Herda ; Georg Schuler ; Ellen Vest]" ],
"inCollection" : [ {
"id" : "http://lobid.org/resources/HT013494180#!",
"label" : "Rheinland-Pfälzische Bibliographie",
"type" : [ "Collection" ]
} ],
"type" : [ "BibliographicResource", "Book" ],
"title" : "Mainz transparent : 2000 Jahre einer Stadt ; [Stadtbegleiter]",
"@context" : "http://lobid.org/resources/context.jsonld",
"contribution" : [ {
"agent" : {
"id" : "http://rpb.lobid.org/sw/00Pn00m0019c",
"label" : "Herda, Frank",
"type" : [ "Person" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/aut",
"label" : "Verfasser/in"
},
"type" : [ "Contribution" ]
}, {
"agent" : {
"id" : "http://rpb.lobid.org/sw/00Pn00m0019a",
"label" : "Schuler, Georg",
"type" : [ "Person" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/aut",
"label" : "Verfasser/in"
},
"type" : [ "Contribution" ]
}, {
"agent" : {
"id" : "http://rpb.lobid.org/sw/00Pn00m0019b",
"label" : "Vest, Ellen",
"type" : [ "Person" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/aut",
"label" : "Verfasser/in"
},
"type" : [ "Contribution" ]
} ],
"publication" : [ {
"publishedBy" : [ "Schmidt" ],
"location" : [ "Mainz" ],
"type" : [ "PublicationEvent" ],
"startDate" : "2000"
} ],
"id" : "https://lobid.org/resources/036t000008",
"spatial" : [ {
"id" : "https://rpb.lobid.org/spatial#n31500000",
"label" : "Mainz, Kreisfreie Stadt",
"source" : {
"id" : "https://rpb.lobid.org/spatial",
"label" : "RPB-Raumsystematik"
},
"type" : [ "Concept" ]
} ]
}
Loading