Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLDataRange


public class DataComplementOfTestCase extends AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLDataRange intdr = Integer();
        OWLDataRange complement = DataComplementOf(intdr);
        OWLDataProperty p = DataProperty(iri("p"));
        OWLDataPropertyRangeAxiom ax = DataPropertyRange(p, complement);
        axioms.add(ax);
        axioms.add(Declaration(p));
        assertEquals(getOnt().getAxioms(), axioms);
View Full Code Here


    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLDatatype datatype = Datatype(IRI("http://www.ont.com/myont/mydatatype"));
        OWLDataRange dr = DataComplementOf(Integer());
        axioms.add(DatatypeDefinition(datatype, dr));
        axioms.add(Declaration(datatype));
        return axioms;
    }
View Full Code Here

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLDataProperty prop = DataProperty(iri("prop"));
        OWLDataRange dr = Integer();
        OWLClass base = Class(iri("A"));
        axioms.add(SubClassOf(base, DataMaxCardinality(3, prop, dr)));
        return axioms;
    }
View Full Code Here

        if (!configuration.isStrict() && complementOfObject == null) {
            complementOfObject = getResourceObject(mainNode, OWL_COMPLEMENT_OF,
                    true);
        }
        if (complementOfObject != null) {
            OWLDataRange operand = translateDataRange(complementOfObject);
            return dataFactory.getOWLDataComplementOf(operand);
        }
        IRI oneOfObject = getResourceObject(mainNode, OWL_ONE_OF, true);
        if (oneOfObject != null) {
            Set<OWLLiteral> literals = translatorAccessor
View Full Code Here

        }

        private void translateAsDataPropertyRange(@Nonnull IRI subject,
                @Nonnull IRI predicate, @Nonnull IRI object) {
            OWLDataPropertyExpression property = translateDataProperty(subject);
            OWLDataRange dataRange = translateDataRange(object);
            addAxiom(df.getOWLDataPropertyRangeAxiom(property, dataRange,
                    getPendingAnnotations()));
            consumeTriple(subject, predicate, object);
        }
View Full Code Here

        super(handler);
    }

    @Override
    void handleChild(@Nonnull AbstractOWLDataRangeHandler h) {
        OWLDataRange handledDataRange = h.getOWLObject();
        if (handledDataRange.isDatatype() && datatype == null) {
            datatype = handledDataRange.asOWLDatatype();
        } else {
            dataRange = handledDataRange;
        }
    }
View Full Code Here

                verifyNotNull(restrictedDataRange), facetRestrictions));
    }

    @Override
    void handleChild(@Nonnull AbstractOWLDataRangeHandler h) {
        OWLDataRange dr = h.getOWLObject();
        if (dr.isDatatype()) {
            restrictedDataRange = dr.asOWLDatatype();
        }
    }
View Full Code Here

        this.property = checkNotNull(property, "property cannot be null");
    }

    @Override
    public void addSignatureEntitiesToSet(Set<OWLEntity> entities) {
        OWLDataRange filler = getFiller();
        addSignatureEntitiesToSetForValue(entities, filler);
        addSignatureEntitiesToSetForValue(entities, property);
    }
View Full Code Here

        addSignatureEntitiesToSetForValue(entities, property);
    }

    @Override
    public void addAnonymousIndividualsToSet(Set<OWLAnonymousIndividual> anons) {
        OWLDataRange filler = getFiller();
        addAnonymousIndividualsToSetForValue(anons, filler);
    }
View Full Code Here

                ce.getProperty(), filler);
    }

    @Override
    public OWLClassExpression visit(@Nonnull OWLDataSomeValuesFrom ce) {
        OWLDataRange filler = ce.getFiller().accept(this);
        return dataFactory.getOWLDataSomeValuesFrom(ce.getProperty(), filler);
    }
View Full Code Here

TOP

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

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.