Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.AddAxiom


        List<OWLObjectProperty> chain = new ArrayList<>();
        chain.add(first);
        chain.add(second);
        OWLAxiom ax = getDataFactory().getOWLSubPropertyChainOfAxiom(chain,
                first);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here


        if (Boolean.parseBoolean(value)) {
            OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(
                    getIRIFromOBOId(currentId));
            OWLAxiom ax = getDataFactory().getOWLTransitiveObjectPropertyAxiom(
                    prop);
            applyChange(new AddAxiom(getOntology(), ax));
        }
    }
View Full Code Here

        OWLAnnotation xrefAnnotation = getConsumer().parseXRef(value);
        IRI subject = getIRIFromOBOId(currentId);
        OWLAnnotationAssertionAxiom ax = getDataFactory()
                .getOWLAnnotationAssertionAxiom(xrefAnnotation.getProperty(),
                        subject, xrefAnnotation.getValue());
        applyChange(new AddAxiom(getOntology(), ax));
        if (getConsumer().isTypedef()
                && xrefAnnotation.getValue() instanceof IRI) {
            IRI xrefIRI = (IRI) xrefAnnotation.getValue();
            String typedefId = getConsumer().getCurrentId();
            getConsumer().addSymbolicIdMapping(typedefId, xrefIRI);
View Full Code Here

                } else {
                    con = ontologyManager.getOWLDataFactory().getOWLLiteral(
                            shortForm);
                }
                if (ontology.containsEntityInSignature(ent)) {
                    OWLOntologyChange chg = new AddAxiom(ont, ontologyManager
                            .getOWLDataFactory()
                            .getOWLAnnotationAssertionAxiom(
                                    ontologyManager.getOWLDataFactory()
                                            .getOWLAnnotationProperty(
                                                    annotationIRI),
View Full Code Here

            for (OWLAxiom ax : ont.getLogicalAxioms()) {
                assert ax != null;
                OWLAxiom dupAx = replacer.duplicateObject(ax);
                if (!ax.equals(dupAx)) {
                    addChange(new RemoveAxiom(ont, ax));
                    addChange(new AddAxiom(ont, dupAx));
                }
            }
        }
    }
View Full Code Here

            }
        }
        supers.remove(cls);
        for (OWLClassExpression sup : supers) {
            assert sup != null;
            addChange(new AddAxiom(targetOntology, getDataFactory()
                    .getOWLSubClassOfAxiom(cls, sup)));
        }
    }
View Full Code Here

    }

    @Nonnull
    @Override
    public AddAxiom createOntologyChange(@Nonnull OWLOntology ontology) {
        return new AddAxiom(ontology, getAxiom());
    }
View Full Code Here

        if (usePairwiseDisjointAxioms) {
            List<OWLClassExpression> descList = new ArrayList<>(
                    classExpressions);
            for (int i = 0; i < descList.size(); i++) {
                for (int j = i + 1; j < descList.size(); j++) {
                    addChange(new AddAxiom(targetOntology, getDataFactory()
                            .getOWLDisjointClassesAxiom(
                                    CollectionFactory.createSet(
                                            descList.get(i), descList.get(j)))));
                }
            }
        } else {
            addChange(new AddAxiom(targetOntology, getDataFactory()
                    .getOWLDisjointClassesAxiom(classExpressions)));
        }
    }
View Full Code Here

    private void createEquivalentClass(OWLClassExpression classExpression) {
        OWLAxiom ax = getDataFactory()
                .getOWLEquivalentClassesAxiom(
                        CollectionFactory.createSet(getCurrentClass(),
                                classExpression));
        getOWLOntologyManager().applyChange(new AddAxiom(ontology, ax));
    }
View Full Code Here

    void handleChild(@Nonnull AbstractOWLAxiomElementHandler h) {
        OWLAxiom axiom = h.getOWLObject();
        if (!axiom.isAnnotationAxiom()
                || handler.getConfiguration().isLoadAnnotationAxioms()) {
            handler.getOWLOntologyManager().applyChange(
                    new AddAxiom(handler.getOntology(), axiom));
        }
    }
View Full Code Here

TOP

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

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.