Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.RemoveAxiom


                        .getSubClassAxiomsForSubClass(cls);
                if (axioms.size() > 1) {
                    Set<OWLClassExpression> superClasses = new HashSet<>();
                    for (OWLSubClassOfAxiom ax : axioms) {
                        assert ax != null;
                        addChange(new RemoveAxiom(ont, ax));
                        superClasses.add(ax.getSuperClass());
                    }
                    OWLClassExpression combinedSuperClass = getDataFactory()
                            .getOWLObjectIntersectionOf(superClasses);
                    addChange(new AddAxiom(ont, getDataFactory()
View Full Code Here


        Set<OWLClassExpression> descs = new HashSet<>();
        for (OWLOntology ont : ontologies) {
            assert ont != null;
            for (OWLSubClassOfAxiom ax : ont.getSubClassAxiomsForSubClass(cls)) {
                assert ax != null;
                addChange(new RemoveAxiom(ont, ax));
                descs.add(ax.getSuperClass());
            }
        }
        OWLClassExpression equivalentClass = getDataFactory()
                .getOWLObjectIntersectionOf(descs);
View Full Code Here

    }

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

    private void generateChanges(@Nonnull Set<OWLOntology> ontologies) {
        for (OWLOntology ont : ontologies) {
            assert ont != null;
            for (OWLClassAxiom ax : ont.getAxioms(AxiomType.DISJOINT_CLASSES)) {
                assert ax != null;
                addChange(new RemoveAxiom(ont, ax));
            }
        }
    }
View Full Code Here

                            processed.add(ent);
                            add(ent);
                        }
                    }
                } else if (chg.isRemoveAxiom()) {
                    RemoveAxiom remAx = (RemoveAxiom) chg;
                    for (OWLEntity ent : remAx.getSignature()) {
                        assert ent != null;
                        if (!processed.contains(ent)) {
                            processed.add(ent);
                            boolean stillRef = false;
                            for (OWLOntology ont : ontologies) {
View Full Code Here

        checkNotNull(entity, "entity cannot be null");
        for (OWLOntology ont : ontologies) {
            assert ont != null;
            for (OWLAxiom ax : ont.getReferencingAxioms(entity, EXCLUDED)) {
                assert ax != null;
                changes.add(new RemoveAxiom(ont, ax));
            }
            for (OWLAnnotationAssertionAxiom ax : ont
                    .getAnnotationAssertionAxioms(entity.getIRI())) {
                assert ax != null;
                changes.add(new RemoveAxiom(ont, ax));
            }
        }
    }
View Full Code Here

        // add the axiom to the ontology.
        AddAxiom addAxiom = new AddAxiom(o, axiom);
        // We now use the manager to apply the change
        m.applyChange(addAxiom);
        // remove the axiom from the ontology
        RemoveAxiom removeAxiom = new RemoveAxiom(o, axiom);
        m.applyChange(removeAxiom);
    }
View Full Code Here

    private static void fillListWithTransformChanges(
            List<OWLOntologyChange> changes, Set<OWLAxiom> axioms,
            @Nonnull OWLOntology ont, OWLObjectDuplicator duplicator) {
        for (OWLAxiom ax : axioms) {
            assert ax != null;
            changes.add(new RemoveAxiom(ont, ax));
            OWLAxiom dupAx = duplicator.duplicateObject(ax);
            changes.add(new AddAxiom(ont, dupAx));
        }
    }
View Full Code Here

    public List<OWLOntologyChange> removeAxioms(@Nonnull OWLOntology ont,
            @Nonnull Set<? extends OWLAxiom> axioms) {
        List<RemoveAxiom> changes = new ArrayList<>(axioms.size() + 2);
        for (OWLAxiom ax : axioms) {
            assert ax != null;
            changes.add(new RemoveAxiom(ont, ax));
        }
        return applyChanges(changes);
    }
View Full Code Here

            assert ont != null;
            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

TOP

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

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.