/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getObjectPropertyDomains(final OWLObjectPropertyExpression pe, final boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { _reasoner.flush(); return _reasoner.getObjectPropertyDomains(pe, direct); }
/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getObjectPropertyDomains(final OWLObjectPropertyExpression pe, final boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { _reasoner.flush(); return _reasoner.getObjectPropertyDomains(pe, direct); }
@Test public void testObjectDomainWithSubClasses() { createReasoner(OWL.domain(_p, _A), OWL.subClassOf(_A, _B)); assertTrue(_reasoner.isEntailed(OWL.domain(_p, _A))); assertStreamAsSetEquals(Stream.of(_A), _reasoner.getObjectPropertyDomains(_p, true).entities()); assertStreamAsSetEquals(Stream.of(_A, _B, OWL.Thing), _reasoner.getObjectPropertyDomains(_p, false).entities()); }
@Test public void testObjecDomainWithEquivalents() { createReasoner(OWL.subClassOf(_A, min(_p, 1)), OWL.domain(_p, _A), OWL.domain(_p, _C), OWL.subClassOf(_A, _B)); assertTrue(_reasoner.isEntailed(OWL.domain(_p, _A))); assertStreamAsSetEquals(Stream.of(_A), _reasoner.getObjectPropertyDomains(_p, true).entities()); assertStreamAsSetEquals(Stream.of(_A, _B, _C, OWL.Thing), _reasoner.getObjectPropertyDomains(_p, false).entities()); }