public static OWLObjectHasValue ObjectHasValue(OWLObjectPropertyExpression pe, OWLIndividual individual) { return DF.getOWLObjectHasValue(pe, individual); }
@Override OWLClassExpression expandOWLObjHasVal(OWLObjectHasValue desc, OWLIndividual filler, OWLObjectPropertyExpression p) { OWLClassExpression gciRHS = expandObject(filler, p); if (gciRHS != null) { OWLClassExpression gciLHS = dataFactory.getOWLObjectHasValue(p, filler); OWLEquivalentClassesAxiom ax = dataFactory.getOWLEquivalentClassesAxiom(gciLHS, gciRHS); output(ax); } return gciRHS; }
@Override public void visit(OWLSubObjectPropertyOfAxiom axiom) { // subProp some {a} subClassOf supProp some {a} OWLIndividual ind = dataFactory .getOWLNamedIndividual(IRI.getNextDocumentIRI("http://debugger.com#A")); OWLClassExpression sub = dataFactory.getOWLObjectHasValue(axiom.getSubProperty(), ind); OWLClassExpression sup = dataFactory.getOWLObjectHasValue(axiom.getSuperProperty(), ind); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, sup); ax.accept(this); }
@Override public void visit(OWLSubObjectPropertyOfAxiom axiom) { // subProp some {a} subClassOf supProp some {a} OWLIndividual ind = dataFactory .getOWLNamedIndividual(IRI.getNextDocumentIRI("http://debugger.com#A")); OWLClassExpression sub = dataFactory.getOWLObjectHasValue(axiom.getSubProperty(), ind); OWLClassExpression sup = dataFactory.getOWLObjectHasValue(axiom.getSuperProperty(), ind); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, sup); ax.accept(this); }
@Override public OWLClassExpression visit(OWLNegativeObjectPropertyAssertionAxiom ax) { return df.getOWLObjectComplementOf( df.getOWLObjectHasValue(ax.getProperty(), ax.getObject())); }
@Override public OWLObjectHasValue buildObject() { return df.getOWLObjectHasValue(verifyNotNull(getProperty()), getValue()); }
@Override public OWLClassExpression visit(OWLNegativeObjectPropertyAssertionAxiom ax) { return df.getOWLObjectComplementOf( df.getOWLObjectHasValue(ax.getProperty(), ax.getObject())); }
@Override public OWLObjectHasValue visit(OWLObjectHasValue ce) { return df.getOWLObjectHasValue(get(ce.getProperty()), get(ce.getFiller())); }
public OWLClassExpression visit(OWLObjectHasValue desc) { OWLClassExpression result = null; OWLIndividual filler = desc.getValue(); OWLObjectPropertyExpression p = desc.getProperty(); if (p instanceof OWLObjectProperty) { result = expandOWLObjHasVal(desc, filler, p); } if (result == null) { result = dataFactory.getOWLObjectHasValue(desc.getProperty(), filler); } return result; }
final public OWLClassExpression ObjectHasValue() throws ParseException {OWLObjectPropertyExpression prop; OWLIndividual ind; jj_consume_token(OBJECTHASVALUE); jj_consume_token(OPENPAR); prop = ObjectPropertyExpression(); ind = Individual(); jj_consume_token(CLOSEPAR); return df.getOWLObjectHasValue(prop, ind); }
final public OWLClassExpression ObjectHasValue() throws ParseException {OWLObjectPropertyExpression prop; OWLIndividual ind; jj_consume_token(OBJECTHASVALUE); jj_consume_token(OPENPAR); prop = ObjectPropertyExpression(); ind = Individual(); jj_consume_token(CLOSEPAR); return df.getOWLObjectHasValue(prop, ind); }
final public OWLClassExpression ObjectHasValue() throws ParseException {OWLObjectPropertyExpression prop; OWLIndividual ind; jj_consume_token(OBJECTHASVALUE); jj_consume_token(OPENPAR); prop = ObjectPropertyExpression(); ind = Individual(); jj_consume_token(CLOSEPAR); return df.getOWLObjectHasValue(prop, ind); }
final public OWLClassExpression ObjectHasValue() throws ParseException { OWLObjectPropertyExpression prop; OWLIndividual ind; jj_consume_token(OBJECTHASVALUE); jj_consume_token(OPENPAR); prop = ObjectPropertyExpression(); ind = Individual(); jj_consume_token(CLOSEPAR); return dataFactory.getOWLObjectHasValue(prop, ind); }
public void visit(OWLObjectPropertyAssertionAxiom axiom) { OWLClassExpression sub = oneOf(axiom.getSubject()); OWLClassExpression sup = factory.getOWLObjectHasValue(axiom.getProperty(), axiom.getObject()); OWLSubClassOfAxiom ax = factory.getOWLSubClassOfAxiom(sub, sup); ax.accept(this); }
public OWLSubClassOfAxiom asOWLSubClassOfAxiom() { OWLDataFactory df = getOWLDataFactory(); return df.getOWLSubClassOfAxiom( df.getOWLObjectOneOf(getSubject()), df.getOWLObjectComplementOf(df.getOWLObjectHasValue(getProperty(), getObject())) ); }
public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { OWLClassExpression sub = oneOf(axiom.getSubject()); OWLClassExpression sup = factory.getOWLObjectHasValue(axiom.getProperty(), axiom.getObject()); factory.getOWLSubClassOfAxiom(sub, not(sup)).accept(this); }
public Boolean visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { // see OWL 2 Syntax, Sec 11.2 // No axiom in Ax of the following form contains anonymous individuals: // SameIndividual, DifferentIndividuals, NegativeObjectPropertyAssertion, and NegativeDataPropertyAssertion. if (axiom.getSubject().isAnonymous()||axiom.getObject().isAnonymous()) { throw new IllegalArgumentException("NegativeObjectPropertyAssertion axioms are not allowed to be used "+"with anonymous individuals (see OWL 2 Syntax Sec 11.2) but the axiom "+axiom+" cotains an anonymous subject or object. "); } OWLClassExpression hasValue=factory.getOWLObjectHasValue(axiom.getProperty(),axiom.getObject()); OWLClassExpression doesNotHaveValue=factory.getOWLObjectComplementOf(hasValue); return reasoner.hasType(axiom.getSubject().asOWLNamedIndividual(),doesNotHaveValue,false); } public Boolean visit(OWLDataPropertyAssertionAxiom axiom) {
@Override public OWLObjectHasValue translate(IRI mainNode) { IRI value = getConsumer().getResourceObject(mainNode, OWL_HAS_VALUE, true); OWLIndividual individual = getConsumer().translateIndividual(verifyNotNull(value)); IRI propertyIRI = getConsumer().getResourceObject(mainNode, OWL_ON_PROPERTY, true); OWLObjectPropertyExpression property = getConsumer() .translateObjectPropertyExpression(verifyNotNull(propertyIRI)); return getDataFactory().getOWLObjectHasValue(property, individual); } }
@Override public OWLObjectHasValue translate(IRI mainNode) { IRI value = getConsumer().getResourceObject(mainNode, OWL_HAS_VALUE, true); OWLIndividual individual = getConsumer().translateIndividual(verifyNotNull(value)); IRI propertyIRI = getConsumer().getResourceObject(mainNode, OWL_ON_PROPERTY, true); OWLObjectPropertyExpression property = getConsumer() .translateObjectPropertyExpression(verifyNotNull(propertyIRI)); return getDataFactory().getOWLObjectHasValue(property, individual); } }
@Override public OWLObjectHasValue translate(IRI mainNode) { IRI value = getConsumer().getResourceObject(mainNode, OWL_HAS_VALUE, true); OWLIndividual individual = getConsumer().translateIndividual(verifyNotNull(value)); IRI propertyIRI = getConsumer().getResourceObject(mainNode, OWL_ON_PROPERTY, true); OWLObjectPropertyExpression property = getConsumer() .translateObjectPropertyExpression(verifyNotNull(propertyIRI)); return getDataFactory().getOWLObjectHasValue(property, individual); } }