Package org.semanticweb.owlapi.model

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


    @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

    @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

@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

        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

        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

        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

        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

        OWLOntology o = OWLManager.createOWLOntologyManager().createOntology();
        // SubObjectPropertyOf( ObjectPropertyChain( a:hasFather a:hasBrother )
        // a:hasUncle ) The brother of someone's father is that person's uncle.
        // SubObjectPropertyOf( ObjectPropertyChain( a:hasChild a:hasUncle )
        // a:hasBrother ) The uncle of someone's child is that person's brother.
        OWLObjectProperty father = df
                .getOWLObjectProperty(IRI("urn:test:hasFather"));
        OWLObjectProperty brother = df
                .getOWLObjectProperty(IRI("urn:test:hasBrother"));
        OWLObjectProperty child = df
                .getOWLObjectProperty(IRI("urn:test:hasChild"));
        OWLObjectProperty uncle = df
                .getOWLObjectProperty(IRI("urn:test:hasUncle"));
        o.getOWLOntologyManager()
                .addAxiom(o, df.getOWLDeclarationAxiom(father));
        o.getOWLOntologyManager().addAxiom(o,
                df.getOWLDeclarationAxiom(brother));
View Full Code Here

    }

    @Test
    public void shouldNotCauseViolations() throws OWLOntologyCreationException {
        OWLOntology o = OWLManager.createOWLOntologyManager().createOntology();
        OWLObjectProperty father = df
                .getOWLObjectProperty(IRI("urn:test:hasFather"));
        OWLObjectProperty brother = df
                .getOWLObjectProperty(IRI("urn:test:hasBrother"));
        OWLObjectProperty child = df
                .getOWLObjectProperty(IRI("urn:test:hasChild"));
        OWLObjectProperty uncle = df
                .getOWLObjectProperty(IRI("urn:test:hasUncle"));
        o.getOWLOntologyManager()
                .addAxiom(o, df.getOWLDeclarationAxiom(father));
        o.getOWLOntologyManager().addAxiom(o,
                df.getOWLDeclarationAxiom(brother));
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.