if (typeSystem.subsumes(annotationType, range)) {
String name = eachFeature1.getShortName();
Feature eachFeature2 = type2.getFeatureByBaseName(name);
FeatureStructure featureValue1 = a1.getFeatureValue(eachFeature1);
FeatureStructure featureValue2 = a2.getFeatureValue(eachFeature2);
allEmpty1 &= featureValue1 == null;
allEmpty2 &= featureValue2 == null;
if (featureValue1 instanceof AnnotationFS && featureValue2 instanceof AnnotationFS) {
result &= matchAnnotations((AnnotationFS) featureValue1, (AnnotationFS) featureValue2);
} else if (featureValue1 == null) {
// nothing to do
} else if (featureValue1 != null || featureValue2 != null) {
return false;
}
}
if (UIMAConstants.TYPE_STRING.equals(range.getName())) {
String name = eachFeature1.getShortName();
Feature eachFeature2 = type2.getFeatureByBaseName(name);
String featureValue1 = a1.getFeatureValueAsString(eachFeature1);
String featureValue2 = a2.getFeatureValueAsString(eachFeature2);
if ((StringUtils.isBlank(featureValue2)) && StringUtils.isBlank(featureValue1)) {
// nothing to do