Package org.semanticweb.owlapitools.builders

Examples of org.semanticweb.owlapitools.builders.BuilderPropertyChain


    @Test
    public void shouldBuildPropertyChain() {
        // given
        List<OWLObjectProperty> chain = new ArrayList<>(ops);
        BuilderPropertyChain builder = new BuilderPropertyChain(df)
                .withProperty(op).withAnnotations(annotations);
        for (OWLObjectPropertyExpression p : chain) {
            builder.withPropertyInChain(p);
        }
        OWLObject expected = df.getOWLSubPropertyChainOfAxiom(chain, op,
                annotations);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here


    public void shouldBuildPropertyChain() {
        // given
        List<OWLObjectProperty> chain = new ArrayList<>(ops);
        OWLSubPropertyChainOfAxiom expected = df.getOWLSubPropertyChainOfAxiom(
                chain, op, annotations);
        BuilderPropertyChain builder = new BuilderPropertyChain(expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
    }
View Full Code Here

    @Test
    public void shouldBuildPropertyChain() throws OWLOntologyCreationException {
        // given
        List<OWLObjectProperty> chain = new ArrayList<>(ops);
        BuilderPropertyChain builder = new BuilderPropertyChain(df)
                .withProperty(op).withAnnotations(annotations);
        for (OWLObjectPropertyExpression p : chain) {
            builder.withPropertyInChain(p);
        }
        OWLAxiom expected = df.getOWLSubPropertyChainOfAxiom(chain, op,
                annotations);
        OWLOntology o = m.createOntology();
        // when
        builder.applyChanges(o);
        // then
        assertTrue(o.containsAxiom(expected));
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapitools.builders.BuilderPropertyChain

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.