@Override public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { LOGGER_.trace("getSuperClasses(OWLClassExpression, boolean)"); checkInterrupted(); try { return elkConverter_.convertClassNodes(reasoner_ .getSuperClasses(owlConverter_.convert(ce), direct)); } catch (ElkUnsupportedReasoningTaskException e) { throw unsupportedOwlApiMethod( "getSuperClasses(OWLClassExpression, boolean)", e.getMessage()); } catch (ElkException e) { throw elkConverter_.convert(e); } catch (ElkRuntimeException e) { throw elkConverter_.convert(e); } }
throws ElkException { try { return getSuperClasses(classExpression, direct); } catch (final ElkInconsistentOntologyException e) {
throws ElkException { try { return getSuperClasses(classExpression, direct); } catch (final ElkInconsistentOntologyException e) {
throws ElkException { try { return getSuperClasses(classExpression, direct); } catch (final ElkInconsistentOntologyException e) {
@Override public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { LOGGER_.trace("getSuperClasses(OWLClassExpression, boolean)"); checkInterrupted(); try { return elkConverter_.convertClassNodes(reasoner_ .getSuperClasses(owlConverter_.convert(ce), direct)); } catch (ElkUnsupportedReasoningTaskException e) { throw unsupportedOwlApiMethod( "getSuperClasses(OWLClassExpression, boolean)", e.getMessage()); } catch (ElkException e) { throw elkConverter_.convert(e); } catch (ElkRuntimeException e) { throw elkConverter_.convert(e); } }
@Override public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { LOGGER_.trace("getSuperClasses(OWLClassExpression, boolean)"); checkInterrupted(); try { return elkConverter_.convertClassNodes(reasoner_ .getSuperClasses(owlConverter_.convert(ce), direct)); } catch (ElkUnsupportedReasoningTaskException e) { throw unsupportedOwlApiMethod( "getSuperClasses(OWLClassExpression, boolean)", e.getMessage()); } catch (ElkException e) { throw elkConverter_.convert(e); } catch (ElkRuntimeException e) { throw elkConverter_.convert(e); } }
@Test public void testSupSubClassConjunction() throws ElkException { TestLoader loader = new TestLoader(); Reasoner reasoner = TestReasonerUtils.createTestReasoner(loader); ElkClass A = objectFactory.getClass(new ElkFullIri(":A")); ElkClass B = objectFactory.getClass(new ElkFullIri(":B")); ElkClass C = objectFactory.getClass(new ElkFullIri(":C")); loader.add(objectFactory.getSubClassOfAxiom(A, B)).add( (objectFactory.getSubClassOfAxiom(B, C))); Set<? extends Node<ElkClass>> superClasses = reasoner.getSuperClasses( objectFactory.getObjectIntersectionOf(B, C), true); assertEquals(1, superClasses.size()); for (Node<ElkClass> node : superClasses) { assertTrue(node.contains(C)); } Set<? extends Node<ElkClass>> subClasses = reasoner.getSubClasses( objectFactory.getObjectIntersectionOf(B, C), true); assertEquals(1, subClasses.size()); for (Node<ElkClass> node : subClasses) { assertTrue(node.contains(A)); } }