Dear Anne,
this is a possible SPARQL UPDATE to
move the skos labels (skos:prefLabel and skos:altLabel) from a
SOURCE_CONCEPT to a TARGET_CONCEPT concept created in VocBench
(you need to replace the SOURCE_CONCEPT and TARGET_CONCEPT) with
their IRI:
PREFIX skos:
<http://www.w3.org/2004/02/skos/core#>
DELETE {
GRAPH ?graph {
?sourceConcept skos:prefLabel ?prefLabel .
?sourceConcept skos:altLabel ?altLabel .
}
}
INSERT {
GRAPH ?graph {
?targetConcept skos:prefLabel ?prefLabel .
?targetConcept skos:altLabel ?altLabel .
}
}
WHERE {
GRAPH ?graph {
BIND ( <SOURCE_CONCEPT> AS ?sourceConcept)
BIND ( <TARGET_CONCEPT> AS ?targetConcept)
?sourceConcept skos:prefLabel ?prefLabel .
OPTIONAL {
?sourceConcept skos:altLabel ?altLabel .
}
}
}
Just a couple of warnings:
1) if you are executing this query on a
VocBench project having Validation active, be sure that ALL the
labels of the SOURCE_CONCEPT have been already validated
(otherwise there could be problems since using SPARQL UPDATE you
are de facto bypassing the validation mechanism provided by
VocBench)
2) if the TARGET_CONCEPT already has
any prefLabel, then after this SPARQL UPDATE such concept will
have multiple prefLabel, so you'll need to manually fix this
3) I placed the skos:altLabel of the
WHERE in an OPTIONAL part, to avoid problems if the SOURCE_CONCEPT
does not have any altLabel
4) this SPARQL UPDATE only
remove/create the skos:prefLabel and skos:altLabel, if you need to
deal with other porperties you need to change the query
accordingly
Let me know if this is what you were
looking for.
Andrea