diff --git a/conf/output/test-output-87.json b/conf/output/test-output-87.json index adbd9a8..c33d2b4 100644 --- a/conf/output/test-output-87.json +++ b/conf/output/test-output-87.json @@ -11,6 +11,13 @@ "title" : "2000 Jahre Meilbrück : vom römischen Tempelbezirk zur modernen Raststätte; Von den Anfängen bis zum Ende der Römerherrschaft", "alternativeTitle" : [ "Zweitausend Jahre Meilbrück" ], "extent" : "Ill.", + "isPartOf" : [ { + "type" : [ "IsPartOfRelation" ], + "hasSuperordinate" : [ { + "id" : "https://lobid.org/resources/121t0146618" + } ], + "numbering" : "1" + } ], "publication" : [ { "startDate" : "1990", "type" : [ "PublicationEvent" ] diff --git a/conf/rpb-titel-to-lobid.fix b/conf/rpb-titel-to-lobid.fix index c7fdf73..7c6f668 100644 --- a/conf/rpb-titel-to-lobid.fix +++ b/conf/rpb-titel-to-lobid.fix @@ -157,6 +157,14 @@ if exists("inSeries[]") set_array("isPartOf[]") move_field("inSeries[].*", "isPartOf[].$append") end +if exists("volumeIn") + unless any_equal("type", "Band") # not for Allegro + unless exists("isPartOf[]") + set_array("isPartOf[]") + end + move_field("volumeIn", "isPartOf[].$append") + end +end if exists("isPartOf[]") unless any_equal("type", "Band") # also sets isPartOf set_array("temp") @@ -173,8 +181,16 @@ if exists("isPartOf[]") copy_field("$i.numbering", "temp.$last.numbering") else split_field("$i.value", " ; ") - copy_field("$i.value.1", "temp.$last.hasSuperordinate[].$append.label") - copy_field("$i.value.2", "temp.$last.numbering") + if all_match("$i.value", "^http.+") + copy_field("$i.value", "temp.$last.hasSuperordinate[].$append.id") + else + copy_field("$i.value.1", "temp.$last.hasSuperordinate[].$append.label") + end + if exists("$i.numbering") + copy_field("$i.numbering", "temp.$last.numbering") + else + copy_field("$i.value.2", "temp.$last.numbering") + end end end move_field("temp", "isPartOf[]")