Examples of OWLClass


Examples of org.semanticweb.owlapi.model.OWLClass

            }
        }

        @Override
        public OWLClassExpression visit(OWLObjectIntersectionOf ce) {
            OWLClass name = createNewName();
            for (OWLClassExpression op : ce.getOperands()) {
                axioms.add(getSCA(name, op.accept(this)));
            }
            return name;
        }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

        }

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

Examples of org.semanticweb.owlapi.model.OWLClass

        }

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

Examples of org.semanticweb.owlapi.model.OWLClass

        }

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

Examples of org.semanticweb.owlapi.model.OWLClass

            Set<OWLClassExpression> descs = new HashSet<>();
            for (OWLClassExpression op : ce.getOperands()) {
                OWLClassExpression flatOp = op.accept(this);
                if (flatOp.isAnonymous()
                        || signature.contains(flatOp.asOWLClass())) {
                    OWLClass name = createNewName();
                    descs.add(name);
                    axioms.add(ldf.getOWLSubClassOfAxiom(name, flatOp));
                } else {
                    descs.add(flatOp);
                }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

    protected Set<? extends OWLAxiom> createAxioms() {
        XMLWriterPreferences.getInstance().setUseNamespaceEntities(true);
        IRI iriA = IRI("http://owlapi.sourceforge.net/properties#propA");
        IRI iriB = IRI("http://owlapi.sourceforge.net/properties2#propB");
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLAnnotationProperty propA = AnnotationProperty(iriA);
        OWLAnnotationProperty propB = AnnotationProperty(iriB);
        axioms.add(Declaration(clsA));
        axioms.add(AnnotationAssertion(propA, clsA.getIRI(), Literal("value1")));
        axioms.add(AnnotationAssertion(propB, clsA.getIRI(), Literal("value2")));
        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, ObjectMinCardinality(3, prop, OWLThing())));
        assertEquals(getOnt().getAxioms(), axioms);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLLiteral literalWithLang = Literal("abc", "en");
        OWLClass cls = Class(iri("A"));
        OWLAnnotationProperty prop = AnnotationProperty(iri("prop"));
        OWLAnnotationAssertionAxiom ax = AnnotationAssertion(prop,
                cls.getIRI(), literalWithLang);
        Set<OWLAxiom> axioms = new HashSet<>();
        axioms.add(ax);
        axioms.add(Declaration(cls));
        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"));
        OWLClass clsB = Class(iri("B"));
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        axioms.add(SubClassOf(clsA, ObjectSomeValuesFrom(propP, clsB)));
        axioms.add(Declaration(clsB));
        axioms.add(Declaration(propP));
        assertEquals(getOnt().getAxioms(), axioms);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLClass

public class ObjectHasSelfTestCase extends AbstractFileRoundTrippingTestCase {

    @Test
    public void testCorrectAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClass clsA = Class(iri("A"));
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        axioms.add(SubClassOf(clsA, ObjectHasSelf(propP)));
        axioms.add(Declaration(propP));
        assertEquals(getOnt().getAxioms(), axioms);
    }
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.