while (annotIterator.hasNext()) {
Object annotObject = annotIterator.next();
if (annotObject instanceof AnnotationImpl == false)
continue;
AnnotationImpl annotation = (AnnotationImpl) annotObject;
if (!uimatypes.contains(annotation.getType()))
continue;
String atype = annotation.getType().toString();
// wanted type -> generate an annotation for it
reporter.incrCounter("UIMA", atype, 1);
com.digitalpebble.behemoth.Annotation target = new com.digitalpebble.behemoth.Annotation();
// short version?
if (storeshortnames)
target.setType(annotation.getType().getShortName());
else
target.setType(atype);
target.setStart(annotation.getBegin());
target.setEnd(annotation.getEnd());
// now get the features for this annotation
Set<Feature> possiblefeatures = featfilts.get(atype);
if (possiblefeatures != null) {
// iterate on the expected features
Iterator<Feature> possiblefeaturesIterator = possiblefeatures
.iterator();
while (possiblefeaturesIterator.hasNext()) {
Feature expectedFeature = possiblefeaturesIterator.next();
String fvalue = annotation
.getFeatureValueAsString(expectedFeature);
if (fvalue == null)
fvalue = "null";
// always use the short names for the features
target.getFeatures().put(expectedFeature.getShortName(),