Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom


        OWLAnnotationProperty prop = AnnotationProperty(IRI("http://owlapi.sourceforge.net/ontology#prop"));
        OWLLiteral lit1 = Literal(getEscape());
        OWLLiteral lit2 = Literal("Start" + getEscape());
        OWLLiteral lit3 = Literal(getEscape() + "End");
        OWLLiteral lit4 = Literal("Start" + getEscape() + "End");
        OWLAnnotationAssertionAxiom ax1 = AnnotationAssertion(prop,
                cls.getIRI(), lit1);
        OWLAnnotationAssertionAxiom ax2 = AnnotationAssertion(prop,
                cls.getIRI(), lit2);
        OWLAnnotationAssertionAxiom ax3 = AnnotationAssertion(prop,
                cls.getIRI(), lit3);
        OWLAnnotationAssertionAxiom ax4 = AnnotationAssertion(prop,
                cls.getIRI(), lit4);
        return Ontology(m, ax1, ax2, ax3, ax4, Declaration(cls));
    }
View Full Code Here


    @Test
    public void testContainsReferenceForAnnotationAssertion() {
        OWLAnnotationProperty ap = AnnotationProperty(iri("prop"));
        OWLLiteral val = Literal("Test", "");
        OWLAnnotationSubject subject = Class(iri("A")).getIRI();
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(ap, subject, val);
        OWLOntology ont = getOWLOntology("Ont");
        ont.getOWLOntologyManager().addAxiom(ont, ax);
        assertTrue(ont.containsAnnotationPropertyInSignature(ap.getIRI(),
                EXCLUDED));
        assertTrue(ont.getAnnotationPropertiesInSignature(EXCLUDED)
View Full Code Here

                anonymousIndividualSet.size());
        @SuppressWarnings("null")
        @Nonnull
        OWLAnonymousIndividual anonymousIndividual = anonymousIndividualSet
                .iterator().next();
        OWLAnnotationAssertionAxiom relAx = df.getOWLAnnotationAssertionAxiom(
                relProperty, IRI.create("http://example.com/ns#test"),
                anonymousIndividual);
        OWLLiteral notVisible = df.getOWLLiteral("Not visible", "");
        OWLAnnotationAssertionAxiom predAx = df.getOWLAnnotationAssertionAxiom(
                predProperty, anonymousIndividual, notVisible);
        assertTrue("should contain relax", annotationAxioms.contains(relAx));
        assertTrue("should contain predax", annotationAxioms.contains(predAx));
    }
View Full Code Here

        IRI subject = getConsumer().getCurrentEntity().getIRI();
        IRI annotationPropertyIRI = OBOVocabulary.ALT_ID.getIRI();
        OWLAnnotationProperty property = getDataFactory()
                .getOWLAnnotationProperty(annotationPropertyIRI);
        IRI object = getIRIFromOBOId(value);
        OWLAnnotationAssertionAxiom ax = getDataFactory()
                .getOWLAnnotationAssertionAxiom(property, subject, object);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

        IRI propertyIRI = getTagIRI(getTagName());
        OWLAnnotationProperty property = df
                .getOWLAnnotationProperty(propertyIRI);
        OWLEntity currentEntity = getConsumer().getCurrentEntity();
        OWLLiteral literal = df.getOWLLiteral(annotationValue);
        OWLAnnotationAssertionAxiom ax = df.getOWLAnnotationAssertionAxiom(
                property, currentEntity.getIRI(), literal, xrefAnnotations);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

            String comment) {
        OWLDataFactory df = getDataFactory();
        OWLAnnotationProperty deprecatedProperty = df.getOWLDeprecated();
        OWLLiteral annotationValue = df.getOWLLiteral(true);
        IRI subject = getIRIFromOBOId(currentId);
        OWLAnnotationAssertionAxiom ax = df.getOWLAnnotationAssertionAxiom(
                deprecatedProperty, subject, annotationValue);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

            }
            if (consumer.isOntology(subject)) {
                consumer.addOntologyAnnotation(df.getOWLAnnotation(prop,
                        object, getPendingAnnotations()));
            } else {
                OWLAnnotationAssertionAxiom ax = df
                        .getOWLAnnotationAssertionAxiom(prop,
                                annotationSubject, object,
                                getPendingAnnotations());
                addAxiom(ax);
            }
View Full Code Here

        consumeTriple(subject, predicate, object);
        if(getConsumer().isOntology(subject)) {
            getConsumer().addOntologyAnnotation(getDataFactory().getOWLAnnotation(getDataFactory().getOWLAnnotationProperty(predicate), object));
        }
        else {
            OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(getDataFactory().getOWLAnnotationProperty(predicate), subject, object, getPendingAnnotations());
            addAxiom(ax);
        }
    }
View Full Code Here

                                                                                                            // prop
                                                                                                            // tra
                                                                                                            // individui
        OWLDataPropertyAssertionAxiom axiomvalue = factory
                .getOWLDataPropertyAssertionAxiom(dp, obj, literal1); // Dataprop all'istanza;
        OWLAnnotationAssertionAxiom axioman = factory.getOWLAnnotationAssertionAxiom(cls.getIRI(), oav); // Annotazione

        mgr.addAxiom(ont, daxiomcls);
        mgr.addAxiom(ont, daxiomop);
        mgr.addAxiom(ont, daxiomdp);
        mgr.addAxiom(ont, daxiomsub);
View Full Code Here

                                                                                                            // prop
                                                                                                            // tra
                                                                                                            // individui
        OWLDataPropertyAssertionAxiom axiomvalue = factory
                .getOWLDataPropertyAssertionAxiom(dp, sub, literal1); // Dataprop all'istanza;
        OWLAnnotationAssertionAxiom axioman = factory.getOWLAnnotationAssertionAxiom(cls.getIRI(), oav); // Annotazione

        mgr.addAxiom(ont, daxiomcls);
        mgr.addAxiom(ont, daxiomop);
        mgr.addAxiom(ont, daxiomdp);
        mgr.addAxiom(ont, daxiomsub);
View Full Code Here

TOP

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

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.