Package org.apache.uima.ruta.rule

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


  }

  public RutaRuleElement createRuleElement(IRutaExpression expression,
          RuleElementQuantifier quantifier, List<AbstractRutaCondition> conditions,
          List<AbstractRutaAction> actions, RuleElementContainer container, RutaBlock parent) {
    RutaMatcher matcher = null;
    if (expression instanceof MatchReference) {
      matcher = new RutaTypeMatcher((MatchReference) expression);
    } else if (expression instanceof TypeExpression) {
      // e.g., for functions
      MatchReference matchReference = new MatchReference((TypeExpression) expression);
View Full Code Here


    return result.toString();
  }

  public String verbalizeMatcher(RutaRuleElement tmre) {
    StringBuilder result = new StringBuilder();
    RutaMatcher matcher = tmre.getMatcher();
    result.append(verbalizer.verbalize(matcher.getExpression()));
    return result.toString();
  }
View Full Code Here

    return result.toString();
  }

  public String verbalizeMatcher(RutaRuleElement tmre) {
    StringBuilder result = new StringBuilder();
    RutaMatcher matcher = tmre.getMatcher();
    if (matcher instanceof RutaDisjunctiveMatcher) {
      RutaDisjunctiveMatcher dmatcher = (RutaDisjunctiveMatcher) matcher;
      List<RutaExpression> expressions = dmatcher.getExpressions();
      result.append("(");
      for (RutaExpression each : expressions) {
        if (expressions.indexOf(each) != 0) {
          result.append(" | ");
        }
        result.append(verbalizer.verbalize(each));
      }
      result.append(")");
    } else {
      result.append(verbalizer.verbalize(matcher.getExpression()));
    }
    return result.toString();
  }
View Full Code Here

  }

  public RutaRuleElement createRuleElement(RutaExpression expression,
          RuleElementQuantifier quantifier, List<AbstractRutaCondition> conditions,
          List<AbstractRutaAction> actions, RuleElementContainer container, RutaBlock parent) {
    RutaMatcher matcher = null;
    if (expression instanceof MatchReference) {
      matcher = new RutaTypeMatcher((MatchReference) expression);
    } else if (expression instanceof TypeExpression) {
      // e.g., for functions
      MatchReference matchReference = new MatchReference((TypeExpression) expression);
View Full Code Here

    return result.toString();
  }

  public String verbalizeMatcher(RutaRuleElement tmre) {
    StringBuilder result = new StringBuilder();
    RutaMatcher matcher = tmre.getMatcher();
    result.append(verbalizer.verbalize(matcher.getExpression()));
    return result.toString();
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.rule.RutaMatcher

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.