Examples of asOWLNamedIndividual()


Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

        }
        String subj = consumeToken();
        OWLIndividual ind = getOWLIndividual(subj);
        if (!ind.isAnonymous()) {
            axioms.add(new OntologyAxiomPair(getOntology(null), dataFactory
                    .getOWLDeclarationAxiom(ind.asOWLNamedIndividual())));
        }
        parseFrameSections(false, axioms, ind, individualFrameSections);
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

    public void testPlainLiteralSerializationComments() throws Exception {
        OWLOntology o = m.createOntology();
        OWLIndividual i = df.getOWLNamedIndividual(IRI("urn:test#ind"));
        OWLLiteral l = m.getOWLDataFactory().getOWLLiteral("test",
                OWL2Datatype.RDF_PLAIN_LITERAL);
        m.addAxiom(o, df.getOWLAnnotationAssertionAxiom(df.getRDFSComment(), i
                .asOWLNamedIndividual().getIRI(), l));
        String expected = "<rdfs:comment>test</rdfs:comment>";
        assertTrue(saveOntology(o).toString().contains(expected));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

                            .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

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

                                    IndividualNodeSetPolicy.BY_SAME_AS)) {
                                result.addNode(getSameIndividuals(individual
                                        .asOWLNamedIndividual()));
                            } else {
                                result.addNode(new OWLNamedIndividualNode(
                                        individual.asOWLNamedIndividual()));
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

                    // turn not op(a b) into
                    // C(a) and not C or forall op not{b}
                    OWLIndividual individual=negAssertion.getObject();
                    OWLClass individualConcept;
                    if (individual.isAnonymous()) individualConcept=factory.getOWLClass(IRI.create("internal:anon#"+individual.asOWLAnonymousIndividual().getID().toString()));
                    else individualConcept=factory.getOWLClass(IRI.create("internal:nom#"+individual.asOWLNamedIndividual().getIRI().toString()));
                    OWLClassExpression notIndividualConcept=factory.getOWLObjectComplementOf(individualConcept);
                    OWLClassExpression allNotIndividualConcept=factory.getOWLObjectAllValuesFrom(prop,notIndividualConcept);
                    OWLClassExpression definition=factory.getOWLClass(IRI.create("internal:def#"+(replacementIndex++)));
                    axioms.m_conceptInclusions.add(new OWLClassExpression[] { factory.getOWLObjectComplementOf(definition), allNotIndividualConcept });
                    additionalFacts.add(factory.getOWLClassAssertionAxiom(definition,negAssertion.getSubject()));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

        if (ind.isAnonymous()) {
            anonymousIndividualAxioms.add(axiom);
            return true; // will be checked afterwards by rolling-up
        }
        OWLClassExpression c=axiom.getClassExpression();
        return reasoner.hasType(ind.asOWLNamedIndividual(),c,false);
    }
    public Boolean visit(OWLObjectPropertyAssertionAxiom axiom) {
        OWLIndividual sub=axiom.getSubject();
        OWLIndividual obj=axiom.getObject();
        if (sub.isAnonymous()||obj.isAnonymous()) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

        OWLIndividual obj=axiom.getObject();
        if (sub.isAnonymous()||obj.isAnonymous()) {
            anonymousIndividualAxioms.add(axiom);
            return true; // will be checked afterwards by rolling-up
        }
        return reasoner.hasObjectPropertyRelationship(sub.asOWLNamedIndividual(),axiom.getProperty(),obj.asOWLNamedIndividual());
    }
    public Boolean visit(OWLNegativeObjectPropertyAssertionAxiom axiom) {
        // see OWL 2 Syntax, Sec 11.2
        // No axiom in Ax of the following form contains anonymous individuals:
        // SameIndividual, DifferentIndividuals, NegativeObjectPropertyAssertion, and NegativeDataPropertyAssertion.
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

        OWLIndividual sub=axiom.getSubject();
        if (sub.isAnonymous()) {
            anonymousIndividualAxioms.add(axiom);
            return true; // will be checked afterwards by rolling-up
        }
        return reasoner.hasDataPropertyRelationship(sub.asOWLNamedIndividual(),axiom.getProperty().asOWLDataProperty(),axiom.getObject());
    }
    public Boolean visit(OWLNegativeDataPropertyAssertionAxiom axiom) {
        // see OWL 2 Syntax, Sec 11.2
        // No axiom in Ax of the following form contains anonymous individuals:
        // SameIndividual, DifferentIndividuals, NegativeObjectPropertyAssertion, and NegativeDataPropertyAssertion.
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

        public void visit(OWLClassAssertionAxiom axiom) {
            if (axiom.getClassExpression().isOWLThing())
                return;
            OWLIndividual node=axiom.getIndividual();
            if (!node.isAnonymous()) {
                namedNodes.add(node.asOWLNamedIndividual());
            }
            else {
                nodes.add(node.asOWLAnonymousIndividual());
                if (nodelLabels.containsKey(node)) {
                    nodelLabels.get(node).add(axiom.getClassExpression());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLIndividual.asOWLNamedIndividual()

            @Override
            public void visit(OWLClassAssertionAxiom axiom) {
                OWLIndividual ind = axiom.getIndividual();
                // Do not accept anonymous registry items.
                if (ind.isAnonymous()) return;
                IRI iri = ind.asOWLNamedIndividual().getIRI();
                int[] scores = checkScores(iri);
                OWLClassExpression type = axiom.getClassExpression();
                // If the type is stated to be a library, increase its library score.
                if (cRegistryLibrary.equals(type)) {
                    scores[0]++;
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.