Examples of OWLDataProperty


Examples of org.semanticweb.owlapi.model.OWLDataProperty

        assertSame(call1, call2);
    }

    @Test
    public void getOWLBottomDataProperty() {
        OWLDataProperty call1 = dataFactory.getOWLBottomDataProperty();
        OWLDataProperty call2 = dataFactory.getOWLBottomDataProperty();
        assertSame(call1, call2);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLDataRange dr = DatatypeRestriction(Integer(),
                FacetRestriction(OWLFacet.MIN_INCLUSIVE, Literal(18)),
                FacetRestriction(OWLFacet.MAX_INCLUSIVE, Literal(30)));
        OWLDataProperty p = DataProperty(iri("p"));
        OWLDataPropertyRangeAxiom ax = DataPropertyRange(p, dr);
        axioms.add(ax);
        axioms.add(Declaration(p));
        assertEquals(getOnt().getAxioms(), axioms);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

        return axioms;
    }

    private void addAxiomForLiteral(@Nonnull OWLLiteral lit,
            @Nonnull Set<OWLAxiom> axioms) {
        OWLDataProperty prop = DataProperty(iri("p"));
        OWLNamedIndividual ind = NamedIndividual(iri("i"));
        axioms.add(DataPropertyAssertion(prop, ind, lit));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

public class HasKeyTestCase extends AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        OWLClass cls = Class(IRI("http://example.com/Person"));
        OWLDataProperty propP = DataProperty(IRI("http://example.com/dataProperty"));
        OWLObjectProperty propQ = ObjectProperty(IRI("http://example.com/objectPoperty"));
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLHasKeyAxiom owlHasKeyAxiom = HasKey(cls, propQ, propP);
        axioms.add(owlHasKeyAxiom);
        Set<OWLAxiom> axioms2 = getOnt().getAxioms();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    }

    @Test
    public void testPlainLiteralSerialization() throws Exception {
        OWLOntology o = m.createOntology();
        OWLDataProperty p = m.getOWLDataFactory().getOWLDataProperty(
                IRI("urn:test#p"));
        OWLIndividual i = m.getOWLDataFactory().getOWLNamedIndividual(
                IRI("urn:test#ind"));
        OWLLiteral l = m.getOWLDataFactory().getOWLLiteral("test",
                OWL2Datatype.RDF_PLAIN_LITERAL);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLDataProperty prop = DataProperty(iri("p"));
        axioms.add(SubClassOf(clsA, DataMinCardinality(3, prop, TopDatatype())));
        axioms.add(Declaration(prop));
        assertEquals(getOnt().getAxioms(), axioms);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

        // here I negate dr
        OWLDataIntersectionOf disj2 = DataIntersectionOf(DataComplementOf(dt),
                dr);
        // here I negate dt
        OWLDataUnionOf union = DataUnionOf(disj1, disj2);
        OWLDataProperty prop = DataProperty(iri("prop"));
        OWLDataPropertyRangeAxiom ax = DataPropertyRange(prop, union);
        return singleton(ax);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    @Nonnull
    @Override
    protected Set<OWLAxiom> getAxioms() {
        OWLIndividual subj = createIndividual();
        OWLDataProperty prop = createDataProperty();
        OWLLiteral obj = df.getOWLLiteral("TestConstant");
        OWLAxiom ax = df.getOWLNegativeDataPropertyAssertionAxiom(prop, subj,
                obj);
        return singleton(ax);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    private static final String NS = "urn:test";

    @Test
    public void shouldDoCompleteRoundtrip() throws Exception {
        OWLClass a = Class(IRI(NS + "#A"));
        OWLDataProperty p = df.getOWLDataProperty(IRI(NS + "#P"));
        SWRLVariable x = df.getSWRLVariable(IRI(NS + "#X"));
        SWRLVariable y = df.getSWRLVariable(IRI(NS + "#Y"));
        OWLOntology ontology = m.createOntology(IRI(NS));
        Set<SWRLAtom> body = new TreeSet<>();
        body.add(df.getSWRLDataPropertyAtom(p, x, y));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLDataProperty

    }

    @Test
    public void shouldDoCompleteRoundtripManchesterOWLSyntax() throws Exception {
        OWLClass a = Class(IRI(NS + "#A"));
        OWLDataProperty p = df.getOWLDataProperty(IRI(NS + "#P"));
        SWRLVariable x = df.getSWRLVariable(IRI(NS + "#X"));
        SWRLVariable y = df.getSWRLVariable(IRI(NS + "#Y"));
        OWLOntology ontology = m.createOntology(IRI(NS));
        Set<SWRLAtom> body = new TreeSet<>();
        body.add(df.getSWRLDataPropertyAtom(p, x, y));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.