Examples of OWLClass


Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractFileRoundTrippingTestCase {

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

Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLClass clsB = Class(iri("B"));
        OWLClass clsC = Class(iri("C"));
        axioms.add(SubClassOf(clsA, ObjectIntersectionOf(clsB, clsC)));
        assertEquals(getOnt().getAxioms(), axioms);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

    @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, DataMinCardinality(3, prop, dr)));
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractFileRoundTrippingTestCase {

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

Examples of org.semanticweb.owlapi.model.OWLClass

    @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, DataExactCardinality(3, prop, dr)));
        return axioms;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLDatatype dt = Datatype(iri("B"));
        OWLDataProperty propP = DataProperty(iri("p"));
        axioms.add(SubClassOf(clsA, DataSomeValuesFrom(propP, dt)));
        axioms.add(Declaration(dt));
        axioms.add(Declaration(propP));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        df = checkNotNull(dataFactory, "dataFactory cannot be null");
    }

    @Nonnull
    protected OWLClass createNewName() {
        OWLClass cls = df.getOWLClass(IRI.create(
                "http://www.semanticweb.org/ontology#", "X" + nameCounter));
        nameCounter++;
        return cls;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

            return ldf.getOWLSubClassOfAxiom(lhs, ce);
        }

        public Set<OWLAxiom> getAxioms() {
            axioms.clear();
            OWLClass lhs = ldf.getOWLThing();
            axioms.add(getSCA(lhs, rhs.accept(this)));
            return axioms;
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        }

        @Override
        public OWLClassExpression visit(OWLObjectAllValuesFrom ce) {
            if (signature.containsAll(ce.getFiller().getSignature())) {
                OWLClass name = createNewName();
                axioms.add(getSCA(name, ce.getFiller().accept(this)));
                return ldf.getOWLObjectAllValuesFrom(ce.getProperty(), name);
            } else {
                return ce;
            }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        }

        @Override
        public OWLClassExpression visit(OWLObjectExactCardinality ce) {
            if (signature.containsAll(ce.getFiller().getSignature())) {
                OWLClass name = createNewName();
                axioms.add(getSCA(name, ce.getFiller().accept(this)));
                return ldf.getOWLObjectExactCardinality(ce.getCardinality(),
                        ce.getProperty(), name);
            } else {
                return ce;
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.