FeaturePath beginPath = getCAS().createFeaturePath();
beginPath.addFeature(annotationType.getFeatureByBaseName("begin"));
FSIntConstraint beginConstraint = cf.createIntConstraint();
beginConstraint.geq(span.getStart());
FSMatchConstraint embeddedBegin = cf.embedConstraint(beginPath, beginConstraint);
FeaturePath endPath = getCAS().createFeaturePath();
endPath.addFeature(annotationType.getFeatureByBaseName("end"));
FSIntConstraint endConstraint = cf.createIntConstraint();
endConstraint.leq(span.getEnd());