public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { handleObject(axiom); axiom.getSubject().accept(this); axiom.getProperty().accept(this); axiom.getObject().accept(this); }
@Override public OWLClassExpression visit(OWLNegativeObjectPropertyAssertionAxiom ax) { return df.getOWLObjectComplementOf( df.getOWLObjectHasValue(ax.getProperty(), ax.getObject())); }
@Override public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { if (axiom.containsAnonymousIndividuals()) throw new IllegalArgumentException("The axiom "+axiom+" contains anonymous individuals, which is not allowed in OWL 2 DL. "); addFact(m_factory.getOWLNegativeObjectPropertyAssertionAxiom(axiom.getProperty(),axiom.getSubject(),axiom.getObject())); m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty()); } @Override
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) {
if (axiom instanceof OWLNegativeObjectPropertyAssertionAxiom) { OWLNegativeObjectPropertyAssertionAxiom negAssertion=(OWLNegativeObjectPropertyAssertionAxiom)axiom; OWLObjectPropertyExpression prop=negAssertion.getProperty().getSimplified(); if (axioms.m_complexObjectPropertyExpressions.contains(prop)) { OWLIndividual individual=negAssertion.getObject(); OWLClass individualConcept=factory.getOWLClass(IRI.create("internal:nom#"+individual.asOWLNamedIndividual().getIRI().toString())); OWLClassExpression notIndividualConcept=factory.getOWLObjectComplementOf(individualConcept); OWLClassExpression allNotIndividualConcept=factory.getOWLObjectAllValuesFrom(prop,notIndividualConcept); OWLClassExpression definition=factory.getOWLClass(IRI.create("internal:def#"+(replacementIndex++))); axioms.m_conceptInclusions.add(new OWLClassExpression[] { factory.getOWLObjectComplementOf(definition), allNotIndividualConcept }); additionalFacts.add(factory.getOWLClassAssertionAxiom(definition,negAssertion.getSubject())); additionalFacts.add(factory.getOWLClassAssertionAxiom(individualConcept,individual)); redundantFacts.add(negAssertion);
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderNegativeObjectPropertyAssertion(OWLNegativeObjectPropertyAssertionAxiom expected, OWLDataFactory df) { this(df); withSubject(expected.getSubject()).withProperty(expected.getProperty()) .withValue(expected.getObject()) .withAnnotations(expected.annotations()); }
@Override public Collection<OWLAxiom> visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { return subClassOf(df.getOWLObjectOneOf(axiom.getSubject()), df.getOWLObjectAllValuesFrom(axiom.getProperty(), df.getOWLObjectComplementOf(df.getOWLObjectOneOf(axiom.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 void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { if (!axiom.getSubject().isAnonymous()) { axiom.getSubject().asOWLNamedIndividual().accept(this); } }
/** * Gets a list of objects contained in this row. These objects * could be placed on the clip board during a copy operation, * or navigated to etc. */ public List<OWLObject> getManipulatableObjects() { List<OWLObject> objects = new ArrayList<>(); objects.add(getAxiom().getProperty()); objects.add(getAxiom().getObject()); return objects; }
@Override public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { axiom.getProperty().accept(this); }
public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { switch (localityCls) { case BOTTOM_BOTTOM: case TOP_BOTTOM: isLocal = !signature.contains(axiom.getProperty().getNamedProperty()); break; case TOP_TOP: isLocal = false; break; } }
@Override public Set<OWLAxiom> visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { return axiom.asOWLSubClassOfAxiom().accept(this); }
@Override 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 Boolean.valueOf(reasoner.hasType(axiom.getSubject().asOWLNamedIndividual(),doesNotHaveValue,false)); } @Override
if (axiom instanceof OWLNegativeObjectPropertyAssertionAxiom) { OWLNegativeObjectPropertyAssertionAxiom negAssertion=(OWLNegativeObjectPropertyAssertionAxiom)axiom; OWLObjectPropertyExpression prop=negAssertion.getProperty(); if (axioms.m_complexObjectPropertyExpressions.contains(prop)) { OWLIndividual individual=negAssertion.getObject(); IRI iri = individual.asOWLNamedIndividual().getIRI(); OWLClass individualConcept=factory.getOWLClass(IRI.create("internal:nom#"+iri.getNamespace(), iri.getFragment())); OWLClassExpression notIndividualConcept=factory.getOWLObjectComplementOf(individualConcept); OWLClassExpression allNotIndividualConcept=factory.getOWLObjectAllValuesFrom(prop,notIndividualConcept); OWLClassExpression definition=factory.getOWLClass(IRI.create("internal:def#","a"+(replacementIndex++))); axioms.m_conceptInclusions.add(Arrays.asList(factory.getOWLObjectComplementOf(definition), allNotIndividualConcept)); additionalFacts.add(factory.getOWLClassAssertionAxiom(definition,negAssertion.getSubject())); additionalFacts.add(factory.getOWLClassAssertionAxiom(individualConcept,individual)); redundantFacts.add(negAssertion);
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderNegativeObjectPropertyAssertion(OWLNegativeObjectPropertyAssertionAxiom expected, OWLDataFactory df) { this(df); withSubject(expected.getSubject()).withProperty(expected.getProperty()) .withValue(expected.getObject()) .withAnnotations(expected.annotations()); }
@Override public Collection<OWLAxiom> visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { return subClassOf(df.getOWLObjectOneOf(axiom.getSubject()), df.getOWLObjectAllValuesFrom(axiom.getProperty(), df.getOWLObjectComplementOf(df.getOWLObjectOneOf(axiom.getObject())))); }
@Override public OWLClassExpression visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { OWLClassExpression sub = oneOf(axiom.getSubject()); OWLClassExpression sup = factory .getOWLObjectHasValue(axiom.getProperty(), axiom.getObject()); return factory.getOWLSubClassOfAxiom(sub, not(sup)).accept(this); }
@Override public OWLClassExpression visit(OWLNegativeObjectPropertyAssertionAxiom ax) { return df.getOWLObjectComplementOf( df.getOWLObjectHasValue(ax.getProperty(), ax.getObject())); }
public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) { if (axiom.containsAnonymousIndividuals()) throw new IllegalArgumentException("The axiom "+axiom+" contains anonymous individuals, which is not allowed in OWL 2 DL. "); addFact(m_factory.getOWLNegativeObjectPropertyAssertionAxiom(axiom.getProperty().getSimplified(),axiom.getSubject(),axiom.getObject())); m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty()); } public void visit(OWLDataPropertyAssertionAxiom axiom) {