New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triggering an update of the cached edges in OWLGraphWrapper #49
Comments
From TheITGuy...@gmail.com on February 06, 2013 06:17:34 Of note, cacheEdges() does not trigger an update of the cached edges. |
From HDie...@lbl.gov on February 07, 2013 09:09:19 There is now a new method clearCachedEdges() in OWLGraphWrapper, see r1122 . Please, can you verify that this is sufficient for your tasks. Status: Started |
From TheITGuy...@gmail.com on February 07, 2013 15:16:45 It does not seem to work :/ Of note, my previous sample code was incorrect, to reproduce the problem, getEdgesBetween must have been called before the creation of a new relation. So, by introducing the new clearCachedEdges() method, the sample code becomes: myWrapper.getEdgesBetween(myClass, myClass2);//just to trigger the cache OWLSubClassOfAxiom ax = factory.getOWLSubClassOfAxiom(myClass, myClass2); for (OWLGraphEdge edge: myWrapper.getEdgesBetween(myClass, myClass2)) { |
From HDie...@lbl.gov on February 07, 2013 16:11:11 Thank you for testing. |
From TheITGuy...@gmail.com on February 07, 2013 16:21:13 Now it works, thank you. |
From HDie...@lbl.gov on February 07, 2013 16:27:43 Hello, there is the Config object for OWLGraphWrapper#getConfig() |
From TheITGuy...@gmail.com on February 07, 2013 16:30:02 Oh OK, thank you for the info. I guess I will use clearCachedEdges() until then. |
From TheITGuy...@gmail.com on February 06, 2013 06:13:25
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
}
Original issue: http://code.google.com/p/owltools/issues/detail?id=49
The text was updated successfully, but these errors were encountered: