Skip to content
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

Shouldn't combinedQuantifiedPropertyPair combine properties over super properties? #65

Closed
ShahimEssaid opened this issue Feb 2, 2015 · 2 comments

Comments

@ShahimEssaid
Copy link

From frederic...@gmail.com on May 28, 2013 16:07:59

I was wondering whether the method OWLGraphWrapperEdges.combinedQuantifiedPropertyPair should combine OWLQuantifiedProperty over transitive super properties (so that combineEdgePair combines this kind of relations), e.g.:

transformation_of o develops_from -> develops_from
(currently, those would not be combined)

The code modification could be something along the line:

...
else if (x.isSomeValuesFrom() &&
y.isSomeValuesFrom() &&
(getSuperPropertyClosureOf(x.getProperty()).contains(y.getProperty()) ||
getSuperPropertyClosureOf(y.getProperty()).contains(x.getProperty()))) {

//also check for transitivity
...
}
...

This test could be performed just before the test using the "chain" method, and should also check for the transitivity of the common super property (and should be optimized :p)

What do you think?

Original issue: http://code.google.com/p/owltools/issues/detail?id=65

@ShahimEssaid
Copy link
Author

From frederic...@gmail.com on May 29, 2013 07:00:01

I wrote a method to combine properties over super properties (see attached file).

In case you don't think it is appropriate to modify combinedQuantifiedPropertyPair, could I kindly request the following changes to keep using my own method?

  • could combinedQuantifiedPropertyPair be made public?
  • could getSuperPropertyClosureOf return a LinkedHashSet raster than a Set, so that super properties are ordered from the more precise one to the more general one?
  • could getSuperPropertyReflexiveClosureOf return a LinkedHashSet raster than a Set, where the source property is the first element, not the last one?
  • In getOWLGraphEdgeSubsumers, there is a piece of code useful when creating a new OWLQuantifiedProperty. Could you externalize that code in a public method?

if (pe.equals(this.getDataFactory().getOWLTopObjectProperty()))
continue;
if (pe instanceof OWLObjectProperty) {
OWLQuantifiedProperty newQp = new OWLQuantifiedProperty(pe, qp.getQuantifier());
if (!isExcluded(newQp)) {
superQps.add(newQp);
}
}

  • or alternatively, could you make public the method isExcluded?

Thanks a lot, let me know what you think.

Attachment: combine.java

@ShahimEssaid
Copy link
Author

From frederic...@gmail.com on November 20, 2013 12:45:27

The class owltools.graph.OWLGraphWrapperEdgesExtended now implements these features.

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant