Refine search
public void visit(OWLDisjointObjectPropertiesAxiom axiom) { for (OWLObjectPropertyExpression prop : axiom.getProperties()) { if (!prop.isAnonymous()) { getAxiomsForLHS(prop.asOWLObjectProperty()).add(axiom); } indexAxiomsByRHSEntities(prop, axiom); } }
@Override public void visit(OWLDisjointObjectPropertiesAxiom axiom) { axiom.properties().forEach(prop -> { if (!prop.isAnonymous()) { getAxiomsForLHS(prop.asOWLObjectProperty()).add(axiom); } indexAxiomsByRHSEntities(prop, axiom); }); }
@Override public List<OWLObjectPropertyExpression> getRenderablesForItem(OWLObjectProperty subject, OWLDisjointObjectPropertiesAxiom item, OWLOntology ontology) { return Lists.newArrayList(item.getPropertiesMinus(subject)); }
@Override public void visit(OWLDisjointObjectPropertiesAxiom axiom) { hashCode = primes[10]; hashCode = hashCode * MULT + axiom.getProperties().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderDisjointObjectProperties(OWLDisjointObjectPropertiesAxiom expected, OWLDataFactory df) { this(df); withItems(expected.properties()).withAnnotations(expected.annotations()); }
@Override public Object visit(OWLDisjointObjectPropertiesAxiom axiom) { return visitAxiom(axiom, () -> df.getOWLDisjointObjectPropertiesAxiom(t(axiom.properties()), t(axiom .annotations()))); }
@Override public void visit(OWLDisjointObjectPropertiesAxiom axiom) { dl(() -> insufficientProperties(axiom), () -> axiom.properties() .filter(getPropertyManager()::isNonSimple).forEach(this::disjointNonSimple)); el(() -> illegalAxiom()); }
@Override public void visit(OWLDisjointObjectPropertiesAxiom axiom) { addConstruct(ROLE_COMPLEX); axiom.properties().forEach(o -> o.accept(this)); }
@Override public void visit(OWLDisjointObjectPropertiesAxiom axiom) { axiom.properties() .forEach(p -> disjointObjectPropertyAxiomsByProperty.remove(p, axiom)); }
if (!isFiltered(AxiomType.SUB_OBJECT_PROPERTY)) { SectionMap<Object, OWLAxiom> properties = new SectionMap<>(); filtersort(o.objectSubPropertyAxiomsForSubProperty(property)).forEach(ax -> { properties.put(ax.getSuperProperty(), ax); axioms.add(ax); if (renderExtensions) { SectionMap<Object, OWLAxiom> extproperties = new SectionMap<>(); filtersort(o.objectSubPropertyAxiomsForSuperProperty(property)).forEach(ax -> { extproperties.put(ax.getSubProperty(), ax); axioms.add(ax); filtersort(o.equivalentObjectPropertiesAxioms(property), props).forEach(ax -> { properties.put(ax.getPropertiesMinus(property).iterator().next(), ax); axioms.add(ax); SectionMap<Object, OWLAxiom> properties = new SectionMap<>(); filtersort(o.disjointObjectPropertiesAxioms(property), props).forEach(ax -> { properties.put(ax.getPropertiesMinus(property).iterator().next(), ax); axioms.add(ax); });
public List<OWLOntologyChange> getChangesToRemoveDefinition() { List<OWLOntologyChange> changes = new ArrayList<>(); getUnaryAxioms().forEach(ax -> changes.add(new RemoveAxiom(ontology, ax))); ontology.getDisjointObjectPropertiesAxioms(property).forEach(ax -> { changes.add(new RemoveAxiom(ontology, ax)); if(ax.getProperties().size() > 2) { OWLDisjointObjectPropertiesAxiom replacement = dataFactory.getOWLDisjointObjectPropertiesAxiom( ax.getPropertiesMinus(property), ax.getAnnotations() ); changes.add(new RemoveAxiom(ontology, replacement)); } }); return changes; } }
@Override public void visit(final OWLDisjointObjectPropertiesAxiom axiom) { if (!_addAxioms) { _reloadRequired = true; return; } final OWLObjectPropertyExpression[] disjs = axiom.properties().toArray(OWLObjectPropertyExpression[]::new); for (int i = 0; i < disjs.length - 1; i++) { final OWLObjectPropertyExpression prop1 = disjs[i]; addSimpleProperty(prop1); for (int j = i + 1; j < disjs.length; j++) { final OWLObjectPropertyExpression prop2 = disjs[j]; addSimpleProperty(prop2); prop1.accept(this); final ATermAppl p1 = _term; prop2.accept(this); final ATermAppl p2 = _term; _kb.addDisjointProperty(p1, p2); } } }
boolean threewayDisjointObject(OWLAxiom ax) { return !(ax instanceof OWLDisjointObjectPropertiesAxiom && ((OWLDisjointObjectPropertiesAxiom) ax).properties().count() > 2); } }
@Override public void visit(OWLDisjointObjectPropertiesAxiom axiom) { write("Disjoint"); write("("); for (Iterator<OWLObjectPropertyExpression> it = axiom.properties().iterator(); it.hasNext(); ) { it.next().accept(this); if (it.hasNext()) { write(","); writeSpace(); } } write(")"); }
if (isNegatedOWLQLRHSConcept(supclass)) { if (b2.equals(subclass)) { newNegIncAx.add(fac.getOWLSubClassOfAxiom(b1, supclass)); } else { OWLClassExpression notSupclass = fac .getOWLObjectComplementOf(supclass) .getNNF(); if (b2.equals(notSupclass)) { OWLClassExpression notSubclass = fac .getOWLObjectComplementOf(subclass) .getNNF(); newNegIncAx.add(fac.getOWLSubClassOfAxiom( disjointProperties.add(dpax.getProperties()); Set<OWLObjectPropertyExpression> props = ax.getProperties(); assert props.size() == 2 || props.size() == 1 : props + "\n normalization was not performed properly";
protected List<Rule> defineAtomViewForDifferentFrom(int ruleid) { List<Rule> ret = new LinkedList<Rule>(); DLAnnotatedPredicate diffPred = new DLAnnotatedPredicate(fac.getOWLObjectProperty(IRI.create(OWL_DIFFERENTFROM_URI))); for (OWLObjectProperty p: taxo.getTbox().getIrreflexiveProperties()) { VariableExpr y = new VariableExpr("y"); AtomicFormula head = new AtomicFormula(diffPred, x, y ); AtomicFormula body = p.getSimplified().isAnonymous()? new AtomicFormula(bodyPred, y,x) : new AtomicFormula(bodyPred, x, y); ret.add(new Rule(head, ruleid++, body)); head = new AtomicFormula(diffPred, y, x ); Set<OWLObjectPropertyExpression> props = disjprops.getProperties(); assert props.size()>=1 : props; assert props.size()<=2 : props; OWLObjectPropertyExpression p1 = it.next(); OWLObjectPropertyExpression p2 = it.next(); DLAnnotatedPredicate bodyPred1 = new DLAnnotatedPredicate(p1.getNamedProperty()); DLAnnotatedPredicate bodyPred2 = new DLAnnotatedPredicate(p2.getNamedProperty()); VariableExpr x = new VariableExpr("x"); VariableExpr y = new VariableExpr("y");
assert NormalizedOWLQLTbox.isNegatedOWLQLRHSConcept(superclass) : "Invalid negative subclass axiom: "+ ax; Triple t1 = toTriple(subclass, var, varGen, getFactory()); if (!getReflexiveProperties().contains(getFactory().getOWLObjectProperty(IRI.create(t1.getPredicate().getURI())))) { triples.add(t1); OWLClassExpression negSuperclass = getFactory().getOWLObjectComplementOf(superclass).getNNF(); Triple t2 = toTriple(negSuperclass, var, varGen, getFactory()); if (!getReflexiveProperties().contains(getFactory().getOWLObjectProperty(IRI.create(t2.getPredicate().getURI())))) { triples.add(t2); Set<OWLObjectPropertyExpression> props = disjAx.getProperties(); assert props.size() == 1 || props.size() ==2: ax; Node x = Node.createVariable(varGen.createNewVariable()); for (OWLObjectPropertyExpression prop: props) { triples.add(toTriple(prop, x, y, varGen)); if (getReflexiveProperties().contains(prop.getNamedProperty())) { numberOfReflexiveProps++; if (!getReflexiveProperties().contains(prop.getNamedProperty())) { newtriples.add(toTriple(prop, x, x, varGen)); OWLObjectPropertyExpression osubp = (OWLObjectPropertyExpression) subp; if (getReflexiveProperties().contains(osubp.getNamedProperty())) {
public void visit(OWLDisjointObjectPropertiesAxiom axiom) { if (!isFilterSet(UsageFilter.filterDisjoints)) { for (OWLObjectPropertyExpression prop : axiom.getProperties()) { prop.accept(this); } } }
public void visit(OWLDisjointObjectPropertiesAxiom axiom) { for (OWLObjectPropertyExpression propA : axiom.getProperties()) { for (OWLObjectPropertyExpression propB : axiom.getProperties()) { if (!propA.equals(propB)) { addChildParent(propA, propB, axiom); } } } }
@Override public void visit(OWLDisjointObjectPropertiesAxiom ax) { obj = df.getOWLDisjointObjectPropertiesAxiom(set(ax.properties()), anns(ax)); }