Examples of RutaRuleElement


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

      }
      return false;
    }
    // special format for RuleElements:
    if (s instanceof RutaRuleElement) {
      RutaRuleElement ruleEl = (RutaRuleElement) s;
      if (inLargeRule == 2) {
        appendNewLine();
      } else if (inLargeRule == 1) {
        inLargeRule = 2;
      }
      if(ruleEl.isAfterConcat()) {
        append(CONCAT_RULES);
      }
      appendRuleElement(ruleEl);
      return false;
    }
View Full Code Here

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

  @Override
  public boolean visit(Expression s) throws Exception {

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

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

    @Override
    public boolean visit(Expression s) throws Exception {

      if (s instanceof RutaRuleElement) {
        RutaRuleElement re = (RutaRuleElement) s;
        Expression head = re.getHead();
        if (head != null) {
          String type = currentFile.getSource().substring(head.sourceStart(), head.sourceEnd());
          matchedType = type;
        }
      }
View Full Code Here

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

      }
      return false;
    }
    // special format for RuleElements:
    if (s instanceof RutaRuleElement) {
      RutaRuleElement ruleEl = (RutaRuleElement) s;
      if (inLargeRule == 2) {
        appendNewLine();
      } else if (inLargeRule == 1) {
        inLargeRule = 2;
      }
View Full Code Here

Examples of org.apache.uima.ruta.rule.RutaRuleElement

      MatchReference matchReference = new MatchReference((TypeExpression) expression);
      matcher = new RutaTypeMatcher(matchReference);
    } else if (expression instanceof IStringExpression) {
      matcher = new RutaLiteralMatcher((IStringExpression) expression);
    }
    return new RutaRuleElement(matcher, quantifier, conditions, actions, container, parent);
  }
View Full Code Here

Examples of org.apache.uima.ruta.rule.RutaRuleElement

      iterator.moveToPrevious();
    }

    List<Type> targetTypes = new ArrayList<Type>();
    if (element instanceof RutaRuleElement) {
      RutaRuleElement re = (RutaRuleElement) element;
      targetTypes.addAll(re.getMatcher().getTypes(element.getParent(), stream));
    } else {
      targetTypes.add(annotation.getType());
    }

    if (window == null) {
View Full Code Here

Examples of org.apache.uima.ruta.rule.RutaRuleElement

    if(re instanceof ConjunctRulesRuleElement) {
      result.append(verbalizeConjunct((ConjunctRulesRuleElement) re));
    } else if (re instanceof ComposedRuleElement) {
      result.append(verbalizeComposed((ComposedRuleElement) re));
    } else if (re instanceof RutaRuleElement) {
      RutaRuleElement tmre = (RutaRuleElement) re;
      result.append(verbalizeMatcher(tmre));
    } else if (re instanceof WildCardRuleElement) {
      result.append("#");
    }
    result.append(verbalizeQuantifier(quantifier));
View Full Code Here

Examples of org.apache.uima.ruta.rule.RutaRuleElement

    RuleElementQuantifier quantifier = re.getQuantifier();
    StringBuilder result = new StringBuilder();
    if (re instanceof ComposedRuleElement) {
      result.append(verbalizeComposed((ComposedRuleElement) re));
    } else if (re instanceof RutaRuleElement) {
      RutaRuleElement tmre = (RutaRuleElement) re;
      result.append(verbalizeMatcher(tmre));
    } else if(re instanceof WildCardRuleElement) {
      result.append("#");
    }
    result.append(verbalizeQuantifier(quantifier));
View Full Code Here

Examples of org.apache.uima.ruta.rule.RutaRuleElement

      iterator.moveToPrevious();
    }

    List<Type> targetTypes = new ArrayList<Type>();
    if (element instanceof RutaRuleElement) {
      RutaRuleElement re = (RutaRuleElement) element;
      targetTypes.addAll(re.getMatcher().getTypes(element.getParent(), stream));
    } else {
      targetTypes.add(annotation.getType());
    }

    if (window == null) {
View Full Code Here

Examples of org.apache.uima.ruta.rule.RutaRuleElement

  public RutaRuleElement createRuleElement(TypeExpression typeExpression,
          RuleElementQuantifier quantifier, List<AbstractRutaCondition> conditions,
          List<AbstractRutaAction> actions, RuleElementContainer container,
          RutaBlock parent) {
    RutaTypeMatcher matcher = new RutaTypeMatcher(typeExpression);
    return new RutaRuleElement(matcher, quantifier, conditions, actions, container, parent);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.