Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLClassExpression


        @Override
        public OWLClassExpression visit(OWLObjectUnionOf ce) {
            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


        @Override
        public void visit(OWLClass ce) {
            List<OWLClassExpression> path = getClassExpressionPath();
            if (path.size() > 1) {
                OWLClassExpression prev = path.get(path.size() - 2);
                if (prev instanceof OWLObjectComplementOf) {
                    neg.add(ce);
                } else {
                    pos.add(ce);
                }
View Full Code Here

            IRI fillerIRI = getConsumer().getResourceObject(mainNode,
                    OWL_ON_CLASS, true);
            if (fillerIRI != null
                    && !getConsumer().getConfiguration().isStrict()) {
                // Be tolerant
                OWLClassExpression filler = accessor
                        .translateClassExpression(fillerIRI);
                return getDataFactory().getOWLObjectMaxCardinality(cardi,
                        property, filler);
            } else {
                return getDataFactory().getOWLObjectMaxCardinality(cardi,
View Full Code Here

            OWLObjectPropertyExpression property = getConsumer()
                    .translateObjectPropertyExpression(propertyIRI);
            IRI fillerIRI = getConsumer().getResourceObject(mainNode,
                    OWL_ON_CLASS, true);
            assert fillerIRI != null;
            OWLClassExpression filler = accessor
                    .translateClassExpression(fillerIRI);
            return getDataFactory().getOWLObjectMaxCardinality(cardi, property,
                    filler);
        }
View Full Code Here

            IRI fillerIRI = getConsumer().getResourceObject(mainNode,
                    OWL_ON_CLASS, true);
            if (fillerIRI != null
                    && !getConsumer().getConfiguration().isStrict()) {
                // Be tolerant
                OWLClassExpression filler = accessor
                        .translateClassExpression(fillerIRI);
                return getDataFactory().getOWLObjectMinCardinality(cardi,
                        property, filler);
            } else {
                return getDataFactory().getOWLObjectMinCardinality(cardi,
View Full Code Here

            OWLObjectPropertyExpression property = getConsumer()
                    .translateObjectPropertyExpression(propertyIRI);
            IRI fillerIRI = getConsumer().getResourceObject(mainNode,
                    OWL_ON_CLASS, true);
            assert fillerIRI != null;
            OWLClassExpression filler = accessor
                    .translateClassExpression(fillerIRI);
            return getDataFactory().getOWLObjectMinCardinality(cardi, property,
                    filler);
        }
View Full Code Here

    protected OWLOntology createOntology() {
        OWLOntology ont = getOWLOntology("OntA");
        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));
View Full Code Here

    @Nonnull
    @Override
    protected Set<? extends OWLAxiom> createAxioms() {
        OWLClass clsA = Class(iri("A"));
        OWLObjectProperty prop = ObjectProperty(iri("prop"));
        OWLClassExpression ce = ObjectSomeValuesFrom(prop.getInverseProperty(),
                clsA);
        Set<OWLAxiom> axioms = new HashSet<>();
        axioms.add(SubClassOf(Class(iri("B")), ce));
        return axioms;
    }
View Full Code Here

        if (ops.size() == 2) {
            return Collections.<OWLDisjointClassesAxiom> singleton(this);
        }
        Set<OWLDisjointClassesAxiom> result = new HashSet<>();
        for (int i = 0; i < ops.size() - 1; i++) {
            OWLClassExpression indI = ops.get(i);
            OWLClassExpression indJ = ops.get(i + 1);
            result.add(new OWLDisjointClassesAxiomImpl(new HashSet<>(Arrays
                    .asList(indI, indJ)), getAnnotations()));
        }
        return result;
    }
View Full Code Here

            OWLObjectPropertyExpression property = getConsumer()
                    .translateObjectPropertyExpression(propertyIRI);
            IRI fillerIRI = getConsumer().getResourceObject(mainNode,
                    OWL_ON_CLASS, true);
            assert fillerIRI != null;
            OWLClassExpression filler = accessor
                    .translateClassExpression(fillerIRI);
            return getDataFactory().getOWLObjectExactCardinality(cardi,
                    property, filler);
        }
View Full Code Here

TOP

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

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.