From c3d159e50564e5938980f9f727c05f917662fb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Tue, 3 Dec 2024 12:30:21 +0100 Subject: [PATCH] Adjust transformation for fetching hebis records --- conf/fetchAndTransformHebisRecord.flux | 8 ++- conf/hebisSruLinks.txt | 14 ++++ conf/hebisTestIds.txt | 2 +- conf/output/test-hebis-to-lobid-output-0.json | 2 +- conf/output/test-hebis-to-lobid-output-1.json | 70 +++++++++++++++++-- .../output/test-hebis-to-lobid-output-10.json | 2 +- .../output/test-hebis-to-lobid-output-11.json | 2 +- .../output/test-hebis-to-lobid-output-12.json | 2 +- .../output/test-hebis-to-lobid-output-13.json | 2 +- conf/output/test-hebis-to-lobid-output-2.json | 2 +- conf/output/test-hebis-to-lobid-output-3.json | 2 +- conf/output/test-hebis-to-lobid-output-4.json | 2 +- conf/output/test-hebis-to-lobid-output-5.json | 2 +- conf/output/test-hebis-to-lobid-output-6.json | 2 +- conf/output/test-hebis-to-lobid-output-7.json | 2 +- conf/output/test-hebis-to-lobid-output-8.json | 2 +- conf/output/test-hebis-to-lobid-output-9.json | 2 +- 17 files changed, 98 insertions(+), 22 deletions(-) create mode 100644 conf/hebisSruLinks.txt diff --git a/conf/fetchAndTransformHebisRecord.flux b/conf/fetchAndTransformHebisRecord.flux index db3a193..f09443f 100644 --- a/conf/fetchAndTransformHebisRecord.flux +++ b/conf/fetchAndTransformHebisRecord.flux @@ -1,10 +1,16 @@ default IDS = FLUX_DIR + "hebisTestIds.txt"; -createEndTime = "1"; //needed for lobid transformation +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 | open-http(accept="application/xml") | decode-xml | handle-marcxml diff --git a/conf/hebisSruLinks.txt b/conf/hebisSruLinks.txt new file mode 100644 index 0000000..52135b9 --- /dev/null +++ b/conf/hebisSruLinks.txt @@ -0,0 +1,14 @@ +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22514226781%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22512839662%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22512013683%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22512849919%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22516707701%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22475390555%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22488844266%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22487803779%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22478607776%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22090680634%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22090358163%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22090363000%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22508037980%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 +http://sru.hebis.de/sru/DB=2.1?query=pica.ppn+%3D+%22487803779%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 diff --git a/conf/hebisTestIds.txt b/conf/hebisTestIds.txt index b3d00a9..c2f8333 100644 --- a/conf/hebisTestIds.txt +++ b/conf/hebisTestIds.txt @@ -1,5 +1,5 @@ 514226781 -512839662 +512839662 512013683 512849919 516707701 diff --git a/conf/output/test-hebis-to-lobid-output-0.json b/conf/output/test-hebis-to-lobid-output-0.json index 50ac9f1..9b40959 100644 --- a/conf/output/test-hebis-to-lobid-output-0.json +++ b/conf/output/test-hebis-to-lobid-output-0.json @@ -25,7 +25,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:30", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-1.json b/conf/output/test-hebis-to-lobid-output-1.json index 3ab992f..80b0329 100644 --- a/conf/output/test-hebis-to-lobid-output-1.json +++ b/conf/output/test-hebis-to-lobid-output-1.json @@ -1,12 +1,24 @@ { "@context" : "http://lobid.org/resources/context.jsonld", - "id" : "http://lobid.org/resources/#!", - "type" : [ "BibliographicResource", "Miscellaneous" ], + "id" : "http://lobid.org/resources/512839662#!", + "type" : [ "BibliographicResource", "Book" ], "medium" : [ { - "label" : "Sonstige", - "id" : "http://purl.org/lobid/lv#Miscellaneous" + "label" : "Print", + "id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010" + } ], + "title" : "Alter Dom St. Johannis", + "almaMmsId" : "512839662", + "oclcNumber" : [ "1407066536" ], + "otherTitleInformation" : [ "1500 Jahre Geschichte im Herzen von Mainz" ], + "publication" : [ { + "startDate" : "2023", + "type" : [ "PublicationEvent" ], + "location" : [ "Mainz" ], + "publishedBy" : [ "Evangelisches Dekanat Mainz" ] } ], "describedBy" : { + "id" : "http://lobid.org/resources/512839662", + "label" : "Webseite der hbz-Ressource 512839662", "type" : [ "BibliographicDescription" ], "inDataset" : { "id" : "http://lobid.org/resources/dataset#!", @@ -14,23 +26,67 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:31", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], "label" : "Software lobid-resources" }, "object" : { + "id" : "https://lobid.org/marcxml/512839662", "type" : [ "DataFeedItem" ], + "label" : "hbz-Ressource 512839662 im Exportformat MARC21 XML", "inDataset" : { "id" : "https://datahub.io/dataset/hbz_unioncatalog", "label" : "hbz_unioncatalog" - } + }, + "sourceOrganization" : { + "id" : "http://lobid.org/organisations/DE-603#!", + "label" : "Hessisches BibliotheksInformationsSystem hebis" + }, + "provider" : { + "id" : "http://lobid.org/organisations/DE-603#!", + "label" : "Hessisches BibliotheksInformationsSystem hebis" + }, + "modifiedBy" : [ { + "id" : "http://lobid.org/organisations/DE-603#!", + "label" : "Hessisches BibliotheksInformationsSystem hebis" + } ] } }, "license" : [ { "id" : "http://creativecommons.org/publicdomain/zero/1.0", "label" : "Creative Commons-Lizenz CC0 1.0 Universal" } ] - } + }, + "sameAs" : [ { + "id" : "http://worldcat.org/oclc/1407066536", + "label" : "OCLC Ressource" + } ], + "related" : [ { + "note" : [ "Parallele Sprachausgabe englisch" ], + "label" : "The ancient cathedral St. John" + } ], + "language" : [ { + "id" : "http://id.loc.gov/vocabulary/iso639-2/ger", + "label" : "Deutsch" + } ], + "extent" : "1 gefaltetes Blatt ( 16 Seiten) : Illustrationen", + "bibliographicLevel" : { + "label" : "Monograph/Item", + "id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Monograph_Item" + }, + "responsibilityStatement" : [ "Evangelisches Dekanat Mainz" ], + "contribution" : [ { + "agent" : { + "gndIdentifier" : "1123222142", + "id" : "https://d-nb.info/gnd/1123222142", + "label" : "Evangelische Kirche in Hessen und Nassau. Evangelisches Dekanat Mainz", + "type" : [ "CorporateBody" ] + }, + "role" : { + "id" : "http://id.loc.gov/vocabulary/relators/isb" + }, + "type" : [ "Contribution" ] + } ] } diff --git a/conf/output/test-hebis-to-lobid-output-10.json b/conf/output/test-hebis-to-lobid-output-10.json index 3cd04a1..6bc1f00 100644 --- a/conf/output/test-hebis-to-lobid-output-10.json +++ b/conf/output/test-hebis-to-lobid-output-10.json @@ -28,7 +28,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:33", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-11.json b/conf/output/test-hebis-to-lobid-output-11.json index 77757cd..eff53e0 100644 --- a/conf/output/test-hebis-to-lobid-output-11.json +++ b/conf/output/test-hebis-to-lobid-output-11.json @@ -28,7 +28,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:33", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-12.json b/conf/output/test-hebis-to-lobid-output-12.json index 00741c3..51a6301 100644 --- a/conf/output/test-hebis-to-lobid-output-12.json +++ b/conf/output/test-hebis-to-lobid-output-12.json @@ -31,7 +31,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:33", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-13.json b/conf/output/test-hebis-to-lobid-output-13.json index 4618da2..12bd14d 100644 --- a/conf/output/test-hebis-to-lobid-output-13.json +++ b/conf/output/test-hebis-to-lobid-output-13.json @@ -28,7 +28,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:34", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-2.json b/conf/output/test-hebis-to-lobid-output-2.json index 28681c1..aac51f0 100644 --- a/conf/output/test-hebis-to-lobid-output-2.json +++ b/conf/output/test-hebis-to-lobid-output-2.json @@ -27,7 +27,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:31", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-3.json b/conf/output/test-hebis-to-lobid-output-3.json index 6b11dc6..ed88b18 100644 --- a/conf/output/test-hebis-to-lobid-output-3.json +++ b/conf/output/test-hebis-to-lobid-output-3.json @@ -26,7 +26,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:32", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-4.json b/conf/output/test-hebis-to-lobid-output-4.json index e311755..976f7de 100644 --- a/conf/output/test-hebis-to-lobid-output-4.json +++ b/conf/output/test-hebis-to-lobid-output-4.json @@ -26,7 +26,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:32", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-5.json b/conf/output/test-hebis-to-lobid-output-5.json index 75ec477..0dfda75 100644 --- a/conf/output/test-hebis-to-lobid-output-5.json +++ b/conf/output/test-hebis-to-lobid-output-5.json @@ -24,7 +24,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:32", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-6.json b/conf/output/test-hebis-to-lobid-output-6.json index e99cd42..8d0899a 100644 --- a/conf/output/test-hebis-to-lobid-output-6.json +++ b/conf/output/test-hebis-to-lobid-output-6.json @@ -27,7 +27,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:32", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-7.json b/conf/output/test-hebis-to-lobid-output-7.json index 2af1e1d..12bd14d 100644 --- a/conf/output/test-hebis-to-lobid-output-7.json +++ b/conf/output/test-hebis-to-lobid-output-7.json @@ -28,7 +28,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:32", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-8.json b/conf/output/test-hebis-to-lobid-output-8.json index 286a519..63b7554 100644 --- a/conf/output/test-hebis-to-lobid-output-8.json +++ b/conf/output/test-hebis-to-lobid-output-8.json @@ -33,7 +33,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:33", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ], diff --git a/conf/output/test-hebis-to-lobid-output-9.json b/conf/output/test-hebis-to-lobid-output-9.json index 33bec61..efed6fd 100644 --- a/conf/output/test-hebis-to-lobid-output-9.json +++ b/conf/output/test-hebis-to-lobid-output-9.json @@ -26,7 +26,7 @@ }, "resultOf" : { "type" : [ "CreateAction" ], - "endTime" : "2024-12-03T10:18:33", + "endTime" : "0000-00-00T00:00:00", "instrument" : { "id" : "https://github.com/hbz/lobid-resources", "type" : [ "SoftwareApplication" ],