NatLibFi / bib-rdf-pipeline

Scripts and configuration for converting MARC bibliographic records into RDF
Creative Commons Zero v1.0 Universal
29 stars 5 forks source link

Don't create work keys for works that are just bnodes (e.g. 490 with ISSN, without 830) #99

Closed osma closed 5 years ago

osma commented 5 years ago

This PR fixes a problem that surfaced after the marc2bibframe2 upgrade to v1.5.0. A record which has a 490 series statement with an ISSN, but no corresponding 830, caused an anonymous (bnode) bf:Work to be created, which was then given a work key. The result was that works would sometimes be assigned a URI which was actually a blank node identifier in disguise (e.g. <:B0474c256fdd984f0514c0d464ed7061>)

This PR avoids the issue by not coining work keys for bnode works. In practice such series statements (490 without 830) are ignored entirely, as in the BIBFRAME output will not contain the series titles and thus they will not be converted to schema.org at all.