euler,fuge,deichman.no: merge literaryFrom into genre
SPARQL migrations:
PREFIX : http://data.deichman.no/ontology# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# WITH https://katalog.deichman.no INSERT { ?g a :Genre ; :prefLabel ?strlabel ; :created ?now ; :modified ?now ; :createdBy https://persons.deichman.no/editor/76b96f3b-f5b1-4375-9d2a-05576ea8f8f0 ; :modifiedBy https://persons.deichman.no/editor/76b96f3b-f5b1-4375-9d2a-05576ea8f8f0 ; :migratedFromLiteraryForm ?f . } WHERE { ?f a http://data.deichman.no/utility#LiteraryForm ; rdfs:label ?label . FILTER(LANG(?label) = "no") BIND(str(?label) AS ?strlabel) BIND(now() AS ?now) BIND(URI(REPLACE(STR(?f), "literaryForm#", "genre/")) AS ?g) }
PREFIX : http://data.deichman.no/ontology# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# WITH https://katalog.deichman.no DELETE { ?r :literaryForm ?f } INSERT { ?r :genre ?g} WHERE { ?r :literaryForm ?f BIND(URI(REPLACE(STR(?f), "literaryForm#", "genre/")) AS ?g) }