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

Draft moving the hbzId for Articles to containedIn RPB-232 #109

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion conf/output/test-output-0.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"type" : [ "BibliographicResource", "Article" ],
"rpbId" : "929t112200",
"id" : "https://lobid.org/resources/929t112200",
"hbzId" : "CT003010348",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to be the real hbzId of the resource not the one of the parent publication.

"inCollection" : [ {
"id" : "http://lobid.org/resources/HT013494180#!",
"type" : [ "Collection" ],
Expand Down Expand Up @@ -74,6 +73,9 @@
},
"type" : [ "Contribution" ]
} ],
"containedIn" : [ {
"id" : "https://lobid.org/resources/CT003010348#!"
} ],
Comment on lines +76 to +78
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This then would introduce an error.

"bibliographicCitation" : "Bertius, Petrus : P. Bertii Tabularum geographicarum contractarum libri septem; 456",
"fulltextOnline" : [ {
"id" : "https://nbn-resolving.org/urn:nbn:de:hbz:061:1-68551",
Expand Down
4 changes: 3 additions & 1 deletion conf/output/test-output-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"type" : [ "BibliographicResource", "Article" ],
"rpbId" : "929t112201",
"id" : "https://lobid.org/resources/929t112201",
"hbzId" : "CT003010543",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to be the real hbzId of the resource not the one of the parent publication.

"inCollection" : [ {
"id" : "http://lobid.org/resources/HT013494180#!",
"type" : [ "Collection" ],
Expand Down Expand Up @@ -74,6 +73,9 @@
},
"type" : [ "Contribution" ]
} ],
"containedIn" : [ {
"id" : "https://lobid.org/resources/CT003010543#!"
} ],
Comment on lines +76 to +78
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This then would introduce an error.

"bibliographicCitation" : "Bertius, Petrus : P. Bertii Tabularum geographicarum contractarum libri septem; 380",
"fulltextOnline" : [ {
"id" : "https://nbn-resolving.org/urn:nbn:de:hbz:061:1-70507",
Expand Down
4 changes: 3 additions & 1 deletion conf/output/test-output-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"type" : [ "BibliographicResource", "Article" ],
"rpbId" : "929t112202",
"id" : "https://lobid.org/resources/929t112202",
"hbzId" : "CT003010542",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to be the real hbzId of the resource not the one of the parent publication.

"inCollection" : [ {
"id" : "http://lobid.org/resources/HT013494180#!",
"type" : [ "Collection" ],
Expand Down Expand Up @@ -74,6 +73,9 @@
},
"type" : [ "Contribution" ]
} ],
"containedIn" : [ {
"id" : "https://lobid.org/resources/CT003010542#!"
} ],
Comment on lines +76 to +78
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This then would introduce an error.

"bibliographicCitation" : "Bertius, Petrus : P. Bertii Tabularum geographicarum contractarum libri septem; 378",
"fulltextOnline" : [ {
"id" : "https://nbn-resolving.org/urn:nbn:de:hbz:061:1-70495",
Expand Down
6 changes: 3 additions & 3 deletions conf/output/test-output-3.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
}, {
"type" : [ "ComplexSubject" ],
"label" : "Rethel, Alfred / 1816-1859 | Illustration | Lithografie | Stolterfoth, Adelheid ¬von¬ / 1800-1875 / Rheinischer Sagenkreis | Pressendruck",
"label" : "Rethel, Alfred / 1816-1859 | Illustration | Lithografie | Stolterfoth, Adelheid von / 1800-1875 / Rheinischer Sagenkreis | Pressendruck",
"componentList" : [ {
"id" : "https://d-nb.info/gnd/118744615",
"label" : "Rethel, Alfred / 1816-1859",
Expand All @@ -53,7 +53,7 @@
}
}, {
"id" : "https://d-nb.info/gnd/7743324-5",
"label" : "Stolterfoth, Adelheid ¬von¬ / 1800-1875 / Rheinischer Sagenkreis",
"label" : "Stolterfoth, Adelheid von / 1800-1875 / Rheinischer Sagenkreis",
"source" : {
"id" : "https://d-nb.info/gnd/7749153-1",
"label" : "Gemeinsame Normdatei (GND)"
Expand All @@ -79,7 +79,7 @@
"contribution" : [ {
"agent" : {
"id" : "https://d-nb.info/gnd/116002468",
"label" : "Stolterfoth, Adelheid ¬von¬ / 1800-1875",
"label" : "Stolterfoth, Adelheid von / 1800-1875",
"type" : [ "Person" ]
},
"role" : {
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-39.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"contribution" : [ {
"agent" : {
"id" : "https://d-nb.info/gnd/1033772-6",
"label" : "Staatliche Vogelschutzwarte für Hessen, Rheinland-Pfalz und Saarland / Frankfurt, Main",
"label" : "Staatliche Vogelschutzwarte für Hessen, Rheinland-Pfalz und Saarland",
"type" : [ "CorporateBody" ]
},
"role" : {
Expand Down
6 changes: 3 additions & 3 deletions conf/output/test-output-4.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
}, {
"type" : [ "ComplexSubject" ],
"label" : "Rethel, Alfred / 1816-1859 | Illustration | Lithografie | Stolterfoth, Adelheid ¬von¬ / 1800-1875 / Rheinischer Sagenkreis",
"label" : "Rethel, Alfred / 1816-1859 | Illustration | Lithografie | Stolterfoth, Adelheid von / 1800-1875 / Rheinischer Sagenkreis",
"componentList" : [ {
"id" : "https://d-nb.info/gnd/118744615",
"label" : "Rethel, Alfred / 1816-1859",
Expand All @@ -53,7 +53,7 @@
}
}, {
"id" : "https://d-nb.info/gnd/7743324-5",
"label" : "Stolterfoth, Adelheid ¬von¬ / 1800-1875 / Rheinischer Sagenkreis",
"label" : "Stolterfoth, Adelheid von / 1800-1875 / Rheinischer Sagenkreis",
"source" : {
"id" : "https://d-nb.info/gnd/7749153-1",
"label" : "Gemeinsame Normdatei (GND)"
Expand All @@ -72,7 +72,7 @@
"contribution" : [ {
"agent" : {
"id" : "https://d-nb.info/gnd/116002468",
"label" : "Stolterfoth, Adelheid ¬von¬ / 1800-1875",
"label" : "Stolterfoth, Adelheid von / 1800-1875",
"type" : [ "Person" ]
},
"role" : {
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-5.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"contribution" : [ {
"agent" : {
"id" : "http://rpb.lobid.org/sw/00Pn01k18192455a",
"label" : "Reumont, Alfred ¬von¬",
"label" : "Reumont, Alfred von",
"type" : [ "Person" ]
},
"role" : {
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-81.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}, {
"agent" : {
"id" : "http://rpb.lobid.org/sw/00Pn93k0040c",
"label" : "Wijnpersse, Hildegard ¬van de¬",
"label" : "Wijnpersse, Hildegard van de",
"type" : [ "Person" ]
},
"role" : {
Expand Down
2 changes: 1 addition & 1 deletion conf/output/test-output-9.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"contribution" : [ {
"agent" : {
"id" : "http://rpb.lobid.org/sw/00Pn01k18192455a",
"label" : "Reumont, Alfred ¬von¬",
"label" : "Reumont, Alfred von",
"type" : [ "Person" ]
},
"role" : {
Expand Down
10 changes: 10 additions & 0 deletions conf/rpb-titel-to-lobid.fix
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,16 @@ do list_as(citation: "bibliographicCitation[]")
move_field("fullLabel", "bibliographicCitation.$append")
end

# containedIn - For articles we should move hbzId of parent records to containedIn since they are not the article records hbzId

if any_equal("type[]", "Article")
if exists("hbzId")
paste("containedIn[].$append.id","~https://lobid.org/resources/","hbzId","~#!", join_char:"")
remove_field("hbzId")
end
end


uniq("containedIn[]")
join_field("bibliographicCitation", "; ")

Expand Down
Loading