public static FSIterator getAnnotationsInSpanIterator(JCas jcas, int type, int beginSpan, int endSpan)
{
ConstraintFactory constraintFactory = jcas.getConstraintFactory();
FSIntConstraint windowConstraint = constraintFactory.createIntConstraint();
windowConstraint.gt(beginSpan-1);
windowConstraint.lt(endSpan);
Type annotType = jcas.getCasType(type);
Feature beginSpanFeature = annotType.getFeatureByBaseName("begin");
Feature endSpanFeature = annotType.getFeatureByBaseName("end");