From: <owl...@go...> - 2013-02-06 14:13:42
|
Status: New Owner: ---- Labels: Type-Defect Priority-Medium New issue 49 by frederic...@unil.ch: Triggering an update of the cached edges in OWLGraphWrapper http://code.google.com/p/owltools/issues/detail?id=49 Additions/removal of OWLSubClassOfAxiom in an ontology are not seen by the OWLGraphWrapper container. Might be nice to add a method to trigger an update of the cached edges. Example: OWLSubClassOfAxiom ax = factory.getOWLSubClassOfAxiom(myOWLClass1, myOWLClass2); AddAxiom addAx = new AddAxiom(myWrapper.getSourceOntology(), ax); myWrapper.getManager().applyChange(addAx); for (OWLGraphEdge edge: myWrapper.getCompleteEdgesBetween(myClass, myClass2)) { System.out.println(edge);//no edges found here } //force an update, but throw checked Exceptions, and looks like a hack. myWrapper = new OWLGraphWrapper(myWrapper.getSourceOntology()); for (OWLGraphEdge edge: myWrapper.getCompleteEdgesBetween(myClass, myClass2)) { System.out.println(edge);//the edge is correctly displayed } |