Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLIndividual


        return factory.getOWLSameIndividualAxiom(CollectionFactory.createSet(
                indA, indB));
    }

    private OWLAxiom parseClassAssertion() {
        OWLIndividual ind;
        OWLClassExpression desc;
        if (jj_2_15(5)) {
            jj_consume_token(OPENPAR);
            desc = parseDescription();
            jj_consume_token(CLOSEPAR);
View Full Code Here


        op = NamedClassOrNestedDescription();
        return factory.getOWLObjectComplementOf(op);
    }

    private OWLClassExpression parseObjectOneOf() {
        OWLIndividual ind;
        Set<OWLIndividual> inds = new HashSet<OWLIndividual>();
        jj_consume_token(OPENBRACE);
        ind = parseIndividualId();
        inds.add(ind);
        label_6: while (true) {
View Full Code Here

            throw new ParseException();
        }
    }

    private void Instance() {
        OWLIndividual ind;
        OWLClassExpression type;
        jj_consume_token(OPENPAR);
        jj_consume_token(INSTANCE);
        ind = IndividualName();
        type = ConceptExpression();
View Full Code Here

        jj_consume_token(CLOSEPAR);
        addAxiom(dataFactory.getOWLClassAssertionAxiom(type, ind));
    }

    private void Related() {
        OWLIndividual subj;
        OWLObjectProperty prop;
        OWLIndividual obj;
        jj_consume_token(OPENPAR);
        jj_consume_token(RELATED);
        subj = IndividualName();
        prop = RoleName();
        obj = IndividualName();
View Full Code Here

        addAxiom(dataFactory
                .getOWLObjectPropertyAssertionAxiom(prop, subj, obj));
    }

    private void Equal() {
        OWLIndividual indA, indB;
        Set<OWLIndividual> inds = new HashSet<OWLIndividual>();
        jj_consume_token(OPENPAR);
        jj_consume_token(EQUAL);
        indA = IndividualName();
        indB = IndividualName();
View Full Code Here

            super(consumer, v.getIRI());
        }

        @Override
        public void handleTriple(IRI subject, IRI predicate, IRI object) {
            OWLIndividual ind = df.getOWLNamedIndividual(subject);
            OWLClass skosConcept = df.getOWLClass(object);
            addAxiom(df.getOWLClassAssertionAxiom(skosConcept, ind));
        }
View Full Code Here

            for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
                for (OWLClass curCls : clses) {
                    assert curCls != null;
                    for (OWLClassAssertionAxiom axiom : ontology
                            .getClassAssertionAxioms(curCls)) {
                        OWLIndividual individual = axiom.getIndividual();
                        if (!individual.isAnonymous()) {
                            if (getIndividualNodeSetPolicy().equals(
                                    IndividualNodeSetPolicy.BY_SAME_AS)) {
                                result.addNode(getSameIndividuals(individual
                                        .asOWLNamedIndividual()));
                            } else {
                                result.addNode(new OWLNamedIndividualNode(
                                        individual.asOWLNamedIndividual()));
                            }
                        }
                    }
                }
            }
View Full Code Here

        inds.add(indB);
        addAxiom(dataFactory.getOWLSameIndividualAxiom(inds));
    }

    private void Distinct() {
        OWLIndividual indA, indB;
        Set<OWLIndividual> inds = new HashSet<OWLIndividual>();
        jj_consume_token(OPENPAR);
        jj_consume_token(DISTINCT);
        indA = IndividualName();
        indB = IndividualName();
View Full Code Here

        OWLNamedIndividual dl = df.getOWLNamedIndividual(dlIRI);
        OWLDataProperty rdfXMLPremiseOntologyProperty = df
                .getOWLDataProperty(premiseIRI);
        for (OWLClassAssertionAxiom ax : testCasesOntology
                .getClassAssertionAxioms(profileIdentificationTestClass)) {
            OWLIndividual ind = ax.getIndividual();
            Collection<OWLLiteral> vals = values(
                    testCasesOntology.getDataPropertyAssertionAxioms(ind),
                    rdfXMLPremiseOntologyProperty);
            if (vals.size() != 1) {
                continue;
View Full Code Here

    @Test
    public void testIndividualAssertions() throws OWLException {
        OWLOntologyManager m = create();
        OWLOntology o = m.createOntology(EXAMPLE_IRI);
        // We want to state that matthew has a father who is peter.
        OWLIndividual matthew = df.getOWLNamedIndividual(IRI.create(EXAMPLE_IRI
                + "#matthew"));
        OWLIndividual peter = df.getOWLNamedIndividual(IRI.create(EXAMPLE_IRI
                + "#peter"));
        // We need the hasFather property
        OWLObjectProperty hasFather = df.getOWLObjectProperty(IRI
                .create(EXAMPLE_IRI + "#hasFather"));
        // matthew --> hasFather --> peter
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.OWLIndividual

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.