if (s instanceof RutaRuleElement) {
RutaRuleElement re = (RutaRuleElement) s;
Expression head = re.getHead();
if (head instanceof FeatureMatchExpression) {
FeatureMatchExpression fme = (FeatureMatchExpression) head;
String text = fme.getFeature().getText();
int lastIndexOf = text.lastIndexOf('.');
String twf = text.substring(0, lastIndexOf);
if (getVariableType(twf) == RutaTypeConstants.RUTA_TYPE_AT) {
matchedType = twf;
} else {
twf = expand(twf);
matchedType = isFeatureMatch(twf);
}
} else if (head != null) {
matchedType = sourceModule.getSource().substring(head.sourceStart(), head.sourceEnd());
}
// cache long name
matchedType = expand(matchedType);
if (matchedType == null) {
matchedType = "uima.tcas.Annotation";
}
}
if (s instanceof FeatureMatchExpression) {
FeatureMatchExpression fme = (FeatureMatchExpression) s;
String featText = fme.getFeature().getText();
checkTypeOfFeatureMatch(featText, fme);
return true;
}
if (s instanceof RutaVariableReference) {
RutaVariableReference ref = (RutaVariableReference) s;