public OWLClassNodeSet convertClassNodes( Iterable<? extends Node<ElkClass>> nodes) { Set<org.semanticweb.owlapi.reasoner.Node<OWLClass>> owlNodes = new HashSet<org.semanticweb.owlapi.reasoner.Node<OWLClass>>(); for (Node<ElkClass> node : nodes) { owlNodes.add(convertClassNode(node)); } return new OWLClassNodeSet(owlNodes); }
private NodeSet<OWLClass> toClassNodeSet( Set<Set<ATermAppl>> termSets ) { Set<Node<OWLClass>> nodes = new HashSet<Node<OWLClass>>(); for( Set<ATermAppl> termSet : termSets ) { nodes.add( toClassNode( termSet ) ); } return new OWLClassNodeSet( nodes ); }
private NodeSet<OWLClass> toClassNodeSet( Set<Set<ATermAppl>> termSets ) { Set<Node<OWLClass>> nodes = new HashSet<Node<OWLClass>>(); for( Set<ATermAppl> termSet : termSets ) { nodes.add( toClassNode( termSet ) ); } return new OWLClassNodeSet( nodes ); }
@Override public NodeSet<OWLClass> getObjectPropertyRanges( OWLObjectPropertyExpression arg0, boolean arg1) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { LogOutput.printNotSupported("Not supported: getObjectPropertyRanges"); //return null; return new OWLClassNodeSet(); }
@Override public NodeSet<OWLClass> getObjectPropertyDomains( OWLObjectPropertyExpression arg0, boolean arg1) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { LogOutput.printNotSupported("Not supported: getObjectPropertyDomains"); //return null; return new OWLClassNodeSet(); }
protected NodeSet<OWLClass> atomicConceptHierarchyNodesToNodeSet(Collection<HierarchyNode<AtomicConcept>> hierarchyNodes) { Set<Node<OWLClass>> result=new HashSet<Node<OWLClass>>(); for (HierarchyNode<AtomicConcept> hierarchyNode : hierarchyNodes) { Node<OWLClass> node=atomicConceptHierarchyNodeToNode(hierarchyNode); if (node.getSize()!=0) result.add(node); } return new OWLClassNodeSet(result); } protected Node<OWLObjectPropertyExpression> objectPropertyHierarchyNodeToNode(HierarchyNode<Role> hierarchyNode) {
@Override public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) { ensurePrepared(); DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); getRootOntology().importsClosure().flatMap(o -> o.dataPropertyDomainAxioms(pe)) .forEach(ax -> addClasses(direct, result, ax.getDomain())); return result; }
@Override public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) { ensurePrepared(); DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); getRootOntology().importsClosure().flatMap(o -> o.classAssertionAxioms(ind)) .forEach(ax -> addClasses(direct, result, ax.getClassExpression())); return result; }
@Override public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) { ensurePrepared(); DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); getRootOntology().importsClosure().flatMap(o -> o.classAssertionAxioms(ind)) .forEach(ax -> addClasses(direct, result, ax.getClassExpression())); return result; }
@Override public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) { ensurePrepared(); DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); getRootOntology().importsClosure().flatMap(o -> o.dataPropertyDomainAxioms(pe)) .forEach(ax -> addClasses(direct, result, ax.getDomain())); return result; }
@Override public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) { ensurePrepared(); DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); getRootOntology().importsClosure().flatMap(o -> o.dataPropertyDomainAxioms(pe)) .forEach(ax -> addClasses(direct, result, ax.getDomain())); return result; }
@Override public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) { ensurePrepared(); DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); getRootOntology().importsClosure().flatMap(o -> o.dataPropertyDomainAxioms(pe)) .forEach(ax -> addClasses(direct, result, ax.getDomain())); return result; }
@Override public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) { OWLClassNodeSet ns = new OWLClassNodeSet(); if (!ce.isAnonymous()) { ensurePrepared(); return classHierarchyInfo.getNodeHierarchyChildren(ce.asOWLClass(), direct, ns); } return ns; }
public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { OWLClassNodeSet ns = new OWLClassNodeSet(); if (!ce.isAnonymous()) { ensurePrepared(); return classHierarchyInfo.getNodeHierarchyChildren(ce.asOWLClass(), direct, ns); } return ns; }
@Override public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) { OWLClassNodeSet ns = new OWLClassNodeSet(); if (!ce.isAnonymous()) { ensurePrepared(); return classHierarchyInfo.getNodeHierarchyParents(ce.asOWLClass(), direct, ns); } return ns; }
@Override public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) { OWLClassNodeSet ns = new OWLClassNodeSet(); if (!ce.isAnonymous()) { ensurePrepared(); return classHierarchyInfo.getNodeHierarchyChildren(ce.asOWLClass(), direct, ns); } return ns; }
public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { OWLClassNodeSet ns = new OWLClassNodeSet(); if (!ce.isAnonymous()) { ensurePrepared(); return classHierarchyInfo.getNodeHierarchyChildren(ce.asOWLClass(), direct, ns); } return ns; }
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { OWLClassNodeSet ns = new OWLClassNodeSet(); if (!ce.isAnonymous()) { ensurePrepared(); return classHierarchyInfo.getNodeHierarchyParents(ce.asOWLClass(), direct, ns); } return ns; }
@Override public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) { OWLClassNodeSet ns = new OWLClassNodeSet(); if (!ce.isAnonymous()) { ensurePrepared(); return classHierarchyInfo.getNodeHierarchyParents(ce.asOWLClass(), direct, ns); } return ns; }
public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { DefaultNodeSet<OWLClass> result = new OWLClassNodeSet(); for (OWLOntology ontology : getRootOntology().getImportsClosure()) { for (OWLDataPropertyDomainAxiom axiom : ontology.getDataPropertyDomainAxioms(pe)) { result.addNode(getEquivalentClasses(axiom.getDomain())); if (!direct) { result.addAllNodes(getSuperClasses(axiom.getDomain(), false).getNodes()); } } } return result; }