Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty


    }

    @Test
    public void testGetSubProperties() {
        OWLOntology ont = getOWLOntology("OntA");
        OWLAnnotationProperty propP = AnnotationProperty(iri("propP"));
        OWLAnnotationProperty propQ = AnnotationProperty(iri("propQ"));
        OWLAnnotationProperty propR = AnnotationProperty(iri("propR"));
        ont.getOWLOntologyManager().addAxiom(ont,
                df.getOWLSubAnnotationPropertyOfAxiom(propP, propQ));
        ont.getOWLOntologyManager().addAxiom(ont,
                df.getOWLSubAnnotationPropertyOfAxiom(propP, propR));
        assertTrue(sub(
View Full Code Here


        AbstractAxiomsRoundTrippingTestCase {

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLAnnotationProperty subProp = AnnotationProperty(IRI("http://ont.com#myLabel"));
        OWLAnnotationProperty superProp = RDFSLabel();
        OWLAxiom ax = df.getOWLSubAnnotationPropertyOfAxiom(subProp, superProp);
        return singleton(ax);
    }
View Full Code Here

    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass cls = Class(iri("ClsA"));
        axioms.add(Declaration(cls));
        IRI object = IRI("http://www.semanticweb.org/owlapi#object");
        OWLAnnotationProperty prop = AnnotationProperty(IRI("http://www.semanticweb.org/owlapi#prop"));
        axioms.add(AnnotationAssertion(prop, cls.getIRI(), object));
        return axioms;
    }
View Full Code Here

    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        // Originally submitted by Timothy Redmond
        String ns = "http://another.com/ont";
        OWLClass a = Class(IRI(ns + "#A"));
        OWLAnnotationProperty p = AnnotationProperty(IRI(ns + "#p"));
        OWLObjectProperty q = ObjectProperty(IRI(ns + "#q"));
        OWLAnonymousIndividual h = AnonymousIndividual();
        OWLAnonymousIndividual i = AnonymousIndividual();
        Set<OWLAxiom> axioms = new HashSet<>();
        axioms.add(AnnotationAssertion(p, a.getIRI(), h));
View Full Code Here

        AbstractAxiomsRoundTrippingTestCase {

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLAnnotationProperty prop = RDFSComment();
        OWLAxiom ax = df.getOWLAnnotationPropertyDomainAxiom(prop,
                IRI("http://ont.com#A"));
        return singleton(ax);
    }
View Full Code Here

    public void testRoundTrip() throws Exception {
        String ns = "http://smi-protege.stanford.edu/ontologies/AnonymousIndividuals.owl";
        OWLClass a = Class(IRI(ns + "#A"));
        OWLAnonymousIndividual h = AnonymousIndividual();
        OWLAnonymousIndividual i = AnonymousIndividual();
        OWLAnnotationProperty p = AnnotationProperty(IRI(ns + "#p"));
        OWLObjectProperty q = ObjectProperty(IRI(ns + "#q"));
        OWLOntology ontology = m.createOntology(IRI(ns));
        OWLAnnotation annotation1 = df.getOWLAnnotation(p, h);
        m.addAxiom(ontology,
                df.getOWLAnnotationAssertionAxiom(a.getIRI(), annotation1));
View Full Code Here

    @Override
    protected OWLOntology createOntology() {
        try {
            OWLOntology ont = m.createOntology();
            OWLAnnotationProperty prop = AnnotationProperty(IRI("http://www.semanticweb.org/ontologies/test/annotationont#prop"));
            OWLLiteral value = Literal(33);
            OWLAnnotation annotation = df.getOWLAnnotation(prop, value);
            ont.getOWLOntologyManager().applyChange(
                    new AddOntologyAnnotation(ont, annotation));
            ont.getOWLOntologyManager().addAxiom(ont, Declaration(prop));
View Full Code Here

    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLAnonymousIndividual ind = AnonymousIndividual();
        OWLClass cls = Class(iri("A"));
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(prop,
                cls.getIRI(), ind);
        axioms.add(ax);
        axioms.add(Declaration(cls));
        return axioms;
View Full Code Here

    private static final IRI SUBJECT = IRI
            .create("http://owlapi.sourceforge.net/ontologies/test#X");

    @Nonnull
    private OWLAnnotationAssertionAxiom createAnnotationAssertionAxiom() {
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationValue value = Literal("value");
        return AnnotationAssertion(prop, SUBJECT, value);
    }
View Full Code Here

    }

    @Test
    public void testAnonAccessor() {
        OWLOntology ont = getOWLOntology("ontology");
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationValue value = Literal("value");
        OWLAnonymousIndividual a = AnonymousIndividual();
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(prop, a, value);
        ont.getOWLOntologyManager().addAxiom(ont, ax);
        assertTrue(ont.getAnnotationAssertionAxioms(a).contains(ax));
View Full Code Here

TOP

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

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.