@Override public void setFeatureValue(SourceDocument aDocument, String aUsername, JCas aJcas, int aAddress, AnnotationFeature aFeature, Object aValue) { FeatureStructure fs = selectByAddr(aJcas, FeatureStructure.class, aAddress); Object oldValue = getValue(fs, aFeature); featureSupportRegistry.getFeatureSupport(aFeature).setFeatureValue(aJcas, aFeature, aAddress, aValue); Object newValue = getValue(fs, aFeature); if (!Objects.equals(oldValue, newValue)) { publishEvent(new FeatureValueUpdatedEvent(this, aDocument, aUsername, fs, aFeature, newValue, oldValue)); } }
@Override public void setFeatureValue(SourceDocument aDocument, String aUsername, JCas aJcas, int aAddress, AnnotationFeature aFeature, Object aValue) { FeatureStructure fs = selectByAddr(aJcas, FeatureStructure.class, aAddress); Object oldValue = getValue(fs, aFeature); featureSupportRegistry.getFeatureSupport(aFeature).setFeatureValue(aJcas, aFeature, aAddress, aValue); Object newValue = getValue(fs, aFeature); if (!Objects.equals(oldValue, newValue)) { publishEvent(new FeatureValueUpdatedEvent(this, aDocument, aUsername, fs, aFeature, newValue, oldValue)); } }