Examples of OWLAnnotationProperty


Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

    }

    final public OWLAnnotationPropertyRangeAxiom AnnotationPropertyRange()
            throws ParseException {
        IRI range;
        OWLAnnotationProperty prop;
        Set<OWLAnnotation> axiomAnnos;
        jj_consume_token(ANNOTATIONPROPERTYRANGE);
        jj_consume_token(OPENPAR);
        axiomAnnos = AxiomAnnotationSet();
        prop = AnnotationPropertyIRI();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

    }

    @Test
    public void shouldBuildAnnotationProperty() {
        // given
        OWLAnnotationProperty expected = df.getOWLAnnotationProperty(iri);
        BuilderAnnotationProperty builder = new BuilderAnnotationProperty(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

        XMLWriterPreferences.getInstance().setUseNamespaceEntities(true);
        IRI iriA = IRI("http://owlapi.sourceforge.net/properties#propA");
        IRI iriB = IRI("http://owlapi.sourceforge.net/properties2#propB");
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLAnnotationProperty propA = AnnotationProperty(iriA);
        OWLAnnotationProperty propB = AnnotationProperty(iriB);
        axioms.add(Declaration(clsA));
        axioms.add(AnnotationAssertion(propA, clsA.getIRI(), Literal("value1")));
        axioms.add(AnnotationAssertion(propB, clsA.getIRI(), Literal("value2")));
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLLiteral literalWithLang = Literal("abc", "en");
        OWLClass cls = Class(iri("A"));
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(prop,
                cls.getIRI(), literalWithLang);
        Set<OWLAxiom> axioms = new HashSet<>();
        axioms.add(ax);
        axioms.add(Declaration(cls));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

    @Test
    public void shouldParseScientificNotation()
            throws OWLOntologyCreationException {
        String input = "<http://dbpedia.org/resource/South_Africa> <http://dbpedia.org/ontology/areaTotal> 1e+07 .";
        OWLOntology ontology = loadOntologyFromString(input);
        OWLAnnotationProperty p = AnnotationProperty(IRI("http://dbpedia.org/ontology/areaTotal"));
        assertTrue(ontology.getAnnotationPropertiesInSignature(EXCLUDED)
                .contains(p));
        IRI i = IRI("http://dbpedia.org/resource/South_Africa");
        assertTrue(ontology.containsAxiom(AnnotationAssertion(p, i,
                Literal("1.0E7", OWL2Datatype.XSD_DOUBLE))));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

    @Test
    public void shouldParseScientificNotationWithMinus()
            throws OWLOntologyCreationException {
        String input = "<http://dbpedia.org/resource/South_Africa> <http://dbpedia.org/ontology/areaTotal> 1e-07 .";
        OWLOntology ontology = loadOntologyFromString(input);
        OWLAnnotationProperty p = AnnotationProperty(IRI("http://dbpedia.org/ontology/areaTotal"));
        assertTrue(ontology.getAnnotationPropertiesInSignature(EXCLUDED)
                .contains(p));
        IRI i = IRI("http://dbpedia.org/resource/South_Africa");
        assertTrue(ontology.containsAxiom(AnnotationAssertion(p, i,
                Literal("1.0E-7", OWL2Datatype.XSD_DOUBLE))));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

    @Test
    public void shouldParseTwo() throws OWLOntologyCreationException {
        String input = "<http://dbpedia.org/resource/South_Africa> <http://dbpedia.org/ontology/areaTotal> 1 .";
        OWLOntology ontology = loadOntologyFromString(input);
        OWLAnnotationProperty p = AnnotationProperty(IRI("http://dbpedia.org/ontology/areaTotal"));
        assertTrue(ontology.getAnnotationPropertiesInSignature(EXCLUDED)
                .contains(p));
        IRI i = IRI("http://dbpedia.org/resource/South_Africa");
        assertTrue(ontology
                .containsAxiom(AnnotationAssertion(p, i, Literal(1))));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

    @Test
    public void shouldParseOne() throws OWLOntologyCreationException {
        String input = "<http://dbpedia.org/resource/South_Africa> <http://dbpedia.org/ontology/areaTotal> 1.0.";
        OWLOntology ontology = loadOntologyFromString(input);
        OWLAnnotationProperty p = AnnotationProperty(IRI("http://dbpedia.org/ontology/areaTotal"));
        assertTrue(ontology.getAnnotationPropertiesInSignature(EXCLUDED)
                .contains(p));
        IRI i = IRI("http://dbpedia.org/resource/South_Africa");
        assertTrue(ontology.containsAxiom(AnnotationAssertion(p, i,
                Literal("1.0", OWL2Datatype.XSD_DECIMAL))));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

        String input = "<http://taxonomy.wolterskluwer.de/practicearea/10112>\n a <http://schema.wolterskluwer.de/TaxonomyTerm> , <http://www.w3.org/2004/02/skos/core#Concept> ;\n"
                + "      <http://www.w3.org/2004/02/skos/core#broader>\n [] ;\n"
                + "      <http://www.w3.org/2004/02/skos/core#broader>\n [] .";
        OWLOntology ontology = loadOntologyFromString(input);
        OWLIndividual i = NamedIndividual(IRI("http://taxonomy.wolterskluwer.de/practicearea/10112"));
        OWLAnnotationProperty ap = AnnotationProperty(IRI("http://www.w3.org/2004/02/skos/core#broader"));
        OWLClass c = Class(IRI("http://www.w3.org/2004/02/skos/core#Concept"));
        OWLClass term = Class(IRI("http://schema.wolterskluwer.de/TaxonomyTerm"));
        assertTrue(ontology.containsAxiom(ClassAssertion(c, i)));
        assertTrue(ontology.containsAxiom(ClassAssertion(term, i)));
        assertTrue(ontology.containsEntityInSignature(ap));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLAnnotationProperty

        assertSame(datatypeCall1, datatypeCall2);
    }

    @Test
    public void getRDFSLabel() {
        OWLAnnotationProperty call1 = dataFactory.getRDFSLabel();
        OWLAnnotationProperty call2 = dataFactory.getRDFSLabel();
        assertSame(call1, call2);
    }
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.