linikujp / owltools

Automatically exported from code.google.com/p/owltools
0 stars 0 forks source link

Methods get...Edges return OWLGraphEdges with no ontology attribute set #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 

OWLGraphEdges returned by method such as getIncomingEdges or getOutgoingEdges 
have no ontology set (getOntology() returns null).

This is problematic when trying to remove or add axioms based on such 
OWLGraphEdges. For instance: 

OWLSubClassOfAxiom ax = factory.getOWLSubClassOfAxiom((OWLClassExpression) 
edge.getSource(), (OWLClassExpression) edgeToTargetExpression(edge));
RemoveAxiom remove = new RemoveAxiom(edge.getOntology(), ax);
manager.applyChange(remove);
//fail with exception: 
//org.semanticweb.owlapi.model.ImmutableOWLOntologyChangeException: Cannot 
apply changes to immutable ontology: null

It would be great if the returned OWLGraphEdges had their ontology attribute 
set. 

Original issue reported on code.google.com by frederic...@gmail.com on 31 May 2013 at 1:39

GoogleCodeExporter commented 9 years ago
Fixed by revision r1764.

Original comment by frederic...@gmail.com on 20 Nov 2013 at 8:42