public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression arg0) throws ReasonerInterruptedException, TimeOutException, FreshEntitiesException, InconsistentOntologyException { return reasoner.getDisjointClasses(arg0); }
@Override public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { return delegate_.getDisjointClasses(ce); }
@Override public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { return delegate_.getDisjointClasses(ce); }
@Override public synchronized NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { return r.getDisjointClasses(ce); }
@Override public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { return delegate_.getDisjointClasses(ce); }
@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)); } }
/** * Gets the classes that are disjoint with the specified class expression {@code ce}. The * classes are returned as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. * * @param ce The class expression whose disjoint classes are to be retrieved. * @return The return value is a {@code NodeSet} such that for each class {@code D} in the * {@code NodeSet} the set of reasoner axioms entails {@code EquivalentClasses(D, * ObjectComplementOf(ce))} or {@code StrictSubClassOf(D, ObjectComplementOf(ce))}. * @throws InconsistentOntologyException if the imports closure of the root ontology is * inconsistent * @throws ClassExpressionNotInProfileException if {@code classExpression} is not within the * profile that is supported by this reasoner. * @throws FreshEntitiesException if the signature of the classExpression is not contained * within the signature of the imports closure of the root ontology and the undeclared * entity policy of this reasoner is set to {@link FreshEntityPolicy#DISALLOW}. * @throws ReasonerInterruptedException if the reasoning process was interrupted for any * particular reason (for example if reasoning was cancelled by a client process) * @throws TimeOutException if the reasoner timed out during a basic reasoning operation. See * {@link #getTimeOut()}. */ default Stream<OWLClass> disjointClasses(OWLClassExpression ce) { return getDisjointClasses(ce).entities(); }
@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)); } }
/** * Gets the classes that are disjoint with the specified class expression {@code ce}. The * classes are returned as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. * * @param ce The class expression whose disjoint classes are to be retrieved. * @return The return value is a {@code NodeSet} such that for each class {@code D} in the * {@code NodeSet} the set of reasoner axioms entails {@code EquivalentClasses(D, * ObjectComplementOf(ce))} or {@code StrictSubClassOf(D, ObjectComplementOf(ce))}. * @throws InconsistentOntologyException if the imports closure of the root ontology is * inconsistent * @throws ClassExpressionNotInProfileException if {@code classExpression} is not within the * profile that is supported by this reasoner. * @throws FreshEntitiesException if the signature of the classExpression is not contained * within the signature of the imports closure of the root ontology and the undeclared * entity policy of this reasoner is set to {@link FreshEntityPolicy#DISALLOW}. * @throws ReasonerInterruptedException if the reasoning process was interrupted for any * particular reason (for example if reasoning was cancelled by a client process) * @throws TimeOutException if the reasoner timed out during a basic reasoning operation. See * {@link #getTimeOut()}. */ default Stream<OWLClass> disjointClasses(OWLClassExpression ce) { return getDisjointClasses(ce).entities(); }
/** * Gets the classes that are disjoint with the specified class expression {@code ce}. The * classes are returned as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. * * @param ce The class expression whose disjoint classes are to be retrieved. * @return The return value is a {@code NodeSet} such that for each class {@code D} in the * {@code NodeSet} the set of reasoner axioms entails {@code EquivalentClasses(D, * ObjectComplementOf(ce))} or {@code StrictSubClassOf(D, ObjectComplementOf(ce))}. * @throws InconsistentOntologyException if the imports closure of the root ontology is * inconsistent * @throws ClassExpressionNotInProfileException if {@code classExpression} is not within the * profile that is supported by this reasoner. * @throws FreshEntitiesException if the signature of the classExpression is not contained * within the signature of the imports closure of the root ontology and the undeclared * entity policy of this reasoner is set to {@link FreshEntityPolicy#DISALLOW}. * @throws ReasonerInterruptedException if the reasoning process was interrupted for any * particular reason (for example if reasoning was cancelled by a client process) * @throws TimeOutException if the reasoner timed out during a basic reasoning operation. See * {@link #getTimeOut()}. */ default Stream<OWLClass> disjointClasses(OWLClassExpression ce) { return getDisjointClasses(ce).entities(); }
@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 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 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 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 protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDisjointClassesAxiom> result) { if (!precomputed) { reasoner.precomputeInferences(org.semanticweb.owlapi.reasoner.InferenceType.DISJOINT_CLASSES); precomputed=true; } for (OWLClass cls : reasoner.getDisjointClasses(entity).getFlattened()) { result.add(dataFactory.getOWLDisjointClassesAxiom(entity, cls)); } } });
@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)))); }
private void populateDisjointClasses(OWLClass c, OWLReasoner r, Model m) { for (OWLClass d : r.getDisjointClasses(c).getFlattened()) { if (!d.isOWLNothing()) { log.debug("Disjoint class: " + c + ", " + d); m.add(toResource(c), OWL_DISJOINT_WITH, toResource(d)); } } }
public static void assertDisjointnessEquals(final OWLReasoner expected, final OWLReasoner actual, final OWLClass cls) { final Stream<OWLClass> expectedDisjoints = expected.getDisjointClasses(cls).entities(); final Stream<OWLClass> actualDisjoints = actual.getDisjointClasses(cls).entities(); assertStreamEquals("Disjoint classes different for Class: " + cls, expectedDisjoints, actualDisjoints); }