Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLAxiom


        OWLObjectProperty prop = ObjectProperty(iri("propP"));
        OWLClass clsA = Class(iri("A"));
        OWLClass clsB = Class(iri("B"));
        OWLClassExpression desc = ObjectSomeValuesFrom(prop,
                ObjectSomeValuesFrom(prop, clsB));
        OWLAxiom ax = SubClassOf(clsA, desc);
        addAxiom(ont, ax);
        addAxiom(ont, Declaration(clsA));
        addAxiom(ont, Declaration(clsB));
        return ont;
    }
View Full Code Here


    @Nonnull
    private OWLOntology createOntology(@Nonnull OWLAnnotationProperty p)
            throws OWLOntologyCreationException {
        OWLClass a = Class(IRI("http://test.org/MissingDeclaration.owl#A"));
        OWLOntology ontology = m.createOntology();
        OWLAxiom axiom = AnnotationAssertion(p, a.getIRI(), Literal("Hello"));
        m.addAxiom(ontology, axiom);
        return ontology;
    }
View Full Code Here

    protected Set<OWLAxiom> getAxioms() {
        Set<OWLIndividual> individuals = new HashSet<>();
        for (int i = 0; i < 5; i++) {
            individuals.add(createIndividual());
        }
        OWLAxiom ax = df.getOWLDifferentIndividualsAxiom(individuals);
        return singleton(ax);
    }
View Full Code Here

        OWLClassExpression descA = df.getOWLObjectSomeValuesFrom(prop,
                df.getOWLThing());
        Set<OWLClassExpression> classExpressions = new HashSet<>();
        classExpressions.add(clsA);
        classExpressions.add(descA);
        OWLAxiom ax = df.getOWLEquivalentClassesAxiom(classExpressions);
        return singleton(ax);
    }
View Full Code Here

    @Test
    public void testCommasOnDisjointThree() {
        OWLClass a = df.getOWLClass(IRI.create("urn:A"));
        OWLClass b = df.getOWLClass(IRI.create("urn:B"));
        OWLClass c = df.getOWLClass(IRI.create("urn:C"));
        OWLAxiom ax = df.getOWLDisjointClassesAxiom(a, b, c);
        DLSyntaxObjectRenderer visitor = new DLSyntaxObjectRenderer();
        String render = visitor.render(ax);
        assertEquals("A ⊑ ¬ B, A ⊑ ¬ C, B ⊑ ¬ C", render);
    }
View Full Code Here

    @Test
    public void testCommasOnDisjointTwo() {
        OWLClass a = df.getOWLClass(IRI.create("urn:A"));
        OWLClass b = df.getOWLClass(IRI.create("urn:B"));
        OWLAxiom ax = df.getOWLDisjointClassesAxiom(a, b);
        DLSyntaxObjectRenderer visitor = new DLSyntaxObjectRenderer();
        String render = visitor.render(ax);
        assertEquals("A ⊑ ¬ B", render);
    }
View Full Code Here

    public void testCommasOnDisjointFour() {
        OWLClass a = df.getOWLClass(IRI.create("urn:A"));
        OWLClass b = df.getOWLClass(IRI.create("urn:B"));
        OWLClass c = df.getOWLClass(IRI.create("urn:C"));
        OWLClass d = df.getOWLClass(IRI.create("urn:D"));
        OWLAxiom ax = df.getOWLDisjointClassesAxiom(a, b, c, d);
        DLSyntaxObjectRenderer visitor = new DLSyntaxObjectRenderer();
        String render = visitor.render(ax);
        assertEquals("A ⊑ ¬ B, A ⊑ ¬ C, A ⊑ ¬ D, B ⊑ ¬ C, B ⊑ ¬ D, C ⊑ ¬ D",
                render);
    }
View Full Code Here

    @Nonnull
    @Override
    protected Set<OWLAxiom> getAxioms() {
        OWLIndividual ind = createIndividual();
        OWLClass cls = createClass();
        OWLAxiom ax = df.getOWLClassAssertionAxiom(cls, ind);
        return singleton(ax);
    }
View Full Code Here

                AnnotationProperty(iri("myOuterLabel")),
                Literal("Outer label"), outerOuterAnnos);
        OWLAnnotation annoInner = df.getOWLAnnotation(
                AnnotationProperty(iri("myLabel")), Literal("Label"),
                singleton(annoOuter));
        OWLAxiom ax = df.getOWLSubClassOfAxiom(Class(iri("A")),
                Class(iri("B")), singleton(annoInner));
        axioms.add(ax);
        return axioms;
    }
View Full Code Here

    @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

TOP

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

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.