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

Fix contribution transformation #1954

Merged
merged 1 commit into from
Apr 2, 2024
Merged
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
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" ]
Copy link
Member

Choose a reason for hiding this comment

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

Strange - this build succesfully with GitHub actions first - but after merging it fails because it expects [ "New York" ] (i.e. without colon).

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay it seems that the commit was not okay, I did no good review here.

For an better approach we should add the new test file in a separate first commit, if there is none yet.
In the later commit we should add the code changes and include the changes in the test to highlight the reaction.

} ],
"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#!"
}
142 changes: 142 additions & 0 deletions src/test/resources/alma-fix/99371463467006441.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<record>
<leader>02677nam a2200349 i 4500</leader>
<controlfield tag="001">99371463467006441</controlfield>
<controlfield tag="005">20231207044322.0</controlfield>
<controlfield tag="006">m o d </controlfield>
<controlfield tag="007">cr#|||||||||||</controlfield>
<controlfield tag="008">230605s1929 nyua o 000 0 eng d</controlfield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(CKB)3710000000431813</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(NjHacI)993710000000431813</subfield>
</datafield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="a">(EXLCZ)993710000000431813</subfield>
</datafield>
<datafield tag="040" ind1=" " ind2=" ">
<subfield code="a">NjHacI</subfield>
<subfield code="b">eng</subfield>
<subfield code="e">rda</subfield>
<subfield code="c">NjHacl</subfield>
</datafield>
<datafield tag="050" ind1=" " ind2="4">
<subfield code="a">HM251</subfield>
<subfield code="b">.S544 1929</subfield>
</datafield>
<datafield tag="082" ind1="0" ind2="4">
<subfield code="a">302</subfield>
<subfield code="2">23</subfield>
</datafield>
<datafield tag="100" ind1="1" ind2=" ">
<subfield code="a">Sheffield, Alfred Dwight,</subfield>
<subfield code="d">1871-1961.,</subfield>
<subfield code="d">Sheffield, Alfred Dwight,</subfield>
<subfield code="d">1871-1961.,</subfield>
<subfield code="e">author.</subfield>
</datafield>
<datafield tag="245" ind1="1" ind2="0">
<subfield code="a">Training for group experience :</subfield>
<subfield code="b">A syllabus of materials from a laboratory course for group leaders given at Columbia University in 1927 /</subfield>
<subfield code="c">Alfred Dwight Sheffield, Harrison Sacket Elliot.</subfield>
</datafield>
<datafield tag="246" ind1=" " ind2=" ">
<subfield code="a">Training for group experience</subfield>
</datafield>
<datafield tag="264" ind1=" " ind2="1">
<subfield code="a">New York :</subfield>
<subfield code="b">Inquiry,</subfield>
<subfield code="c">1929.</subfield>
</datafield>
<datafield tag="300" ind1=" " ind2=" ">
<subfield code="a">1 online resource (xv, 105 pages) :</subfield>
<subfield code="b">diagrams.</subfield>
</datafield>
<datafield tag="336" ind1=" " ind2=" ">
<subfield code="a">text</subfield>
<subfield code="b">txt</subfield>
<subfield code="2">rdacontent</subfield>
</datafield>
<datafield tag="337" ind1=" " ind2=" ">
<subfield code="a">computer</subfield>
<subfield code="b">c</subfield>
<subfield code="2">rdamedia</subfield>
</datafield>
<datafield tag="338" ind1=" " ind2=" ">
<subfield code="a">online resource</subfield>
<subfield code="b">cr</subfield>
<subfield code="2">rdacarrier</subfield>
</datafield>
<datafield tag="490" ind1="0" ind2=" ">
<subfield code="a">PsychBooks Collection</subfield>
</datafield>
<datafield tag="588" ind1=" " ind2=" ">
<subfield code="a">Description based on print version record.</subfield>
</datafield>
<datafield tag="520" ind1=" " ind2=" ">
<subfield code="a">"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).</subfield>
</datafield>
<datafield tag="505" ind1="0" ind2=" ">
<subfield code="a">The general plan of the course -- Group problems brought into the course -- Discussion as the redirection of experience -- Outlining a training course for group leaders.</subfield>
</datafield>
<datafield tag="650" ind1=" " ind2="0">
<subfield code="a">Social psychology.</subfield>
</datafield>
<datafield tag="650" ind1=" " ind2="0">
<subfield code="a">Clubs.</subfield>
</datafield>
<datafield tag="650" ind1=" " ind2="0">
<subfield code="a">Social groups.</subfield>
</datafield>
<datafield tag="700" ind1="1" ind2=" ">
<subfield code="a">Elliott, Harrison S.</subfield>
<subfield code="q">(Harrison Sacket),</subfield>
<subfield code="d">1882-1951,</subfield>
<subfield code="e">author.</subfield>
</datafield>
<datafield tag="906" ind1=" " ind2=" ">
<subfield code="a">BOOK</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_NETWORK</subfield>
<subfield code="i">99371463467006441</subfield>
<subfield code="n">HBZ Network</subfield>
</datafield>
<datafield tag="MBD" ind1=" " ind2=" ">
<subfield code="M">49HBZ_ULM</subfield>
<subfield code="i">991044879075206449</subfield>
<subfield code="n">Universität Münster</subfield>
</datafield>
<datafield tag="MNG" ind1=" " ind2=" ">
<subfield code="c">system</subfield>
<subfield code="f">CKB</subfield>
<subfield code="i">marc21</subfield>
<subfield code="e">false</subfield>
<subfield code="d">2023-12-22 23:47:20 Europe/Berlin</subfield>
<subfield code="g">993710000000431813</subfield>
<subfield code="a">CKB</subfield>
<subfield code="b">2022-07-29 16:37:46 Europe/Berlin</subfield>
</datafield>
<datafield tag="POR" ind1=" " ind2=" ">
<subfield code="j">EBSCOhost</subfield>
<subfield code="x">System</subfield>
<subfield code="a">53640736510006449</subfield>
<subfield code="M">49HBZ_ULM</subfield>
<subfield code="p">61631841780006449</subfield>
<subfield code="q">Lizenz (befr.) - EBSCOhost APA PsycBooks</subfield>
<subfield code="c">param</subfield>
<subfield code="o">613170000000000192</subfield>
<subfield code="y">2022-07-29 16:31:40 Europe/Berlin</subfield>
<subfield code="w">2022-07-29 16:31:39 Europe/Berlin</subfield>
<subfield code="D">https://eu04.alma.exlibrisgroup.com/view/uresolver/49HBZ_NETWORK/openurl?u.ignore_date_coverage=true&amp;portfolio_pid=53640736510006449&amp;Force_direct=true</subfield>
<subfield code="v">System</subfield>
<subfield code="z">2022-07-29 14:31:39</subfield>
<subfield code="i">false</subfield>
<subfield code="S">62631841770006449</subfield>
<subfield code="d">https://hbz-network.userservices.exlibrisgroup.com/view/uresolver/49HBZ_NETWORK/openurl?u.ignore_date_coverage=true&amp;rft.mms_id=991044879075206449</subfield>
<subfield code="b">Available</subfield>
<subfield code="f">BOOK</subfield>
<subfield code="8">53640736510006449</subfield>
</datafield>
</record>
Loading