Examples of containsAxiom()


Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        OWLOntology reloaded = roundTrip(o, format);
        OWLAnnotationProperty ap = df
                .getOWLAnnotationProperty(iri("testProperty"));
        OWLDeclarationAxiom ax = df.getOWLDeclarationAxiom(ap);
        assertFalse("ap testProperty should not have been declared",
                reloaded.containsAxiom(ax));
    }

    @Test
    public void shouldDeclareMissingEntities()
            throws OWLOntologyCreationException, OWLOntologyStorageException {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        OWLOntology reloaded = roundTrip(o, format);
        OWLObjectProperty op = df
                .getOWLObjectProperty(iri("testObjectProperty"));
        OWLAnnotationProperty ap = df
                .getOWLAnnotationProperty(iri("testAnnotationProperty"));
        assertTrue(reloaded.containsAxiom(df.getOWLDeclarationAxiom(ap)));
        assertTrue(reloaded.containsAxiom(df.getOWLDeclarationAxiom(op)));
    }
}
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        OWLObjectProperty op = df
                .getOWLObjectProperty(iri("testObjectProperty"));
        OWLAnnotationProperty ap = df
                .getOWLAnnotationProperty(iri("testAnnotationProperty"));
        assertTrue(reloaded.containsAxiom(df.getOWLDeclarationAxiom(ap)));
        assertTrue(reloaded.containsAxiom(df.getOWLDeclarationAxiom(op)));
    }
}
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        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))));
    }

    @Test
    public void shouldParseScientificNotationWithMinus()
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        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))));
    }

    @Test
    public void shouldParseScientificNotationWithMinusFromBug()
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        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))));
    }

    @Test
    public void shouldParseOne() throws OWLOntologyCreationException {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        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))));
    }

    @Test
    public void shouldParseEmptySpaceInBnode()
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        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));
    }

    @Test
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

        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));
    }

    @Test
    public void shouldRoundTripAxiomAnnotation() throws Exception {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()

                + "AnnotationAssertion(Annotation(<http://x.org/p2> \"foo\") <http://x.org/p> <http://x.org/c> \"v1\"))";
        OWLOntology o = loadOntologyFromString(in);
        OWLOntology result = roundTrip(o, new ManchesterSyntaxDocumentFormat());
        for (OWLAxiom ax : o.getAxioms()) {
            assert ax != null;
            assertTrue(result.containsAxiom(ax));
        }
    }

    @Test
    public void shouldNotFailSubclass() throws Exception {
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.