Package org.apache.uima.ruta.ide.parser.ast

Examples of org.apache.uima.ruta.ide.parser.ast.FeatureMatchExpression


    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;
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.ide.parser.ast.FeatureMatchExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.