You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Bahador(reza)? OFOGHI" <br...@yahoo.com> on 2013/06/27 06:13:42 UTC

updating parts of an ontology

Hi,
 
I have a super ontology that includes some sub-ontologies with a subClassOf relationship between a node of the super ontology and the root of the sub-ontology in each case.
 
My question is: if I want to update a sub-ontology, can I remove() the root of that sub-ontology from the super ontology and just add the new version again? Will a call of remove() actually remove the whole sub-ontology from the main super ontology or just that root node of the sub-ontology?
 
thanks,
BO

Re: updating parts of an ontology

Posted by Dave Reynolds <da...@gmail.com>.
On 27/06/13 05:13, Bahador(reza)? OFOGHI wrote:
> Hi,
>
> I have a super ontology that includes some sub-ontologies with a subClassOf relationship between a node of the super ontology and the root of the sub-ontology in each case.
>
> My question is: if I want to update a sub-ontology, can I remove() the root of that sub-ontology from the super ontology and just add the new version again? Will a call of remove() actually remove the whole sub-ontology from the main super ontology or just that root node of the sub-ontology?

The latter, OntResource#remove just removes all RDF statements that 
refer to that resource, it does not traverse the OWL graph.

Indeed ontologies need not be trees so the notion of a root sub-ontology 
may not be straight forward.

Dave