Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom


    }

    @Test
    public void shouldBuildSubObjectProperty() {
        // given
        OWLSubObjectPropertyOfAxiom expected = df
                .getOWLSubObjectPropertyOfAxiom(op,
                        df.getOWLTopObjectProperty(), annotations);
        BuilderSubObjectProperty builder = new BuilderSubObjectProperty(
                expected, df);
        // when
View Full Code Here


    public void testSubObjectPropertyOfAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLObjectProperty propQ = ObjectProperty(iri("q"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLSubObjectPropertyOfAxiom ax = SubObjectPropertyOf(propP, propQ);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getObjectSubPropertyAxiomsForSubProperty(propP)
                .contains(ax));
        assertTrue(ont.getObjectSubPropertyAxiomsForSuperProperty(propQ)
View Full Code Here

        // specified. Here, hasSon and hasDaughter will be specified as
        // hasChild.
        OWLObjectProperty hasChild = factory.getOWLObjectProperty(IRI
                .create(ont.getOntologyID().getOntologyIRI().get()
                        + "#hasChild"));
        OWLSubObjectPropertyOfAxiom hasSonSubHasChildAx = factory
                .getOWLSubObjectPropertyOfAxiom(hasSon, hasChild);
        // Add the axiom
        manager.addAxiom(ont, hasSonSubHasChildAx);
        // And hasDaughter, which is also a sub property of hasChild
        manager.addAxiom(ont,
View Full Code Here

                OWLSubPropertyChainOfAxiom a = (OWLSubPropertyChainOfAxiom) axiom;
                Axiom ax = transformOWLSubPropertyChainOfAxiom(a);
                if(ax != null) res.add(ax);
                monitor.step(workDone, totalAxioms);
            } else if (axiom instanceof OWLSubObjectPropertyOfAxiom) {
                OWLSubObjectPropertyOfAxiom a = (OWLSubObjectPropertyOfAxiom) axiom;
                res.add(transformOWLSubObjectPropertyOfAxiom(a));
                monitor.step(++workDone, totalAxioms);
            } else if (axiom instanceof OWLReflexiveObjectPropertyAxiom) {
                OWLReflexiveObjectPropertyAxiom a = (OWLReflexiveObjectPropertyAxiom) axiom;
                res.add(transformOWLReflexiveObjectPropertyAxiom(a));
View Full Code Here

    }

    @Override
    protected Set<OWLAxiom> createParentPlacementAxioms(OWLObjectProperty freshEntity, OWLAPIProject project, ChangeGenerationContext context, Optional<OWLObjectProperty> parent) {
        if (parent.isPresent()) {
            OWLSubObjectPropertyOfAxiom ax = project.getDataFactory().getOWLSubObjectPropertyOfAxiom(freshEntity, parent.get());
            return Collections.<OWLAxiom>singleton(ax);
        }
        else {
            return Collections.emptySet();
        }
View Full Code Here

TOP

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

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.