@Override protected DefaultNodeSet<OWLClass> createDefaultNodeSet(Stream<Node<OWLClass>> stream) { return new OWLClassNodeSet(stream); }
/** * {@inheritDoc} */ public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { reasoner.flush(); realize(); OWLClassNodeSet types = new OWLClassNodeSet(); for( Set<OWLClass> t : TaxonomyUtils.getTypes( taxonomy, ind, direct ) ) { //Set<OWLClass> eqSet = ATermUtils.primitiveOrBottom( t ); //if( !eqSet.isEmpty() ) types.addNode( new OWLClassNode( t ) ); } return types; }
/** * {@inheritDoc} */ public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { DisjointClassComparator disjointClassComparator = new DisjointClassComparator( taxonomy, ce ); if( !taxonomy.contains( disjointClassComparator.getComplementRepresentation() ) ) { reasoner.flush(); PartialOrderBuilder<OWLClass> orderBuilder = new PartialOrderBuilder<OWLClass>(taxonomy, disjointClassComparator); orderBuilder.add( disjointClassComparator.getComplementRepresentation(), true ); } OWLClassNodeSet result = new OWLClassNodeSet(); for (Set<OWLClass> equivSet : taxonomy.getSubs( disjointClassComparator.getComplementRepresentation(), false ) ) { result.addSameEntities( equivSet ); } return result; }
/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getTypes(final OWLNamedIndividual ind, final boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { _reasoner.flush(); realize(); final OWLClassNodeSet types = new OWLClassNodeSet(); for (final Set<OWLClass> t : TaxonomyUtils.getTypes(_taxonomyImpl, ind, direct)) //Set<OWLClass> eqSet = ATermUtils.primitiveOrBottom( t ); //if( !eqSet.isEmpty() ) types.addNode(new OWLClassNode(t)); return types; }
/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getDisjointClasses(final OWLClassExpression ce) { final DisjointClassComparator disjointClassComparator = new DisjointClassComparator(_taxonomyImpl, ce); if (!_taxonomyImpl.contains(disjointClassComparator.getComplementRepresentation())) { _reasoner.flush(); final PartialOrderBuilder<OWLClass> orderBuilder = new PartialOrderBuilder<>(_taxonomyImpl, disjointClassComparator); orderBuilder.add(disjointClassComparator.getComplementRepresentation(), true); } final OWLClassNodeSet result = new OWLClassNodeSet(); for (final Set<OWLClass> equivSet : _taxonomyImpl.getSubs(disjointClassComparator.getComplementRepresentation(), false)) result.addSameEntities(equivSet); return result; }
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, TimeOutException { return new OWLClassNodeSet(); }
/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getTypes(final OWLNamedIndividual ind, final boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { _reasoner.flush(); realize(); final OWLClassNodeSet types = new OWLClassNodeSet(); for (final Set<OWLClass> t : TaxonomyUtils.getTypes(_taxonomyImpl, ind, direct)) //Set<OWLClass> eqSet = ATermUtils.primitiveOrBottom( t ); //if( !eqSet.isEmpty() ) types.addNode(new OWLClassNode(t)); return types; }
/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getDisjointClasses(final OWLClassExpression ce) { final DisjointClassComparator disjointClassComparator = new DisjointClassComparator(_taxonomyImpl, ce); if (!_taxonomyImpl.contains(disjointClassComparator.getComplementRepresentation())) { _reasoner.flush(); final PartialOrderBuilder<OWLClass> orderBuilder = new PartialOrderBuilder<>(_taxonomyImpl, disjointClassComparator); orderBuilder.add(disjointClassComparator.getComplementRepresentation(), true); } final OWLClassNodeSet result = new OWLClassNodeSet(); for (final Set<OWLClass> equivSet : _taxonomyImpl.getSubs(disjointClassComparator.getComplementRepresentation(), false)) result.addSameEntities(equivSet); return result; }
public NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException { return new OWLClassNodeSet(); }
@Override public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { ensurePrepared(); OWLClassNodeSet nodeSet = new OWLClassNodeSet(); if (ce.isAnonymous()) { return nodeSet; } getRootOntology().importsClosure().flatMap(o -> o.disjointClassesAxioms(ce.asOWLClass())) .flatMap(ax -> ax .classExpressions()).filter(op -> !op.isAnonymous()) .forEach(op -> nodeSet.addNode(getEquivalentClasses( op))); return nodeSet; }
public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException { return new OWLClassNodeSet(); }
@Override public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { ensurePrepared(); OWLClassNodeSet nodeSet = new OWLClassNodeSet(); if (ce.isAnonymous()) { return nodeSet; } getRootOntology().importsClosure().flatMap(o -> o.disjointClassesAxioms(ce.asOWLClass())) .flatMap(ax -> ax .classExpressions()).filter(op -> !op.isAnonymous()) .forEach(op -> nodeSet.addNode(getEquivalentClasses( op))); return nodeSet; }
public NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException { return new OWLClassNodeSet(); }
@Override public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { ensurePrepared(); OWLClassNodeSet nodeSet = new OWLClassNodeSet(); if (ce.isAnonymous()) { return nodeSet; } getRootOntology().importsClosure().flatMap(o -> o.disjointClassesAxioms(ce.asOWLClass())) .flatMap(ax -> ax .classExpressions()).filter(op -> !op.isAnonymous()) .forEach(op -> nodeSet.addNode(getEquivalentClasses( op))); return nodeSet; }
public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { return new OWLClassNodeSet(); }
@Override public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) { ensurePrepared(); OWLClassNodeSet nodeSet = new OWLClassNodeSet(); if (ce.isAnonymous()) { return nodeSet; } getRootOntology().importsClosure().flatMap(o -> o.disjointClassesAxioms(ce.asOWLClass())) .flatMap(ax -> ax .classExpressions()).filter(op -> !op.isAnonymous()) .forEach(op -> nodeSet.addNode(getEquivalentClasses( op))); return nodeSet; }
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, TimeOutException { return new OWLClassNodeSet(); }
@Nonnull @Override public NodeSet<OWLClass> getDisjointClasses(@Nonnull OWLClassExpression ce) { ensurePrepared(); OWLClassNodeSet nodeSet = new OWLClassNodeSet(); if (!ce.isAnonymous()) { for (OWLOntology ontology : getRootOntology().getImportsClosure()) { for (OWLDisjointClassesAxiom ax : ontology.getDisjointClassesAxioms(ce.asOWLClass())) { for (OWLClassExpression op : ax.getClassExpressions()) { if (!op.isAnonymous()) { nodeSet.addNode(getEquivalentClasses(op)); } } } } } return nodeSet; }
public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, TimeOutException { return new OWLClassNodeSet(); }
public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce, boolean direct) { OWLClassNodeSet nodeSet = new OWLClassNodeSet(); if (!ce.isAnonymous()) { for(OWLOntology ontology : getRootOntology().getImportsClosure()) { for(OWLDisjointClassesAxiom ax : ontology.getDisjointClassesAxioms(ce.asOWLClass())) { for(OWLClassExpression op : ax.getClassExpressions()) { if(!op.isAnonymous()) { nodeSet.addNode(getEquivalentClasses(op)); } } } } } return nodeSet; }