Closed GoogleCodeExporter closed 9 years ago
Original comment by frederic...@gmail.com
on 8 Oct 2013 at 6:56
The patch looks sound.
There may be some performance impact, but should be minimal.
My one concern is that there may be code that tests for the existence of a
graph edge - this would fail unless annotations match. This may be counter to
expectations if the programmer is assuming a simple graph model.
An alternative would be to have each edge be aware of the list of axioms that
support the edge. getAnnotations() would iterate through these and return the
union. Here there would be no change in identity conditions for an edge. Edges
would only be distinsguished if they were logically different.
Would this work for your use case?
Original comment by cmung...@gmail.com
on 21 Oct 2013 at 6:05
This issue was updated by revision r1658.
Original comment by cmung...@gmail.com
on 22 Oct 2013 at 2:47
There is the containsAxiomIgnoreAnnotations and getAxiomsIgnoreAnnotations
methods to test for existence.
But I like your idea to avoid getting "duplicated" edges. I could then use
methods such as getOWLAxioms and getSubClassOfAxioms, implemented in
OWLGraphEdge. I would go for that solution.
(just to mention that I was not interested in getting the annotations in the
first place, but in getting the proper underlying axioms)
Original comment by frederic...@gmail.com
on 22 Oct 2013 at 3:29
Hi, here are my proposed modifications to implement your suggestion, see diff
file attached. Note that this would also fix issue #66.
The only change that could impact existing code, is that the methods
OWLGraphEdge#hashCode() and OWLGraphEdge#equals(Object) now take into account
the `ontology` attribute. Otherwise, these modifications should be invisible
from the API point of view. All unit tests passed without failure.
The reason for this change is that, as different ontologies could potentially
contain structurally equivalent axioms, a same OWLGraphEdge could store
OWLAxioms not applicable to its `ontology` attribute.
An alternative would be to allow a same OWLGraphEdge to be associated to
different ontologies, but that would change the signature of the class a lot...
(getOntologies() vs. getOntology(), etc).
So, as a result, two structurally equivalent axioms in 2 different ontologies
would generate two OWLGraphEdges, not only one as today. It doesn't sound like
a big deal to me.
Let me know what you think! (BTW, it's the first time that I come to understand
how the getOutgoingEdges method really work, I feel a bit ashamed, I never
noticed that the final OWLGraphEdges returned were produced recursively :/)
Original comment by frederic...@gmail.com
on 16 Nov 2013 at 1:02
Attachments:
Modifications accepted, see revision r1764. Issue closed.
Original comment by frederic...@gmail.com
on 20 Nov 2013 at 8:41
Original issue reported on code.google.com by
frederic...@gmail.com
on 8 Oct 2013 at 2:42Attachments: