Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom


    }

    @Test
    public void shouldBuildFunctionalDataProperty() {
        // given
        OWLFunctionalDataPropertyAxiom expected = df
                .getOWLFunctionalDataPropertyAxiom(dp, annotations);
        BuilderFunctionalDataProperty builder = new BuilderFunctionalDataProperty(
                expected, df);
        // when
        OWLObject built = builder.buildObject();
View Full Code Here


    @Override
    protected void addAxioms(OWLDataProperty entity,
            @Nonnull OWLReasoner reasoner, OWLDataFactory dataFactory,
            Set<OWLDataPropertyCharacteristicAxiom> result) {
        OWLFunctionalDataPropertyAxiom axiom = dataFactory
                .getOWLFunctionalDataPropertyAxiom(entity);
        if (reasoner.isEntailed(axiom)) {
            result.add(axiom);
        }
    }
View Full Code Here

        OWLDataFactory factory = man.getOWLDataFactory();
        OWLDataProperty hasAge = factory.getOWLDataProperty(IRI.create(base
                + "hasAge"));
        // For completeness, we will make hasAge functional by adding an axiom
        // to state this
        OWLFunctionalDataPropertyAxiom funcAx = factory
                .getOWLFunctionalDataPropertyAxiom(hasAge);
        man.applyChange(new AddAxiom(ont, funcAx));
        // Now create the data range which correponds to int greater than 18. To
        // do this, we get hold of the int datatype and then restrict it with a
        // minInclusive facet restriction.
View Full Code Here

                factory.getOWLSubObjectPropertyOfAxiom(hasDaughter, hasChild));
        // Property characteristics //Next, we want to say that the hasAge
        // property is Functional. This means that something can have at most
        // one hasAge property. We can do this with a functional data property
        // axiom First create the axiom
        OWLFunctionalDataPropertyAxiom hasAgeFuncAx = factory
                .getOWLFunctionalDataPropertyAxiom(hasAge);
        // Now add it to the ontology
        manager.addAxiom(ont, hasAgeFuncAx);
        // The hasWife property should be Functional, InverseFunctional,
        // Irreflexive and Asymmetric. Note that the asymmetric property axiom
View Full Code Here

    @Test
    public void testFunctionalDataPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLDataProperty propP = DataProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLFunctionalDataPropertyAxiom ax = FunctionalDataProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getFunctionalDataPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isFunctional(propP, ont));
View Full Code Here

*/
public class InferredDataPropertyCharacteristicAxiomGenerator extends InferredDataPropertyAxiomGenerator<OWLDataPropertyCharacteristicAxiom> {


    protected void addAxioms(OWLDataProperty entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDataPropertyCharacteristicAxiom> result) {
        OWLFunctionalDataPropertyAxiom axiom = dataFactory.getOWLFunctionalDataPropertyAxiom(entity);
        if (reasoner.isEntailed(axiom) && reasoner.isEntailed(axiom)) {
            result.add(axiom);
        }
    }
View Full Code Here

public class InferredDataPropertyCharacteristicAxiomGenerator extends InferredDataPropertyAxiomGenerator<OWLDataPropertyCharacteristicAxiom> {


    @Override
  protected void addAxioms(OWLDataProperty entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLDataPropertyCharacteristicAxiom> result) {
        OWLFunctionalDataPropertyAxiom axiom = dataFactory.getOWLFunctionalDataPropertyAxiom(entity);
        if (reasoner.isEntailed(axiom) && reasoner.isEntailed(axiom)) {
            result.add(axiom);
        }
    }
View Full Code Here

TOP

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

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.