Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 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
10 changes: 5 additions & 5 deletions src/main/resources/alma/alma.fix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ do once("setup")
put_var("member", "-")
end

# Skip all deleted records
if any_equal("DEL??.a", "Y")
reject()
end

# Helper element that states if a record is part of the hbz NZ
if any_equal("MBD .M", "49HBZ_NETWORK")
if any_match("POR .A", ".*")
Expand Down Expand Up @@ -83,6 +78,11 @@ if exists("@inNZ") # only NZ resources no local IZ resources
end
end

# Mark all deleted records in the title
if any_equal("DEL??.a", "Y")
prepend("title","__DELETED__")
end

vacuum()
retain(
"@context",
Expand Down
68 changes: 68 additions & 0 deletions src/test/resources/alma-fix/99372782131506441.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"@context" : "http://lobid.org/resources/context.jsonld",
"id" : "http://lobid.org/resources/99372782131506441#!",
"type" : [ "BibliographicResource", "Book" ],
"medium" : [ {
"label" : "Online-Ressource",
"id" : "http://rdaregistry.info/termList/RDACarrierType/1018"
} ],
"title" : "__DELETED__Discussion Draft Legislation to Amend and Reauthorize the Native American Housing Assistance and Self-Determination Act: Hearing before the Committee on Indian Affairs, United States Senate, One Hundred Tenth Congress, First Session",
"almaMmsId" : "99372782131506441",
"alternativeTitle" : [ "Discussion Draft Legislation to Amend and Reauthorize the Native American Housing Assistance and Self-Determination Act" ],
"publication" : [ {
"type" : [ "PublicationEvent" ],
"location" : [ "Washington" ],
"startDate" : "2008",
"status" : {
"id" : "http://id.loc.gov/vocabulary/mstatus/u",
"label" : "unbekannt"
}
} ],
"describedBy" : {
"id" : "http://lobid.org/resources/99372782131506441",
"label" : "Webseite der hbz-Ressource 99372782131506441",
"type" : [ "BibliographicDescription" ],
"inDataset" : {
"id" : "http://lobid.org/resources/dataset#!",
"label" : "lobid-resources – Der hbz-Verbundkatalog als Linked Open Data"
},
"resultOf" : {
"type" : [ "CreateAction" ],
"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/99372782131506441",
"dateCreated" : "2023-10-17",
"type" : [ "DataFeedItem" ],
"label" : "hbz-Ressource 99372782131506441 im Exportformat MARC21 XML",
"inDataset" : {
"id" : "https://datahub.io/dataset/hbz_unioncatalog",
"label" : "hbz_unioncatalog"
}
}
},
"license" : [ {
"id" : "http://creativecommons.org/publicdomain/zero/1.0",
"label" : "Creative Commons-Lizenz CC0 1.0 Universal"
} ]
},
"sameAs" : [ {
"id" : "https://hub.culturegraph.org/resource/(DE-605)99372782131506441",
"label" : "Culturegraph-Ressource"
} ],
"related" : [ {
"isbn" : [ "9780160805066", "0160805066" ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/eng",
"label" : "Englisch"
} ],
"bibliographicLevel" : {
"label" : "Monograph/Item",
"id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Monograph_Item"
}
}
30 changes: 30 additions & 0 deletions src/test/resources/alma-fix/99372782131506441.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<record>
<datafield tag="DEL" ind1="-" ind2="1">
<subfield code="a">Y</subfield>
</datafield>
<leader>-----dam-a22-----z--4500</leader>
<controlfield tag="001">99372782131506441</controlfield>
<controlfield tag="008">231017u2008uuuuuuuuu-|-o----u|----|eng-d</controlfield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(CKB)4920000000790685</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(EXLCZ)994920000000790685</subfield>
</datafield>
<datafield tag="245" ind1="0" ind2="0">
<subfield code="a">Discussion Draft Legislation to Amend and Reauthorize the Native American Housing Assistance and Self-Determination Act: Hearing before the Committee on Indian Affairs, United States Senate, One Hundred Tenth Congress, First Session</subfield>
</datafield>
<datafield tag="246" ind1=" " ind2=" ">
<subfield code="a">Discussion Draft Legislation to Amend and Reauthorize the Native American Housing Assistance and Self-Determination Act</subfield>
</datafield>
<datafield tag="260" ind1=" " ind2=" ">
<subfield code="a">Washington</subfield>
</datafield>
<datafield tag="776" ind1=" " ind2=" ">
<subfield code="z">0-16-080506-6</subfield>
</datafield>
<datafield tag="906" ind1=" " ind2=" ">
<subfield code="a">BOOK</subfield>
</datafield>
</record>
Loading