On 05/03/13 22:02, David Jordan wrote:
If you have your ontology in its own separate Model, doesn't model.removeAll()
do it?
I understood Mark to be trying to remove individual axioms from within a
Model, not just empty the Model.
For example, if you have declared a class with some associated
restrictions in OWL then you have not just the class resource but a
bunch of bNodes representing the restrictions. So if you want to delete
the class but leave the rest of the ontology intact then you have to
remove not just all properties of the class resource but you also have
to garbage collect the restrictions (though normally restrictions aren't
structured shared so you could just delete them too).
Dave
On Mar 5, 2013, at 4:49 PM, Dave Reynolds wrote:
On 05/03/13 20:20, Mark Fischer wrote:
Is there an easy way to cleanly remove resources from an Ontology?
Currently, I just remove all statements that have the resource present.
This works well enough but I'm worried that it will leave
anonymous superclasses behind.
Yes, it will.
I also wonder if there is a more 'ontology' way of removing things like
classes instead of using the underlying rdf graph directly.
No there's no axiom-level remove operation in Jena, you'll to work with the RDF
graph I'm afraid.
Dave