Examples of OWLClass


Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLClass clsB = Class(iri("B"));
        OWLObjectProperty prop = ObjectProperty(iri("p"));
        axioms.add(Declaration(prop));
        axioms.add(SubClassOf(clsA, ObjectMinCardinality(3, prop, clsB)));
        assertEquals(getOnt().getAxioms(), axioms);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLClass clsB = Class(iri("B"));
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        axioms.add(SubClassOf(clsA, ObjectAllValuesFrom(propP, clsB)));
        axioms.add(Declaration(clsB));
        axioms.add(Declaration(propP));
        assertEquals(getOnt().getAxioms(), axioms);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

                + "      <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.OWLClass

        assertSame(call1, call2);
    }

    @Test
    public void getOWLThing() {
        OWLClass call1 = dataFactory.getOWLThing();
        OWLClass call2 = dataFactory.getOWLThing();
        assertSame(call1, call2);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        assertSame(call1, call2);
    }

    @Test
    public void getOWLNothing() {
        OWLClass call1 = dataFactory.getOWLNothing();
        OWLClass call2 = dataFactory.getOWLNothing();
        assertSame(call1, call2);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

    @Override
    protected OWLOntology createOntology() {
        OWLOntology ont = getOWLOntology("OntA");
        OWLObjectProperty prop = ObjectProperty(iri("propP"));
        OWLClass clsA = Class(iri("A"));
        OWLClass clsB = Class(iri("B"));
        OWLClassExpression desc = ObjectSomeValuesFrom(prop,
                ObjectSomeValuesFrom(prop, clsB));
        OWLAxiom ax = SubClassOf(clsA, desc);
        addAxiom(ont, ax);
        addAxiom(ont, Declaration(clsA));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractAxiomsRoundTrippingTestCase {

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLClass clsA = Class(iri("A"));
        OWLObjectProperty prop = ObjectProperty(iri("prop"));
        OWLClassExpression ce = ObjectSomeValuesFrom(prop.getInverseProperty(),
                clsA);
        Set<OWLAxiom> axioms = new HashSet<>();
        axioms.add(SubClassOf(Class(iri("B")), ce));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

                roundtripped.getLogicalAxioms());
    }

    @Nonnull
    private OWLOntology buildOntology() throws OWLOntologyCreationException {
        OWLClass c = Class(IRI(NS + "#C"));
        OWLClass d = Class(IRI(NS + "#D"));
        OWLClass e = Class(IRI(NS + "#E"));
        OWLClass f = Class(IRI(NS + "#F"));
        OWLOntology ontology = m.createOntology(IRI(NS));
        OWLDisjointClassesAxiom disjointClasses = DisjointClasses(
                ObjectUnionOf(c, d), ObjectUnionOf(c, e), ObjectUnionOf(c, f));
        m.addAxiom(ontology, disjointClasses);
        return ontology;
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

@SuppressWarnings("javadoc")
public class HasKeyTestCase extends AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        OWLClass cls = Class(IRI("http://example.com/Person"));
        OWLDataProperty propP = DataProperty(IRI("http://example.com/dataProperty"));
        OWLObjectProperty propQ = ObjectProperty(IRI("http://example.com/objectPoperty"));
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLHasKeyAxiom owlHasKeyAxiom = HasKey(cls, propQ, propP);
        axioms.add(owlHasKeyAxiom);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLDataProperty prop = DataProperty(iri("p"));
        axioms.add(SubClassOf(clsA, DataMinCardinality(3, prop, TopDatatype())));
        axioms.add(Declaration(prop));
        assertEquals(getOnt().getAxioms(), axioms);
    }
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.