Skip to content

Commit

Permalink
Improve binary compatibility to OWL API 5.x; Address #48
Browse files Browse the repository at this point in the history
Make some fixes to ensure that ELK jar compiled with
OWL API 4.x works with OWL API 5.x
  • Loading branch information
ykazakov committed Jan 26, 2018
1 parent 0b72417 commit b24a138
Show file tree
Hide file tree
Showing 41 changed files with 132 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public ElkAnnotationAssertionAxiomWrap(T owlAxiom) {

@Override
public ElkAnnotationSubject getSubject() {
return converter.convert(owlObject.getSubject());
return converter.convert(getSubject(owlObject));
}

@Override
public ElkAnnotationProperty getProperty() {
return converter.convert(owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
* the type of the wrapped object
*/
public class ElkAnnotationPropertyDomainAxiomWrap<T extends OWLAnnotationPropertyDomainAxiom>
extends ElkAnnotationAxiomWrap<T> implements
ElkAnnotationPropertyDomainAxiom {
extends ElkAnnotationAxiomWrap<T>
implements ElkAnnotationPropertyDomainAxiom {

public ElkAnnotationPropertyDomainAxiomWrap(
T owlAnnotationPropertyDomainAxiom) {
Expand All @@ -51,12 +51,12 @@ public ElkAnnotationPropertyDomainAxiomWrap(

@Override
public ElkAnnotationProperty getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
public ElkIri getDomain() {
return converter.convert(this.owlObject.getDomain());
return converter.convert(getDomain(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,22 @@
* the type of the wrapped object
*/
public class ElkAnnotationPropertyRangeAxiomWrap<T extends OWLAnnotationPropertyRangeAxiom>
extends ElkAnnotationAxiomWrap<T> implements
ElkAnnotationPropertyRangeAxiom {
extends ElkAnnotationAxiomWrap<T>
implements ElkAnnotationPropertyRangeAxiom {

public ElkAnnotationPropertyRangeAxiomWrap(T owlAnnotationPropertyRangeAxiom) {
public ElkAnnotationPropertyRangeAxiomWrap(
T owlAnnotationPropertyRangeAxiom) {
super(owlAnnotationPropertyRangeAxiom);
}

@Override
public ElkAnnotationProperty getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
public ElkIri getRange() {
return converter.convert(this.owlObject.getRange());
return converter.convert(getRange(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public ElkAnnotationWrap(T annotation) {

@Override
public ElkAnnotationProperty getProperty() {
return converter.convert(owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ElkAsymmetricObjectPropertyAxiomWrap(

@Override
public ElkObjectPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@
* @param <T>
* the type of the wrapped object
*/
public class ElkDataAllValuesFromWrap<T extends OWLDataAllValuesFrom> extends
ElkClassExpressionWrap<T> implements ElkDataAllValuesFrom {
public class ElkDataAllValuesFromWrap<T extends OWLDataAllValuesFrom>
extends ElkClassExpressionWrap<T> implements ElkDataAllValuesFrom {

public ElkDataAllValuesFromWrap(T owlDataAllValuesFrom) {
super(owlDataAllValuesFrom);
}

@Override
public List<? extends ElkDataPropertyExpression> getDataPropertyExpressions() {
return Collections.singletonList(converter.convert(owlObject
.getProperty()));
return Collections
.singletonList(converter.convert(getProperty(owlObject)));
}

@Override
public ElkDataRange getDataRange() {
return converter.convert(owlObject.getFiller());
return converter.convert(getFiller(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ElkDataExactCardinalityQualifiedWrap(T owlDataExactCardinality) {

@Override
public ElkDataRange getFiller() {
return converter.convert(this.owlObject.getFiller());
return converter.convert(getFiller(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@
* the type of the wrapped object
*/
public class ElkDataExactCardinalityUnqualifiedWrap<T extends OWLDataExactCardinality>
extends ElkClassExpressionWrap<T> implements
ElkDataExactCardinalityUnqualified {
extends ElkClassExpressionWrap<T>
implements ElkDataExactCardinalityUnqualified {

public ElkDataExactCardinalityUnqualifiedWrap(T owlDataExactCardinality) {
super(owlDataExactCardinality);
}

@Override
public int getCardinality() {
return this.owlObject.getCardinality();
return getCardinality(owlObject);
}

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
* @param <T>
* the type of the wrapped object
*/
public class ElkDataHasValueWrap<T extends OWLDataHasValue> extends
ElkClassExpressionWrap<T> implements ElkDataHasValue {
public class ElkDataHasValueWrap<T extends OWLDataHasValue>
extends ElkClassExpressionWrap<T> implements ElkDataHasValue {

public ElkDataHasValueWrap(T owlDataHasValue) {
super(owlDataHasValue);
}

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
public ElkLiteral getFiller() {
return converter.convert(this.owlObject.getFiller());
return converter.convert(getFiller(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ElkDataMaxCardinalityQualifiedWrap(T owlDataMaxCardinality) {

@Override
public ElkDataRange getFiller() {
return converter.convert(this.owlObject.getFiller());
return converter.convert(getFiller(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public ElkDataMaxCardinalityUnqualifiedWrap(T owlDataMaxCardinality) {

@Override
public int getCardinality() {
return this.owlObject.getCardinality();
return getCardinality(owlObject);
}

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ElkDataMinCardinalityQualifiedWrap(T owlDataMinCardinality) {

@Override
public ElkDataRange getFiller() {
return converter.convert(this.owlObject.getFiller());
return converter.convert(getFiller(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public ElkDataMinCardinalityUnqualifiedWrap(T owlDataMinCardinality) {

@Override
public int getCardinality() {
return this.owlObject.getCardinality();
return getCardinality(owlObject);
}

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ public ElkDataPropertyAssertionAxiomWrap(T owlObjectPropertyAssertionAxiom) {

@Override
public ElkIndividual getSubject() {
return converter.convert(this.owlObject.getSubject());
return converter.convert(getSubject(owlObject));
}

@Override
public ElkLiteral getObject() {
return converter.convert(this.owlObject.getObject());
return converter.convert(getObject(owlObject));
}

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public ElkDataPropertyDomainAxiomWrap(T owlDataPropertyDomainAxiom) {

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
public ElkClassExpression getDomain() {
return converter.convert(this.owlObject.getDomain());
return converter.convert(getDomain(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public ElkDataPropertyRangeAxiomWrap(T owlDataPropertyRangeAxiom) {

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
public ElkDataRange getRange() {
return converter.convert(this.owlObject.getRange());
return converter.convert(getRange(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ public ElkDataSomeValuesFromWrap(T owlDataSomeValuesFrom) {

@Override
public List<? extends ElkDataPropertyExpression> getDataPropertyExpressions() {
return Collections.singletonList(converter.convert(owlObject
.getProperty()));
return Collections.singletonList(converter.convert(getProperty(owlObject)));
}

@Override
public ElkDataRange getDataRange() {
return converter.convert(owlObject.getFiller());
return converter.convert(getFiller(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@
* the type of the wrapped object
*/
public class ElkFunctionalDataPropertyAxiomWrap<T extends OWLFunctionalDataPropertyAxiom>
extends ElkDataPropertyAxiomWrap<T> implements
ElkFunctionalDataPropertyAxiom {
extends ElkDataPropertyAxiomWrap<T>
implements ElkFunctionalDataPropertyAxiom {

public ElkFunctionalDataPropertyAxiomWrap(T owlFunctionalDataPropertyAxiom) {
public ElkFunctionalDataPropertyAxiomWrap(
T owlFunctionalDataPropertyAxiom) {
super(owlFunctionalDataPropertyAxiom);
}

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
* the type of the wrapped object
*/
public class ElkFunctionalObjectPropertyAxiomWrap<T extends OWLFunctionalObjectPropertyAxiom>
extends ElkObjectPropertyAxiomWrap<T> implements
ElkFunctionalObjectPropertyAxiom {
extends ElkObjectPropertyAxiomWrap<T>
implements ElkFunctionalObjectPropertyAxiom {

public ElkFunctionalObjectPropertyAxiomWrap(
T owlFunctionalObjectPropertyAxiom) {
Expand All @@ -49,7 +49,7 @@ public ElkFunctionalObjectPropertyAxiomWrap(

@Override
public ElkObjectPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
* the type of the wrapped object
*/
public class ElkInverseFunctionalObjectPropertyAxiomWrap<T extends OWLInverseFunctionalObjectPropertyAxiom>
extends ElkObjectPropertyAxiomWrap<T> implements
ElkInverseFunctionalObjectPropertyAxiom {
extends ElkObjectPropertyAxiomWrap<T>
implements ElkInverseFunctionalObjectPropertyAxiom {

public ElkInverseFunctionalObjectPropertyAxiomWrap(
T owlInverseFunctionalObjectPropertyAxiom) {
Expand All @@ -49,7 +49,7 @@ public ElkInverseFunctionalObjectPropertyAxiomWrap(

@Override
public ElkObjectPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand All @@ -59,7 +59,8 @@ public <O> O accept(ElkObjectPropertyAxiomVisitor<O> visitor) {

@Override
public <O> O accept(ElkPropertyAxiomVisitor<O> visitor) {
return accept((ElkInverseFunctionalObjectPropertyAxiomVisitor<O>) visitor);
return accept(
(ElkInverseFunctionalObjectPropertyAxiomVisitor<O>) visitor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ElkIrreflexiveObjectPropertyAxiomWrap(

@Override
public ElkObjectPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ public ElkNegativeDataPropertyAssertionAxiomWrap(

@Override
public ElkIndividual getSubject() {
return converter.convert(this.owlObject.getSubject());
return converter.convert(getSubject(owlObject));
}

@Override
public ElkLiteral getObject() {
return converter.convert(this.owlObject.getObject());
return converter.convert(getObject(owlObject));
}

@Override
public ElkDataPropertyExpression getProperty() {
return converter.convert(this.owlObject.getProperty());
return converter.convert(getProperty(owlObject));
}

@Override
Expand Down
Loading

0 comments on commit b24a138

Please sign in to comment.