Skip to content

Commit

Permalink
Change data factory implementation to check arguments to getOWLObject…
Browse files Browse the repository at this point in the history
…InverseOf to make sure that it is an OWLObjectProperty, and not an OWLObjectInverseOf.

The method signature should be changed instead in version 5
  • Loading branch information
sesuncedu committed Aug 16, 2015
1 parent bceed53 commit c15537e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,9 @@ public OWLSymmetricObjectPropertyAxiom getOWLSymmetricObjectPropertyAxiom(
public OWLObjectInverseOf getOWLObjectInverseOf(
OWLObjectPropertyExpression property) {
checkNotNull(property, "property cannot be null");
if(!(property instanceof OWLObjectProperty)) {
throw new IllegalArgumentException("ObjectInverseOf can only be applied to Object Properties");
}
return new OWLObjectInverseOfImpl(property);
}

Expand Down

0 comments on commit c15537e

Please sign in to comment.