Examples of OWLClassNodeSet


Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    @Nonnull
    @Override
    public NodeSet<OWLClass> getSubClasses(@Nonnull OWLClassExpression ce,
            boolean direct) {
        OWLClassNodeSet ns = new OWLClassNodeSet();
        if (!ce.isAnonymous()) {
            ensurePrepared();
            return classHierarchyInfo.getNodeHierarchyChildren(ce.asOWLClass(),
                    direct, ns);
        }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    @Nonnull
    @Override
    public NodeSet<OWLClass> getSuperClasses(@Nonnull OWLClassExpression ce,
            boolean direct) {
        OWLClassNodeSet ns = new OWLClassNodeSet();
        if (!ce.isAnonymous()) {
            ensurePrepared();
            return classHierarchyInfo.getNodeHierarchyParents(ce.asOWLClass(),
                    direct, ns);
        }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.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));
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    @Nonnull
    @Override
    public NodeSet<OWLClass> getObjectPropertyDomains(
            @Nonnull OWLObjectPropertyExpression pe, boolean direct) {
        ensurePrepared();
        DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
        for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
            for (OWLObjectPropertyDomainAxiom axiom : ontology
                    .getObjectPropertyDomainAxioms(pe)) {
                result.addNode(getEquivalentClasses(axiom.getDomain()));
                if (!direct) {
                    result.addAllNodes(getSuperClasses(axiom.getDomain(), false)
                            .getNodes());
                }
            }
            for (OWLObjectPropertyExpression invPe : getInverseObjectProperties(
                    pe).getEntities()) {
                assert invPe != null;
                for (OWLObjectPropertyRangeAxiom axiom : ontology
                        .getObjectPropertyRangeAxioms(invPe)) {
                    result.addNode(getEquivalentClasses(axiom.getRange()));
                    if (!direct) {
                        result.addAllNodes(getSuperClasses(axiom.getRange(),
                                false).getNodes());
                    }
                }
            }
        }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    @Nonnull
    @Override
    public NodeSet<OWLClass> getObjectPropertyRanges(
            @Nonnull OWLObjectPropertyExpression pe, boolean direct) {
        ensurePrepared();
        DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
        for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
            for (OWLObjectPropertyRangeAxiom axiom : ontology
                    .getObjectPropertyRangeAxioms(pe)) {
                result.addNode(getEquivalentClasses(axiom.getRange()));
                if (!direct) {
                    result.addAllNodes(getSuperClasses(axiom.getRange(), false)
                            .getNodes());
                }
            }
            for (OWLObjectPropertyExpression invPe : getInverseObjectProperties(
                    pe).getEntities()) {
                assert invPe != null;
                for (OWLObjectPropertyDomainAxiom axiom : ontology
                        .getObjectPropertyDomainAxioms(invPe)) {
                    result.addNode(getEquivalentClasses(axiom.getDomain()));
                    if (!direct) {
                        result.addAllNodes(getSuperClasses(axiom.getDomain(),
                                false).getNodes());
                    }
                }
            }
        }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    @Nonnull
    @Override
    public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe,
            boolean direct) {
        ensurePrepared();
        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;
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    @Nonnull
    @Override
    public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) {
        ensurePrepared();
        DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
        for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
            for (OWLClassAssertionAxiom axiom : ontology
                    .getClassAssertionAxioms(ind)) {
                OWLClassExpression ce = axiom.getClassExpression();
                if (!ce.isAnonymous()) {
                    result.addNode(classHierarchyInfo.getEquivalents(ce
                            .asOWLClass()));
                    if (!direct) {
                        result.addAllNodes(getSuperClasses(ce, false)
                                .getNodes());
                    }
                }
            }
        }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

        return atomicConceptHierarchyNodeToNode(node);
    }
    public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression classExpression,boolean direct) {
        Node<OWLClass> equivalentToComplement=getEquivalentClasses(classExpression.getObjectComplementOf());
        if (direct && equivalentToComplement.getSize()>0)
            return new OWLClassNodeSet(equivalentToComplement);
        NodeSet<OWLClass> subsDisjoint=getSubClasses(classExpression.getObjectComplementOf(),direct);
        if (direct)
            return subsDisjoint;
        Set<Node<OWLClass>> result=new HashSet<Node<OWLClass>>();
        if (equivalentToComplement.getSize() > 0) result.add(equivalentToComplement);
        result.addAll(subsDisjoint.getNodes());
        return new OWLClassNodeSet(result);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    }
    public NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression propertyExpression,boolean direct) {
        checkPreConditions(propertyExpression);
        classify();
        if (!isConsistent())
            return new OWLClassNodeSet(getBottomClassNode());
        final Role role=H(propertyExpression);
        Set<HierarchyNode<AtomicConcept>> nodes=m_directObjectRoleDomains.get(role);
        if (nodes==null) {
            final Individual freshIndividualA=Individual.createAnonymous("fresh-individual-A");
            final Individual freshIndividualB=Individual.createAnonymous("fresh-individual-B");
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet

    }
    public NodeSet<OWLClass> getObjectPropertyRanges(OWLObjectPropertyExpression propertyExpression,boolean direct) {
        checkPreConditions(propertyExpression);
        classify();
        if (!isConsistent())
            return new OWLClassNodeSet(getBottomClassNode());
        final Role role=H(propertyExpression);
        Set<HierarchyNode<AtomicConcept>> nodes=m_directObjectRoleRanges.get(role);
        if (nodes==null) {
            final Individual freshIndividualA=Individual.createAnonymous("fresh-individual-A");
            final Individual freshIndividualB=Individual.createAnonymous("fresh-individual-B");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.