I created an ontology with different prefixes (rdf:
, rdfs:
, owl:
, example:
, car:
, bike:
, ...). I use them to demarcate different domains and examples.
A small extract:
car:Software rdf:type demo:CyberObject.
car:Hardware rdf:type spdm:PhysicalObject.
car:Software car:hasMaturity "ten".
car:Hardware demo:isProducedIn loc:NorthPole.
Is there any way to change a PREFIX
"car:
" to, e.g., "plane:
", and keep the relations:
plane:Software rdf:type demo:CyberObject.
plane:Hardware rdf:type spdm:PhysicalObject.
plane:Software plane:hasMaturity "ten".
plane:Hardware demo:isProducedIn loc:NorthPole.
I still need all the relations. The objects with PREFIX
"car:
" do not have to be replaced; it would be enough to create new ones with the new PREFIX
and keep the old object in the database..
Thank you for any advice!
Replace prefixes in subjects, predicates and objects successively.
Not tested in Allegrograph, and possibly there exist Allegrоgraph-specific solutions.
Update
Then do not replace prefixes in objects. However, keep in mind that an object in one triple can be a subject in another triple.
"Standalone" URIs are not stored in triplestore.