Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.RemoveAxiom


        OWLObjectDuplicator dup = new OWLObjectDuplicator(replacementMap, manager.getOWLDataFactory());
        for (OWLOntology ont : ontologies) {
            for (OWLAxiom ax : ont.getAxioms()) {
                OWLAxiom dupAx = dup.duplicateObject(ax);
                if (!dupAx.equals(ax)) {
                    changes.add(new RemoveAxiom(ont, ax));
                    changes.add(new AddAxiom(ont, dupAx));
                }
            }
        }
        return changes;
View Full Code Here


        // into an intersection which is made equivalent.
        changes = new ArrayList<OWLOntologyChange>();
        Set<OWLClassExpression> descs = new HashSet<OWLClassExpression>();
        for (OWLOntology ont : ontologies) {
            for (OWLSubClassOfAxiom ax : ont.getSubClassAxiomsForSubClass(cls)) {
                changes.add(new RemoveAxiom(ont, ax));
                descs.add(ax.getSuperClass());
            }
        }
        OWLClassExpression equivalentClass = getDataFactory().getOWLObjectIntersectionOf(descs);
        Set<OWLClassExpression> equivalentClasses = new HashSet<OWLClassExpression>();
View Full Code Here

    private void generateChanges() {
        changes = new ArrayList<OWLOntologyChange>();
        for (OWLOntology ont : ontologies) {
            for (OWLClassAxiom ax : ont.getAxioms(AxiomType.DISJOINT_CLASSES)) {
                changes.add(new RemoveAxiom(ont, ax));
            }
        }
    }
View Full Code Here

    public Set<OWLAxiom> getSOSForIncosistentClass(OWLClassExpression cls) throws OWLException {
        reset();
        currentClass = setupDebuggingClass(cls);
        generateSOSAxioms();
        for (OWLAxiom ax : temporaryAxioms) {
            owlOntologyManager.applyChanges(Arrays.asList(new RemoveAxiom(getOWLOntology(), ax)));
        }
        debuggingAxioms.removeAll(temporaryAxioms);
        ontologyCounter = 0;
        return new HashSet<OWLAxiom>(debuggingAxioms);
    }
View Full Code Here

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

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

        return modifiedOnts;
    }
View Full Code Here

        OWLConstantReplacer replacer = new OWLConstantReplacer(getDataFactory());
        for (OWLOntology ont : ontologies) {
            for (OWLAxiom ax : ont.getLogicalAxioms()) {
                OWLAxiom dupAx = replacer.duplicateObject(ax);
                if (!ax.equals(dupAx)) {
                    changes.add(new RemoveAxiom(ont, ax));
                    changes.add(new AddAxiom(ont, dupAx));
                }
            }
        }
    }
View Full Code Here

    private void generateChanges() {
        changes = new ArrayList<OWLOntologyChange>();
        Set<OWLClassExpression> supers = new HashSet<OWLClassExpression>();
        for (OWLOntology o : ontologies) {
            for (OWLEquivalentClassesAxiom ax : o.getEquivalentClassesAxioms(cls)) {
                changes.add(new RemoveAxiom(o, ax));
                for (OWLClassExpression equivCls : ax.getClassExpressions()) {
                    supers.addAll(getClassExpressions(equivCls));
                }
            }
        }
View Full Code Here

        for (OWLOntology ont : ontologies) {
            for (OWLSubClassOfAxiom ax : ont.getAxioms(AxiomType.SUBCLASS_OF)) {
                ConjunctSplitter splitter = new ConjunctSplitter();
                ax.getSuperClass().accept(splitter);
                if (splitter.result.size() > 1) {
                    changes.add(new RemoveAxiom(ont, ax));
                    for (OWLClassExpression desc : splitter.result) {
                        OWLAxiom replAx = getDataFactory().getOWLSubClassOfAxiom(ax.getSubClass(), desc);
                        changes.add(new AddAxiom(ont, replAx));
                    }
                }
View Full Code Here

            }

            for (OWLOntology ont : ontologies) {
                for (OWLDataPropertyAssertionAxiom ax : ont.getDataPropertyAssertionAxioms(ind)) {
                    if (!ax.getProperty().isAnonymous()) {
                        changes.add(new RemoveAxiom(ont, ax));
                        OWLDataFactory df = getDataFactory();
                        OWLAnnotation anno = df.getOWLAnnotation(df.getOWLAnnotationProperty(ax.getProperty().asOWLDataProperty().getIRI()),
                                ax.getObject());
                        OWLAnnotationAssertionAxiom annoAx = df.getOWLAnnotationAssertionAxiom(ind.getIRI(), anno);
                        changes.add(new AddAxiom(ont, annoAx));
                        convertedDataProperties.add((OWLDataProperty) ax.getProperty());
                    }
                }
            }
            for (OWLOntology ont : ontologies) {
                for (OWLAxiom ax : ont.getDeclarationAxioms(ind)) {
                    changes.add(new RemoveAxiom(ont, ax));
                }
                for (OWLClassAssertionAxiom ax : ont.getClassAssertionAxioms(ind)) {
                    changes.add(new RemoveAxiom(ont, ax));
                }
            }
        }
        for (OWLDataProperty prop : convertedDataProperties) {
            for (OWLOntology ont : ontologies) {
                for (OWLAxiom ax : ont.getDeclarationAxioms(prop)) {
                    changes.add(new RemoveAxiom(ont, ax));
                }
                for (OWLAxiom ax : ont.getAxioms(prop)) {
                    changes.add(new RemoveAxiom(ont, ax));
                }
            }
        }
    }
View Full Code Here

        // We go through the current mups, axiom by axiom, and extend the tree
        // with edges for each axiom
        for (OWLAxiom axiom : mups) {
            // Remove the current axiom from the ontology
            owlOntologyManager.applyChanges(Arrays.asList(new RemoveAxiom(ontology, axiom)));
            currentPathContents.add(axiom);

            boolean earlyTermination = false;
            // Early path termination.  If our path contents are the superset of
            // the contents of a path then we can terminate here.
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.