Examples of OWLObjectProperty


Examples of org.semanticweb.owlapi.model.OWLObjectProperty

                IRI.create("urn:primer#turtle"), new TurtleDocumentFormat());
        assertTrue(profile.checkOntology(turt).getViolations().isEmpty());
        // XXX somehow the Turtle parser introduces a tautology: the inverse of
        // inverse(hasParent) is hasParent
        // dropping said tautology to assert equality of the rest of the axioms
        OWLObjectProperty hasParent = df.getOWLObjectProperty(IRI
                .create("http://example.com/owl/families/hasParent"));
        turt.getOWLOntologyManager().removeAxiom(
                turt,
                df.getOWLInverseObjectPropertiesAxiom(
                        df.getOWLObjectInverseOf(hasParent), hasParent));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLNamedIndividual indA = NamedIndividual(IRI("http://example.com/place/112013e2-df48-4a34-8a9d-99ef572a395A"));
        OWLNamedIndividual indB = NamedIndividual(IRI("http://example.com/place/112013e2-df48-4a34-8a9d-99ef572a395B"));
        OWLObjectProperty property = ObjectProperty(IRI("http://example.com/place/123"));
        axioms.add(ObjectPropertyAssertion(property, indA, indB));
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

    @Nonnull
    @Override
    protected Set<OWLAxiom> getAxioms() {
        OWLClass clsA = createClass();
        OWLObjectProperty prop = createObjectProperty();
        OWLClassExpression descA = df.getOWLObjectSomeValuesFrom(prop,
                df.getOWLThing());
        Set<OWLClassExpression> classExpressions = new HashSet<>();
        classExpressions.add(clsA);
        classExpressions.add(descA);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLObjectProperty propA = ObjectProperty(iri("propA"));
        OWLObjectProperty propB = ObjectProperty(iri("propB"));
        axioms.add(EquivalentObjectProperties(propA, propB));
        axioms.add(Declaration(propA));
        axioms.add(Declaration(propB));
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLIndividual subject = AnonymousIndividual();
        OWLIndividual object = AnonymousIndividual();
        OWLObjectProperty prop = ObjectProperty(iri("prop"));
        Set<OWLAxiom> axioms = new HashSet<>();
        axioms.add(ObjectPropertyAssertion(prop, subject, object));
        axioms.add(Declaration(prop));
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

@SuppressWarnings("javadoc")
public class ObjectPropertySimplifierTestCase extends TestBase {

    @Test
    public void testNamedSimplification() {
        OWLObjectProperty p = ObjectProperty(IRI("p"));
        OWLObjectPropertyExpression exp = p.getSimplified();
        assertEquals(p, exp);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

        assertEquals(p, exp);
    }

    @Test
    public void testInverseSimplification() {
        OWLObjectProperty p = ObjectProperty(IRI("p"));
        OWLObjectPropertyExpression inv = ObjectInverseOf(p);
        OWLObjectPropertyExpression exp = inv.getSimplified();
        assertEquals(inv, exp);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

        assertEquals(inv, exp);
    }

    @Test
    public void testInverseInverseSimplification() {
        OWLObjectProperty p = ObjectProperty(IRI("p"));
        OWLObjectPropertyExpression inv = ObjectInverseOf(p);
        OWLObjectPropertyExpression inv2 = ObjectInverseOf(inv);
        OWLObjectPropertyExpression exp = inv2.getSimplified();
        assertEquals(p, exp);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

        assertEquals(p, exp);
    }

    @Test
    public void testInverseInverseInverseSimplification() {
        OWLObjectProperty p = ObjectProperty(IRI("p"));
        OWLObjectPropertyExpression inv = ObjectInverseOf(p);
        OWLObjectPropertyExpression inv2 = ObjectInverseOf(inv);
        OWLObjectPropertyExpression inv3 = ObjectInverseOf(inv2);
        OWLObjectPropertyExpression exp = inv3.getSimplified();
        assertEquals(inv, exp);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLObjectProperty

        AbstractFileRoundTrippingTestCase {

    @Test
    public void testContains() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLObjectProperty propQ = ObjectProperty(iri("q"));
        OWLObjectProperty propR = ObjectProperty(iri("r"));
        List<OWLObjectProperty> chain = new ArrayList<>();
        chain.add(propP);
        chain.add(propQ);
        axioms.add(df.getOWLSubPropertyChainOfAxiom(chain, propR));
        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.