Examples of RemoveAxiom


Examples of org.semanticweb.owl.model.RemoveAxiom

      throws OWLException {
    List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
    for( OWLAxiom axiom : axioms ) {
      OWLOntologyChange change = add
        ? new AddAxiom( ontology, axiom )
        : new RemoveAxiom( ontology, axiom );
      changes.add( change );
    }
    manager.applyChanges( changes );
  }
View Full Code Here

Examples of org.semanticweb.owl.model.RemoveAxiom

    for( OWLOntology ont : ontologies ) {
      if( ont.getAxioms().contains( axiom ) ) {
        modifiedOnts.add( ont );

        manager.applyChange( new RemoveAxiom( ont, axiom ) );
      }
    }

    return modifiedOnts;
  }
View Full Code Here

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

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        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

Examples of org.semanticweb.owlapi.model.RemoveAxiom

    }

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

Examples of org.semanticweb.owlapi.model.RemoveAxiom

    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

Examples of org.semanticweb.owlapi.model.RemoveAxiom

                            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

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        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

Examples of org.semanticweb.owlapi.model.RemoveAxiom

        // 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

Examples of org.semanticweb.owlapi.model.RemoveAxiom

    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
TOP
Copyright © 2018 www.massapi.com. 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.