Java 类org.semanticweb.owlapi.model.RemoveOntologyAnnotation 实例源码

项目:owltools    文件:Mooncat.java   
private void removeDirectives() {
    // TODO decide: move the set of directives into a constant/static collection?

    Set<IRI> directivesIRIs = new HashSet<IRI>();
    directivesIRIs.add(Obo2OWLVocabulary.IRI_OIO_LogicalDefinitionViewRelation.getIRI());
    directivesIRIs.add(Obo2OWLVocabulary.IRI_OIO_treatXrefsAsEquivalent.getIRI());
    directivesIRIs.add(Obo2OWLVocabulary.IRI_OIO_treatXrefsAsGenusDifferentia.getIRI());
    directivesIRIs.add(Obo2OWLVocabulary.IRI_OIO_treatXrefsAsHasSubClass.getIRI());
    directivesIRIs.add(Obo2OWLVocabulary.IRI_OIO_treatXrefsAsIsA.getIRI());
    directivesIRIs.add(Obo2OWLVocabulary.IRI_OIO_treatXrefsAsRelationship.getIRI());
    directivesIRIs.add(Obo2OWLVocabulary.IRI_OIO_treatXrefsAsReverseGenusDifferentia.getIRI());

    OWLOntology o = graph.getSourceOntology();
    for(OWLAnnotation ann : o.getAnnotations()) {
        final OWLAnnotationProperty property = ann.getProperty();
        if (directivesIRIs.contains(property.getIRI())) {
            manager.applyChange(new RemoveOntologyAnnotation(o, ann));
        }
    }
}
项目:minerva    文件:CoreMolecularModelManager.java   
public void updateAnnotation(ModelContainer model, OWLAnnotation update, METADATA metadata) {
    OWLOntology aBox = model.getAboxOntology();
    List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
    Set<OWLAnnotation> existing = model.getAboxOntology().getAnnotations();
    OWLAnnotationProperty target = update.getProperty();
    for (OWLAnnotation annotation : existing) {
        if (target.equals(annotation.getProperty())) {
            changes.add(new RemoveOntologyAnnotation(aBox, annotation));
        }
    }
    changes.add(new AddOntologyAnnotation(aBox, update));
    applyChanges(model, changes, metadata);
}
项目:minerva    文件:CoreMolecularModelManager.java   
public void removeAnnotations(ModelContainer model, Collection<OWLAnnotation> annotations, METADATA metadata) {
    OWLOntology aBox = model.getAboxOntology();
    List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
    for (OWLAnnotation annotation : annotations) {
        changes.add(new RemoveOntologyAnnotation(aBox, annotation));
    }
    applyChanges(model, changes, metadata);
}
项目:minerva    文件:ReverseChangeGenerator.java   
public OWLOntologyChange visit(AddOntologyAnnotation addOntologyAnnotation) {
    return new RemoveOntologyAnnotation(addOntologyAnnotation.getOntology(), addOntologyAnnotation.getAnnotation());
}
项目:minerva    文件:ReverseChangeGenerator.java   
public OWLOntologyChange visit(RemoveOntologyAnnotation removeOntologyAnnotation) {
    return new AddOntologyAnnotation(removeOntologyAnnotation.getOntology(), removeOntologyAnnotation.getAnnotation());
}
项目:HermiT-android    文件:Reasoner.java   
public void ontologiesChanged(List<? extends OWLOntologyChange> changes)
        throws OWLException {
    for (OWLOntologyChange change : changes)
        if (!(change instanceof RemoveOntologyAnnotation || change instanceof AddOntologyAnnotation))
            m_pendingChanges.add(change);
}
项目:elk-reasoner    文件:OwlOntologyChangeProcessorVisitor.java   
@Override
public void visit(RemoveOntologyAnnotation change) {
    defaultVisit(change);
}
项目:Hermit_1.3.8_android    文件:Reasoner.java   
public void ontologiesChanged(List<? extends OWLOntologyChange> changes)
        throws OWLException {
    for (OWLOntologyChange change : changes)
        if (!(change instanceof RemoveOntologyAnnotation || change instanceof AddOntologyAnnotation))
            m_pendingChanges.add(change);
}
项目:jcel    文件:JcelOntologyChangeVisitorEx.java   
@Override
public Boolean visit(RemoveOntologyAnnotation change) {
    Objects.requireNonNull(change);
    return false;
}