Package org.semanticweb.HermiT.model

Examples of org.semanticweb.HermiT.model.AtomicConcept


            return;
        }
        String conceptName=args[1];
        CharArrayWriter buffer=new CharArrayWriter();
        PrintWriter writer=new PrintWriter(buffer);
        AtomicConcept atomicConcept=null;
        try {
            atomicConcept=AtomicConcept.create(m_debugger.getPrefixes().expandAbbreviatedIRI(conceptName));
            writer.println("Nodes for '"+conceptName+"'");
            writer.println("====================================================================");
            int index=0;
View Full Code Here


        m_binaryRetrieval1Bound.getBindingsBuffer()[1]=blocker;
        m_binaryRetrieval1Bound.open();
        Object[] tupleBuffer=m_binaryRetrieval1Bound.getTupleBuffer();
        while (!m_binaryRetrieval1Bound.afterLast()) {
            if (tupleBuffer[0] instanceof AtomicConcept) {
                AtomicConcept atomicConcept=(AtomicConcept)tupleBuffer[0];
                List<DLClauseInfo> dlClauseInfosForXConcept=m_dlClauseInfosByXConcepts.get(atomicConcept);
                if (dlClauseInfosForXConcept!=null)
                    for (DLClauseInfo dlClauseInfo : dlClauseInfosForXConcept)
                        if (!satisfiesDLClauseForBlockedX(dlClauseInfo,blockedX))
                            return false;
View Full Code Here

            return;
        }
        ExistentialExpansionStrategy strategy=m_debugger.getTableau().getExistentialsExpansionStrategy();
        if (strategy instanceof IndividualReuseStrategy) {
            IndividualReuseStrategy reuseStrategy=(IndividualReuseStrategy)strategy;
            AtomicConcept conceptForNode=reuseStrategy.getConceptForNode(node);
            m_debugger.getOutput().print("Node '");
            m_debugger.getOutput().print(node.getNodeID());
            m_debugger.getOutput().print("' is ");
            if (conceptForNode==null)
                m_debugger.getOutput().println("not a reuse node for any concept.");
            else {
                m_debugger.getOutput().print("a reuse node for the '");
                m_debugger.getOutput().print(conceptForNode.toString(m_debugger.getPrefixes()));
                m_debugger.getOutput().println("' concept.");
            }
        }
        else
            m_debugger.getOutput().println("Node reuse strategy is not currently in effect.");
View Full Code Here

                    m_positiveFacts.add(Atom.create(Inequality.create(),getIndividual(individuals[i]),getIndividual(individuals[j])));
        }
        public void visit(OWLClassAssertionAxiom object) {
            OWLClassExpression description=object.getClassExpression();
            if (description instanceof OWLClass) {
                AtomicConcept atomicConcept=AtomicConcept.create(((OWLClass)description).getIRI().toString());
                m_positiveFacts.add(Atom.create(atomicConcept,getIndividual(object.getIndividual())));
            }
            else if (description instanceof OWLObjectComplementOf && ((OWLObjectComplementOf)description).getOperand() instanceof OWLClass) {
                AtomicConcept atomicConcept=AtomicConcept.create(((OWLClass)((OWLObjectComplementOf)description).getOperand()).getIRI().toString());
                m_negativeFacts.add(Atom.create(atomicConcept,getIndividual(object.getIndividual())));
            }
            else if (description instanceof OWLObjectHasSelf) {
                OWLObjectHasSelf self=(OWLObjectHasSelf)description;
                m_positiveFacts.add(getRoleAtom(self.getProperty(),getIndividual(object.getIndividual()),getIndividual(object.getIndividual())));
View Full Code Here

        bodyAtoms.toArray(bAtoms);
        DLClause clause=DLClause.createEx(true,hAtoms,bAtoms,ClauseType.HAS_KEY);
        return clause;
    }
    protected static AtomicConcept getNominalConcept(OWLIndividual individual) {
        AtomicConcept result;
        if (individual.isAnonymous()) {
            result=AtomicConcept.create("internal:anon#"+individual.asOWLAnonymousIndividual().getID().toString());
        }
        else {
            result=AtomicConcept.create("internal:nom#"+individual.asOWLNamedIndividual().getIRI().toString());
View Full Code Here

                    if (!ind.isAnonymous()) {
                        String indIRI=ind.getIRI();
                        OWLClass classForIndividual=factory.getOWLClass(IRI.create("internal:individual-concept#"+indIRI));
                        OWLAxiom axiom=factory.getOWLClassAssertionAxiom(classForIndividual,factory.getOWLNamedIndividual(IRI.create(indIRI)));
                        additionalAxioms.add(axiom);
                        AtomicConcept conceptForRole=AtomicConcept.create("internal:individual-concept#"+((AtomicRole)objectRole).getIRI()+"#"+indIRI);
                        OWLClass classForRoleAndIndividual=factory.getOWLClass(IRI.create(conceptForRole.getIRI()));
                        // A_a implies forall r.A_a^r
                        axiom=factory.getOWLSubClassOfAxiom(classForIndividual,factory.getOWLObjectAllValuesFrom(objectProperty,classForRoleAndIndividual));
                        additionalAxioms.add(axiom);
                        // A_a^r implies forall r.A_a^r
                        axiom=factory.getOWLSubClassOfAxiom(classForRoleAndIndividual,factory.getOWLObjectAllValuesFrom(objectProperty,classForRoleAndIndividual));
View Full Code Here

                    }
                    retrieval.next();
                }
                // add more possible relations for complex properties
                String indIRI=ind.getIRI();
                AtomicConcept conceptForRole;
                for (Role objectRole : complexObjectRoles) {
                    if (objectRole instanceof AtomicRole) {
                        conceptForRole=AtomicConcept.create("internal:individual-concept#"+((AtomicRole)objectRole).getIRI()+"#"+indIRI);
                    } else {
                        conceptForRole=AtomicConcept.create("internal:individual-concept#inv#"+((InverseRole)objectRole).getInverseOf().getIRI()+"#"+indIRI);
View Full Code Here

                DLPredicate headPredicate=dlClause.getHeadAtom(0).getDLPredicate();
                DLPredicate bodyPredicate=dlClause.getBodyAtom(0).getDLPredicate();
                if (headPredicate instanceof AtomicRole && m_conceptsForRoles.containsKey(headPredicate) && bodyPredicate instanceof AtomicRole && m_conceptsForRoles.containsKey(bodyPredicate)) {
                    AtomicRole headRole=(AtomicRole)headPredicate;
                    AtomicRole bodyRole=(AtomicRole)bodyPredicate;
                    AtomicConcept conceptForHeadRole=m_conceptsForRoles.get(headRole);
                    AtomicConcept conceptForBodyRole=m_conceptsForRoles.get(bodyRole);
                    assert conceptForBodyRole!=null;
                    assert conceptForHeadRole!=null;
                    if (dlClause.getBodyAtom(0).getArgument(0)!=dlClause.getHeadAtom(0).getArgument(0)) {
                        // r -> s^- and r^- -> s
                        AtomicConcept conceptForBodyInvRole=m_conceptsForRoles.get(bodyRole.getInverse());
                        addKnownSubsumption(conceptForBodyInvRole,conceptForHeadRole);
                    }
                    else {
                        // r-> s and r^- -> s^-
                        addKnownSubsumption(conceptForBodyRole,conceptForHeadRole);
View Full Code Here

        }
    }
    protected void addKnownSubsumption(AtomicConcept subConcept,AtomicConcept superConcept) {
        super.addKnownSubsumption(subConcept,superConcept);
        if (m_hasInverses) {
            AtomicConcept subConceptForInverse=m_conceptsForRoles.get((m_rolesForConcepts.get(subConcept)).getInverse());
            AtomicConcept superConceptForInverse=m_conceptsForRoles.get((m_rolesForConcepts.get(superConcept)).getInverse());
            super.addKnownSubsumption(subConceptForInverse,superConceptForInverse);
        }
    }
View Full Code Here

        }
    }
    protected void addPossibleSubsumption(AtomicConcept subConcept,AtomicConcept superConcept) {
        super.addPossibleSubsumption(subConcept,superConcept);
        if (m_hasInverses) {
            AtomicConcept subConceptForInverse=m_conceptsForRoles.get((m_rolesForConcepts.get(subConcept)).getInverse());
            AtomicConcept superConceptForInverse=m_conceptsForRoles.get((m_rolesForConcepts.get(superConcept)).getInverse());
            super.addPossibleSubsumption(subConceptForInverse,superConceptForInverse);
        }
    }
View Full Code Here

TOP

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

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.