Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.AddAxiom


            owlOntologyManager.removeOntology(verifyNotNull(debuggingOntology));
        }
        debuggingOntology = owlOntologyManager.createOntology();
        List<AddAxiom> changes = new ArrayList<>();
        for (OWLAxiom ax : new ArrayList<>(debuggingAxioms)) {
            changes.add(new AddAxiom(verifyNotNull(debuggingOntology),
                    verifyNotNull(ax)));
        }
        owlOntologyManager.applyChanges(changes);
    }
View Full Code Here


        IRI subject = getIRIFromOBOId(id);
        OWLAnnotationProperty annotationProperty = getDataFactory()
                .getOWLAnnotationProperty(getIRIFromOBOId(uriID));
        OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(
                annotationProperty, subject, value);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

        OWLAnnotationProperty property = getDataFactory()
                .getOWLAnnotationProperty(annotationPropertyIRI);
        IRI object = getIRIFromOBOId(value);
        OWLAnnotationAssertionAxiom ax = getDataFactory()
                .getOWLAnnotationAssertionAxiom(property, subject, object);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

            @Nonnull OWLOntologyManager manager) {
        for (OWLOntology ont : checkNotNull(ontologies,
                "ontologies cannot be null")) {
            assert ont != null;
            checkNotNull(manager, "manager cannot be null").applyChange(
                    new AddAxiom(ont, checkNotNull(axiom,
                            "axiom cannot be null")));
        }
    }
View Full Code Here

            String comment) {
        if (Boolean.parseBoolean(value)) {
            OWLObjectProperty prop = getOWLObjectProperty(currentId);
            OWLAxiom ax = getDataFactory().getOWLAsymmetricObjectPropertyAxiom(
                    prop);
            applyChange(new AddAxiom(getOntology(), ax));
        } else {
            addAnnotation(currentId, OBOVocabulary.IS_ASYMMETRIC.getName(),
                    getBooleanConstant(false));
        }
    }
View Full Code Here

        }
        OWLClassExpression closureAxiomFiller = getDataFactory()
                .getOWLObjectUnionOf(fillers);
        OWLClassExpression closureAxiomDesc = getDataFactory()
                .getOWLObjectAllValuesFrom(property, closureAxiomFiller);
        addChange(new AddAxiom(targetOntology, getDataFactory()
                .getOWLSubClassOfAxiom(cls, closureAxiomDesc)));
    }
View Full Code Here

                getExpression(), annotation);
    }

    @Override
    public List<OWLOntologyChange> repair() {
        return list(new AddAxiom(ontology,
                df.getOWLDeclarationAxiom(getExpression())));
    }
View Full Code Here

                    addChange(new RemoveAxiom(ont, ax));
                    for (OWLClassExpression desc : splitter.result) {
                        assert desc != null;
                        OWLAxiom replAx = getDataFactory()
                                .getOWLSubClassOfAxiom(ax.getSubClass(), desc);
                        addChange(new AddAxiom(ont, replAx));
                    }
                }
            }
        }
    }
View Full Code Here

            assert ont != null;
            for (OWLDataPropertyAssertionAxiom ax : ont
                    .getDataPropertyAssertionAxioms(ind)) {
                if (!ax.getProperty().isAnonymous()) {
                    addChange(new RemoveAxiom(ont, ax));
                    addChange(new AddAxiom(ont, convertToAnnotation(ind, ax)));
                    convertedDataProperties.add((OWLDataProperty) ax
                            .getProperty());
                }
            }
        }
View Full Code Here

        OWLClassExpression descB = df.getOWLObjectSomeValuesFrom(prop, clsB);
        Set<OWLClassExpression> classExpressions = new HashSet<>();
        classExpressions.add(descA);
        classExpressions.add(descB);
        OWLAxiom ax = df.getOWLDisjointClassesAxiom(classExpressions);
        m.applyChange(new AddAxiom(ontA, ax));
        OWLOntology ontB = roundTrip(ontA, new RDFXMLDocumentFormat());
        assertTrue(ontB.getAxioms().contains(ax));
    }
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.