// if value is null, there was an invalid input
if (value != null) {
if (element instanceof FeatureValue) {
FeatureValue featureValue = (FeatureValue) element;
// for all other than boolean values
if (!featureValue.getFeature().getRange().getName().equals(
CAS.TYPE_NAME_BOOLEAN)) {
if (featureValue.getFeature().getRange().isPrimitive()) {
// TODO: try to prevent setting of invalid annotation span values
featureValue.getFeatureStructure().setFeatureValueFromString(featureValue.getFeature(),
(String) value);
}
}
else {
featureValue.getFeatureStructure().setBooleanValue(featureValue.getFeature(),(Boolean) value);
}
document.update(featureValue.getFeatureStructure());
viewer.update(element, null);
} else if (element instanceof ArrayValue) {