Package org.semanticweb.HermiT.model

Examples of org.semanticweb.HermiT.model.LiteralConcept


        return true;
    }
    protected boolean isSatisfiedAtLeastForBlocked(AtLeastConcept atleast,Node blockedX, Node blocker,Node blockerParent) {
        Role r=atleast.getOnRole();
        LiteralConcept c=atleast.getToConcept();
        Node blockedXParent=blockedX.getParent();
        if (m_extensionManager.containsRoleAssertion(r,blockedX,blockedXParent)
                && m_extensionManager.containsConceptAssertion(c,blockedXParent))
            return true;
        // blockerParent cannot be used to satisfy the existential, so check whether the blocker has enough suitable children
View Full Code Here


    }
    protected void checkAtLeastForNonblocked(AtLeastConcept atleast,Node nonblocked) {
        int suitableSuccessors=0;
        int requiredSuccessors=atleast.getNumber();
        Role r=atleast.getOnRole();
        LiteralConcept c=atleast.getToConcept();
        Retrieval retrieval;
        int position;
        if (r instanceof AtomicRole) {
            retrieval=m_ternaryRetrieval01Bound;
            retrieval.getBindingsBuffer()[0]=r;
View Full Code Here

                    m_bodyAtoms.add(Atom.create(getConceptForNominal(individual),z));
                    m_headAtoms.add(getRoleAtom(object.getProperty(),X,z));
                }
            }
            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

            OWLObjectPropertyExpression objectProperty=object.getProperty();
            Atom roleAtom=getRoleAtom(objectProperty,X,X);
            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

                    atomicConcept=null;
            }
            else
                throw new IllegalStateException("Internal error: Invalid ontology normal form.");
            Role onRole=getRole(onObjectProperty);
            LiteralConcept toConcept=getLiteralConcept(filler);
            AnnotatedEquality annotatedEquality=AnnotatedEquality.create(cardinality,onRole,toConcept);
            Variable[] yVars=new Variable[cardinality+1];
            for (int i=0;i<yVars.length;i++) {
                yVars[i]=nextY();
                m_bodyAtoms.add(getRoleAtom(onObjectProperty,X,yVars[i]));
View Full Code Here

            throw new IllegalStateException("Internal error: invalid normal form.");
        }
        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 (!atLeastConcept.isAlwaysFalse())
                    m_headAtoms.add(Atom.create(atLeastConcept,X));
            }
        }
        public void visit(OWLDataAllValuesFrom object) {
            LiteralConcept literalConcept=m_dataRangeConverter.convertDataRange(object.getFiller());
            if (object.getProperty().isOWLTopDataProperty()) {
                if (literalConcept.isAlwaysFalse())
                    return; // bottom
            }
            Variable y=nextY();
            m_bodyAtoms.add(getRoleAtom(object.getProperty(),X,y));
            if (literalConcept instanceof AtomicNegationConcept) {
                AtomicConcept negatedConcept=((AtomicNegationConcept)literalConcept).getNegatedAtomicConcept();
                if (!negatedConcept.isAlwaysTrue())
                    m_bodyAtoms.add(Atom.create(negatedConcept,y));
            }
            else {
                if (!literalConcept.isAlwaysFalse())
                    m_headAtoms.add(Atom.create((DLPredicate)literalConcept,y));
            }
        }
View Full Code Here

                    String dt=dr.asOWLDatatype().getIRI().toString();
                    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_headAtoms.add(Atom.create(atLeastConcept,X));
            }
        }
        public void visit(OWLDataMaxCardinality object) {
            int number=object.getCardinality();
            LiteralConcept negatedDataRange=m_dataRangeConverter.convertDataRange(object.getFiller()).getNegation();
            ensureYNotZero();
            Variable[] yVars=new Variable[number+1];
            for (int i=0;i<yVars.length;i++) {
                yVars[i]=nextY();
                m_bodyAtoms.add(getRoleAtom(object.getProperty(),X,yVars[i]));
                if (negatedDataRange instanceof AtomicNegationConcept) {
                    AtomicConcept negatedConcept=((AtomicNegationConcept)negatedDataRange).getNegatedAtomicConcept();
                    if (!negatedConcept.isAlwaysTrue())
                        m_bodyAtoms.add(Atom.create(negatedConcept,yVars[i]));
                }
                else {
                    if (!negatedDataRange.isAlwaysFalse())
                        m_headAtoms.add(Atom.create((DLPredicate)negatedDataRange,yVars[i]));
                }
            }
            for (int i=0;i<yVars.length;i++)
                for (int j=i+1;j<yVars.length;j++)
View Full Code Here

        }

        // Various types of descriptions

        public void visit(OWLDatatype dt) {
            LiteralConcept literalConcept=m_dataRangeConverter.convertDataRange(dt);
            if (!literalConcept.isAlwaysFalse())
                m_headAtoms.add(Atom.create((DLPredicate)literalConcept,X));
        }
View Full Code Here

TOP

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

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.