@Override public OWLDisjointClassesAxiom buildObject() { return df.getOWLDisjointClassesAxiom(items, annotations); } }
public static OWLDisjointClassesAxiom DisjointClasses( Collection<OWLClassExpression> classExpressions, Collection<OWLAnnotation> a) { return DF.getOWLDisjointClassesAxiom(classExpressions, a); }
private void handleDisjoints() { for (Set<OWLClass> clses : parent2ChildMap.values()) { if (clses.size() > 1) { changes.add(new AddAxiom(ont, df.getOWLDisjointClassesAxiom(clses))); } } }
private void handleDisjoints() { for (Set<OWLClass> clses : parent2ChildMap.values()) { if (clses.size() > 1) { changes.add(new AddAxiom(ont, df.getOWLDisjointClassesAxiom(clses))); } } }
@Override protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDisjointClassesAxiom> result) { for (OWLClass disjoint : reasoner.getDisjointClasses(entity).getFlattened()) { result.add(dataFactory.getOWLDisjointClassesAxiom(entity, disjoint)); } }
@Override public void visit(OWLDisjointClassesAxiom axiom) { Set<OWLClassExpression> disjointclasses = replaceBottom(axiom.classExpressions()); newAxiom = df.getOWLDisjointClassesAxiom(disjointclasses); }
@Override public void visit(OWLDisjointClassesAxiom axiom) { isLocal = false; if (pairs(axiom.classExpressions()).map(v -> df.getOWLDisjointClassesAxiom(v.i, v.j)) .anyMatch(ax -> !kernel.isEntailed(ax))) { return; } isLocal = true; }
private void generateChanges(Collection<? extends OWLClassExpression> classExpressions, boolean usePairwiseDisjointAxioms, OWLOntology targetOntology) { if (usePairwiseDisjointAxioms) { pairs(classExpressions) .forEach(v -> addChange( new AddAxiom(targetOntology, df.getOWLDisjointClassesAxiom(v.i, v.j)))); } else { addChange( new AddAxiom(targetOntology, df.getOWLDisjointClassesAxiom(classExpressions))); } } }
@Override protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDisjointClassesAxiom> result) { reasoner.precomputeInferences(InferenceType.DISJOINT_CLASSES); reasoner.getDisjointClasses(entity).forEach(cls -> cls.entities() .forEach(c -> result.add(dataFactory.getOWLDisjointClassesAxiom(entity, c)))); }
@Override public Collection<OWLAxiom> visit(OWLDisjointUnionAxiom axiom) { Set<OWLAxiom> axioms = new HashSet<>(); axioms.addAll(df.getOWLEquivalentClassesAxiom(axiom.getOWLClass(), df.getOWLObjectUnionOf(axiom.classExpressions())).accept(this)); axioms.addAll(df.getOWLDisjointClassesAxiom(axiom.classExpressions()).accept(this)); return axioms; }
public Set<OWLAxiom> visit(OWLDisjointUnionAxiom axiom) { Set<OWLAxiom> axioms = new HashSet<OWLAxiom>(); axioms.addAll(df.getOWLEquivalentClassesAxiom(axiom.getOWLClass(), df.getOWLObjectUnionOf(axiom.getClassExpressions())).accept(this)); axioms.addAll(df.getOWLDisjointClassesAxiom(axiom.getClassExpressions()).accept(this)); return axioms; }
@Override public Object read(OWLInputStream in) throws IOException { int count = IOUtils.readInt(in.getInputStream()); OWLClassExpression[] classExpressions = new OWLClassExpression[count]; for (int i = 0; i < count; i++) { classExpressions[i] = (OWLClassExpression) in.read(); } return in.getOWLDataFactory().getOWLDisjointClassesAxiom(classExpressions); }
@Override public Object visit(OWLDisjointClassesAxiom axiom) { return visitAxiom(axiom, () -> df.getOWLDisjointClassesAxiom(t(axiom.classExpressions()), t(axiom .annotations()))); }
@Override public Object visit(OWLDisjointClassesAxiom axiom) { return visitAxiom(axiom, () -> df.getOWLDisjointClassesAxiom(t(axiom.classExpressions()), t(axiom .annotations()))); }
final public OWLClassAxiom DisjointClasses() throws ParseException { Set<OWLClassExpression> classExpressions; Set<OWLAnnotation> axiomAnnos; jj_consume_token(DISJOINTCLASSES); jj_consume_token(OPENPAR); axiomAnnos = AxiomAnnotationSet(); classExpressions = ClassExpressionSet(); jj_consume_token(CLOSEPAR); return dataFactory.getOWLDisjointClassesAxiom(classExpressions, axiomAnnos); }
final public void Disjoint() throws ParseException, KRSS2OWLParserException {OWLClassExpression desc1, desc2; jj_consume_token(OPENPAR); jj_consume_token(DISJOINT); desc1 = ConceptExpression(); desc2 = ConceptExpression(); jj_consume_token(CLOSEPAR); addAxiom(df.getOWLDisjointClassesAxiom(desc1, desc2)); }
final public void Disjoint() throws ParseException, KRSS2OWLParserException {OWLClassExpression desc1, desc2; jj_consume_token(OPENPAR); jj_consume_token(DISJOINT); desc1 = ConceptExpression(); desc2 = ConceptExpression(); jj_consume_token(CLOSEPAR); addAxiom(df.getOWLDisjointClassesAxiom(desc1, desc2)); }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { OWLAxiom ax = getDataFactory() .getOWLDisjointClassesAxiom(CollectionFactory.createSet(getCurrentClass(), getOWLClass(value))); applyChange(new AddAxiom(getOntology(), ax)); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { OWLAxiom ax = getDataFactory().getOWLDisjointClassesAxiom(CollectionFactory.createSet(getCurrentClass(), getOWLClass(value))); applyChange(new AddAxiom(getOntology(), ax)); } }
@Test public void doesNotReason_whenOntologyIsInconsistent() throws Exception{ OWLClass c0 = dataFactory.getOWLClass(IRI.generateDocumentIRI()); OWLClass c1 = dataFactory.getOWLClass(IRI.generateDocumentIRI()); OWLDisjointClassesAxiom disjoint = dataFactory.getOWLDisjointClassesAxiom(c0, c1); OWLIndividual i1 = dataFactory.getOWLNamedIndividual(IRI.generateDocumentIRI()); OWLClassAssertionAxiom a1 = dataFactory.getOWLClassAssertionAxiom(c0, i1); OWLClassAssertionAxiom a2 = dataFactory.getOWLClassAssertionAxiom(c1, i1); manager.addAxioms(ont, newHashSet(disjoint, a1, a2)); util.flush(); assertThat(util.shouldReason(), is(false)); }