Iterator<Type> it = ts.getTypeIterator();
//Type annotationType = ts.getType(Annotation.class.getName()); // this returns "org.apache.uima.tcas.Annotation" which isn't in type system
Type annotationType = ts.getType("uima.tcas.Annotation"); // should be safe to hard code this
//System.err.println("annotation type: " + annotationType);
Feature sentenceBeginFeature = annotationType.getFeatureByBaseName("begin");
FeaturePath sentenceBeginFeaturePath = jcas.createFeaturePath();
sentenceBeginFeaturePath.addFeature(sentenceBeginFeature);
Feature sentenceEndFeature = annotationType.getFeatureByBaseName("end");
FeaturePath sentenceEndFeaturePath = jcas.createFeaturePath();
sentenceEndFeaturePath.addFeature(sentenceEndFeature);
FSMatchConstraint beginAndEnd = constructConstraintByBeginEnd(
problemBegin, problemEnd, cf, sentenceBeginFeaturePath,
sentenceEndFeaturePath);