Skip to content

Commit

Permalink
Fix contributions with multiple $d #1952
Browse files Browse the repository at this point in the history
Co-authored-by: Petra Maier <[email protected]>
  • Loading branch information
TobiasNx and Petra Maier committed Apr 2, 2024
1 parent da319c5 commit f7d511b
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/resources/alma/fix/contribution.fix
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ do list(path:"100[01] ", "var":"$i")
# role
copy_field("$j","contribution[].$last.role.id")
# dateOfBirthAndDeath #will be split on a later stage
copy_field("$i.d","contribution[].$last.agent.dateOfBirthAndDeath")
unless exists("$i.d.1")
copy_field("$i.d","contribution[].$last.agent.dateOfBirthAndDeath")
end
call_macro("alternateGraphicRepresationArrayOfObjects",targetArray:"contribution[]",targetField:".agent",variable:"$i")
end
end
Expand Down Expand Up @@ -112,7 +114,9 @@ do list(path:"700[01] ", "var":"$i")
# role
copy_field("$j","contribution[].$last.role.id")
# dateOfBirthAndDeath #will be split on a later stage
copy_field("$i.d","contribution[].$last.agent.dateOfBirthAndDeath")
unless exists("$i.d.1")
copy_field("$i.d","contribution[].$last.agent.dateOfBirthAndDeath")
end
call_macro("alternateGraphicRepresationArrayOfObjects",targetArray:"contribution[]",targetField:".agent",variable:"$i")
end
end
Expand Down
138 changes: 138 additions & 0 deletions src/test/resources/alma-fix/99371463467006441.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"@context" : "http://lobid.org/resources/context.jsonld",
"almaMmsId" : "99371463467006441",
"title" : "Training for group experience",
"alternativeTitle" : [ "Training for group experience" ],
"otherTitleInformation" : [ "A syllabus of materials from a laboratory course for group leaders given at Columbia University in 1927" ],
"publication" : [ {
"startDate" : "1929",
"type" : [ "PublicationEvent" ],
"location" : [ "New York" ],
"publishedBy" : [ "Inquiry" ]
} ],
"describedBy" : {
"id" : "http://lobid.org/resources/99371463467006441",
"label" : "Webseite der hbz-Ressource 99371463467006441",
"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/99371463467006441",
"dateCreated" : "2022-07-29",
"dateModified" : "2023-12-22",
"type" : [ "DataFeedItem" ],
"label" : "hbz-Ressource 99371463467006441 im Exportformat MARC21 XML",
"inDataset" : {
"id" : "https://datahub.io/dataset/hbz_unioncatalog",
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-NjHacI#!",
"label" : "lobid Organisation"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-NjHacl#!",
"label" : "lobid Organisation"
}
}
},
"license" : [ {
"id" : "http://creativecommons.org/publicdomain/zero/1.0",
"label" : "Creative Commons-Lizenz CC0 1.0 Universal"
} ]
},
"isPartOf" : [ {
"type" : [ "IsPartOfRelation" ],
"hasSuperordinate" : [ {
"label" : "PsychBooks Collection"
} ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/eng",
"label" : "Englisch"
} ],
"extent" : "1 online resource (xv, 105 pages) : diagrams.",
"abstract" : [ "\"Through the Columbia University Extension, accordingly, there was planned a semester of study of group leadership, to be conducted by Professor Harrison S. Elliott and members of the Inquiry staff. The students were to be drawn from the cooperating bodies and were to meet the following requirements : (1) They should show some promise of group leadership. (2) They should secure field work in discussion-leading with groups connected with their own agencies. The course was carried out in the spring semester, February 2 to May 21, 1927, with sixty-eight students. The results of their cooperation have been such that the Inquiry is now under request from many quarters to continue the enterprise as a piece of educational pioneering especially addressed to the complex institutional life of our day. Before committing itself, however, to repeat this special service, the Inquiry offers the present booklet by way of interpreting the project--believing the resources for developing it to be now so promising that other educational agencies will be encouraged to take it up for the scientific advancement of group experience in all parts of the country\"--Preface. (PsycINFO Database Record (c) 2015 APA, all rights reserved)." ],
"subject" : [ {
"type" : [ "Concept" ],
"source" : {
"label" : "Library of Congress Subject Headings",
"id" : "https://id.loc.gov/authorities/subjects.html"
},
"label" : "Social psychology."
}, {
"type" : [ "Concept" ],
"source" : {
"label" : "Library of Congress Subject Headings",
"id" : "https://id.loc.gov/authorities/subjects.html"
},
"label" : "Clubs."
}, {
"type" : [ "Concept" ],
"source" : {
"label" : "Library of Congress Subject Headings",
"id" : "https://id.loc.gov/authorities/subjects.html"
},
"label" : "Social groups."
} ],
"subjectslabels" : [ "Social psychology.", "Clubs.", "Social groups." ],
"hasItem" : [ {
"type" : [ "Item", "DigitalDocument" ],
"label" : "Electronic Portfolio",
"electronicLocator" : "https://eu04.alma.exlibrisgroup.com/view/uresolver/49HBZ_ULM/openurl?u.ignore_date_coverage=true&portfolio_pid=53640736510006449&Force_direct=true",
"sublocation" : "https://hbz-network.userservices.exlibrisgroup.com/view/uresolver/49HBZ_ULM/openurl?u.ignore_date_coverage=true&rft.mms_id=991044879075206449",
"heldBy" : {
"isil" : "DE-6",
"id" : "http://lobid.org/organisations/DE-6#!",
"label" : "Universitäts- und Landesbibliothek Münster, Zentralbibliothek"
},
"seeAlso" : [ "https://hbz-ulbms.primo.exlibrisgroup.com/discovery/search?query=any,contains,99371463467006441&tab=Everything&search_scope=MyInst_and_CI&vid=49HBZ_ULM:VU2&offset=0" ],
"id" : "http://lobid.org/items/99371463467006441:DE-6:53640736510006449#!"
} ],
"medium" : [ {
"label" : "Datenträger",
"id" : "http://rdaregistry.info/termList/RDAMediaType/1003"
}, {
"label" : "Online-Ressource",
"id" : "http://rdaregistry.info/termList/RDACarrierType/1018"
} ],
"bibliographicLevel" : {
"label" : "Monograph/Item",
"id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Monograph_Item"
},
"type" : [ "BibliographicResource", "Book" ],
"responsibilityStatement" : [ "Alfred Dwight Sheffield, Harrison Sacket Elliot." ],
"contribution" : [ {
"agent" : {
"label" : "Sheffield, Alfred Dwight",
"type" : [ "Person" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/aut",
"label" : "Autor/in"
},
"type" : [ "Contribution" ]
}, {
"agent" : {
"label" : "Elliott, Harrison S.",
"type" : [ "Person" ],
"dateOfBirth" : "1882"
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/aut",
"label" : "Autor/in"
},
"type" : [ "Contribution" ]
} ],
"id" : "http://lobid.org/resources/99371463467006441#!"
}

0 comments on commit f7d511b

Please sign in to comment.