Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLClass


        Set<OntologyAxiomPair> axioms = new HashSet<>();
        if (!CLASS.matches(tok)) {
            throw new ExceptionBuilder().withKeyword(CLASS).build();
        }
        String subj = consumeToken();
        OWLClass cls = getOWLClass(subj);
        axioms.add(new OntologyAxiomPair(defaultOntology, dataFactory
                .getOWLDeclarationAxiom(cls)));
        parseFrameSections(eof, axioms, cls, classFrameSections);
        return axioms;
    }
View Full Code Here


        OWLObjectPropertyExpression prop = parseObjectPropertyExpression(false);
        String clsName = consumeToken();
        if (eof(clsName)) {
            throw new ExceptionBuilder().withObject().build();
        }
        OWLClass cls = getOWLClass(clsName);
        Set<OntologyAxiomPair> axioms = new HashSet<>();
        axioms.addAll(parseValuePartitionValues(onts, cls));
        for (OWLOntology ont : onts) {
            assert ont != null;
            axioms.add(new OntologyAxiomPair(ont, dataFactory
View Full Code Here

        Set<OWLClass> siblings = new HashSet<>();
        consumeToken(OPENBRACKET.keyword());
        String sep = COMMA.keyword();
        while (COMMA.matches(sep)) {
            String clsName = consumeToken();
            OWLClass cls = getOWLClass(clsName);
            siblings.add(cls);
            OWLSubClassOfAxiom ax = dataFactory.getOWLSubClassOfAxiom(cls,
                    superclass);
            for (OWLOntology ont : onts) {
                assert ont != null;
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public OWLClass Class() throws ParseException {
        OWLClass cls;
        jj_consume_token(CLASS);
        jj_consume_token(OPENPAR);
        cls = ClassIRI();
        jj_consume_token(CLOSEPAR);
        {
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public OWLClassAxiom DisjointUnion() throws ParseException {
        OWLClass cls;
        Set<OWLClassExpression> classExpressions;
        Set<OWLAnnotation> axiomAnnos;
        jj_consume_token(DISJOINTUNION);
        jj_consume_token(OPENPAR);
        axiomAnnos = AxiomAnnotationSet();
View Full Code Here

    }

    @Test
    public void shouldBuildClass() {
        // given
        OWLClass expected = df.getOWLClass(iri);
        BuilderClass builder = new BuilderClass(expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
View Full Code Here

    }

    @Test
    public void shouldBuildEntity() {
        // given
        OWLClass expected = df.getOWLClass(iri);
        BuilderEntity builder = new BuilderEntity(expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
View Full Code Here

        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, ObjectExactCardinality(3, prop, clsB)));
        assertEquals(getOnt().getAxioms(), axioms);
    }
View Full Code Here

        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

        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

TOP

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

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.