Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLObjectProperty


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


    @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, ObjectSomeValuesFrom(propP, clsB)));
        axioms.add(Declaration(clsB));
        axioms.add(Declaration(propP));
        assertEquals(getOnt().getAxioms(), axioms);
    }
View Full Code Here

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

    @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

    @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

        AbstractRoundTrippingTestCase {

    @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);
View Full Code Here

        assertSame(call1, call2);
    }

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

        assertSame(call1, call2);
    }

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

    @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));
        return axioms;
    }
View Full Code Here

    @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);
        Set<OWLAxiom> axioms2 = getOnt().getAxioms();
        assertTrue(axioms2.containsAll(axioms));
View Full Code Here

TOP

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

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.