Package org.semanticweb.HermiT.model

Examples of org.semanticweb.HermiT.model.AtLeastConcept


        // out of their partition.
        int numberOfAtLeastPositiveDisjuncts=0;
        int numberOfAtLeastNegativeDisjuncts=0;
        for (int index=0;index<dlPredicates.length;index++)
            if (m_dlPredicates[index] instanceof AtLeastConcept) {
                AtLeastConcept atLeast=(AtLeastConcept)m_dlPredicates[index];
                if (atLeast.getToConcept() instanceof AtomicNegationConcept)
                    numberOfAtLeastNegativeDisjuncts++;
                else
                    numberOfAtLeastPositiveDisjuncts++;
            }
        m_firstAtLeastNegativeIndex=m_disjunctIndexesWithBacktrackings.length-numberOfAtLeastPositiveDisjuncts-numberOfAtLeastNegativeDisjuncts;
        m_firstAtLeastPositiveIndex=m_disjunctIndexesWithBacktrackings.length-numberOfAtLeastPositiveDisjuncts;
        int nextAtomicDisjunct=0;
        int nextAtLeastNegativeDisjunct=m_firstAtLeastNegativeIndex;
        int nextAtLeastPositiveDisjunct=m_firstAtLeastPositiveIndex;
        for (int index=0;index<dlPredicates.length;index++)
            if (m_dlPredicates[index] instanceof AtLeastConcept) {
                AtLeastConcept atLeast=(AtLeastConcept)m_dlPredicates[index];
                if (atLeast.getToConcept() instanceof AtomicNegationConcept)
                    m_disjunctIndexesWithBacktrackings[nextAtLeastNegativeDisjunct++]=new DisjunctIndexWithBacktrackings(index);
                else
                    m_disjunctIndexesWithBacktrackings[nextAtLeastPositiveDisjunct++]=new DisjunctIndexWithBacktrackings(index);
            } else
                m_disjunctIndexesWithBacktrackings[nextAtomicDisjunct++]=new DisjunctIndexWithBacktrackings(index);
View Full Code Here


                    for (DLClauseInfo dlClauseInfo : dlClauseInfosForXConcept)
                        if (!satisfiesDLClauseForBlockedX(dlClauseInfo,blockedX))
                            return false;
            }
            else if (tupleBuffer[0] instanceof AtLeastConcept) {
                AtLeastConcept atleast=(AtLeastConcept)tupleBuffer[0];
                if (m_extensionManager.containsRoleAssertion(atleast.getOnRole(),blocker,blockerParent) && m_extensionManager.containsConceptAssertion(atleast.getToConcept(), blockerParent)) {
                    // blocker possibly uses its parent to satisfy the existential, so check if it is satisfied after copying the labels
                    if (!isSatisfiedAtLeastForBlocked(atleast,blockedX,blocker,blockerParent)) {
                        return false;
                    }
                }
View Full Code Here

        m_binaryRetrieval1Bound.getBindingsBuffer()[1]=nonblockedX;
        m_binaryRetrieval1Bound.open();
        Object[] tupleBuffer=m_binaryRetrieval1Bound.getTupleBuffer();
        while (!m_binaryRetrieval1Bound.afterLast()) {
            if (tupleBuffer[0] instanceof AtLeastConcept) {
                AtLeastConcept atleast=(AtLeastConcept)tupleBuffer[0];
                checkAtLeastForNonblocked(atleast,nonblockedX);
            }
            m_binaryRetrieval1Bound.next();
        }
        for (DLClauseInfo dlClauseInfo : m_dlClauseInfos)
View Full Code Here

            switch (type1) {
            case 0:
                return ((AtomicConcept)c1).getIRI().compareTo(((AtomicConcept)c2).getIRI());
            case 1:
                {
                    AtLeastConcept l1=(AtLeastConcept)c1;
                    AtLeastConcept l2=(AtLeastConcept)c2;
                    int comparison=RoleComparator.INSTANCE.compare(l1.getOnRole(),l2.getOnRole());
                    if (comparison!=0)
                        return comparison;
                    return compare(l1.getToConcept(),l2.getToConcept());
                }
            case 2:
                {
                    ExistsDescriptionGraph g1=(ExistsDescriptionGraph)c1;
                    ExistsDescriptionGraph g2=(ExistsDescriptionGraph)c2;
View Full Code Here

            if (existentialConcept==null) {
                buffer.append(node.getNodeID());
                buffer.append(":(root)");
            }
            else if (existentialConcept instanceof AtLeastConcept) {
                AtLeastConcept atLeastConcept=(AtLeastConcept)existentialConcept;
                buffer.append(atLeastConcept.getOnRole().toString(m_debugger.getPrefixes()));
                buffer.append("  -->  ");
                buffer.append(node.getNodeID());
                buffer.append(":[");
                buffer.append(atLeastConcept.getToConcept().toString(m_debugger.getPrefixes()));
                buffer.append("]");
            }
            else {
                // Do nothing for now.
            }
View Full Code Here

                }
            }
            else {
                LiteralConcept toConcept=getLiteralConcept(filler);
                Role onRole=getRole(object.getProperty());
                AtLeastConcept atLeastConcept=AtLeastConcept.create(1,onRole,toConcept);
                if (!atLeastConcept.isAlwaysFalse())
                    m_headAtoms.add(Atom.create(atLeastConcept,X));
            }
        }
View Full Code Here

            m_headAtoms.add(roleAtom);
        }
        public void visit(OWLObjectMinCardinality object) {
            LiteralConcept toConcept=getLiteralConcept(object.getFiller());
            Role onRole=getRole(object.getProperty());
            AtLeastConcept atLeastConcept=AtLeastConcept.create(object.getCardinality(),onRole,toConcept);
            if (!atLeastConcept.isAlwaysFalse())
                m_headAtoms.add(Atom.create(atLeastConcept,X));
        }
View Full Code Here

        }
        public void visit(OWLDataSomeValuesFrom object) {
            if (!object.getProperty().isOWLBottomDataProperty()) {
                AtomicRole atomicRole=getAtomicRole(object.getProperty());
                LiteralConcept literalConcept=m_dataRangeConverter.convertDataRange(object.getFiller());
                AtLeastConcept atLeastConcept=AtLeastConcept.create(1,atomicRole,literalConcept);
                if (!atLeastConcept.isAlwaysFalse())
                    m_headAtoms.add(Atom.create(atLeastConcept,X));
            }
        }
View Full Code Here

                    if (dt2maxRangeCardinality.containsKey(dt) && n>dt2maxRangeCardinality.get(dt))
                        return;
                }
                AtomicRole atomicRole=getAtomicRole(object.getProperty());
                LiteralConcept literalConcept=m_dataRangeConverter.convertDataRange(object.getFiller());
                AtLeastConcept atLeastConcept=AtLeastConcept.create(object.getCardinality(),atomicRole,literalConcept);
                if (!atLeastConcept.isAlwaysFalse())
                    m_headAtoms.add(Atom.create(atLeastConcept,X));
            }
        }
View Full Code Here

                m_processedExistentials.clear();
                m_processedExistentials.addAll(node.getUnprocessedExistentials());
                for (int index=m_processedExistentials.size()-1;index>=0;index--) {
                    ExistentialConcept existentialConcept=m_processedExistentials.get(index);
                    if (existentialConcept instanceof AtLeastConcept) {
                        AtLeastConcept atLeastConcept=(AtLeastConcept)existentialConcept;
                        switch (isSatisfied(atLeastConcept,node)) {
                        case NOT_SATISFIED:
                            expandExistential(atLeastConcept,node);
                            extensionsChanged=true;
                            break;
View Full Code Here

TOP

Related Classes of org.semanticweb.HermiT.model.AtLeastConcept

Copyright © 2018 www.massapicom. 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.