Package org.apache.uima.ruta.expression.number

Examples of org.apache.uima.ruta.expression.number.SimpleNumberExpression


    String var = "anyVar";
    TypeExpression typeExpr1 = new SimpleTypeExpression("Type1");
    TypeExpression typeExpr2 = new ReferenceTypeExpression("typeVar");
    typeExprList.add(typeExpr1);
    typeExprList.add(typeExpr2);
    NumberExpression numExpr1 = new SimpleNumberExpression(4);
    NumberExpression numExpr2 = new ReferenceNumberExpression("numVar");
    BooleanExpression boolExpr1 = new SimpleBooleanExpression(true);
    StringExpression stringExpr = new SimpleStringExpression("string");
    stringExprList.add(stringExpr);
    exprList.add(typeExpr1);
View Full Code Here


   
    List<NumberExpression> numExprList1 = new ArrayList<NumberExpression>();
    List<NumberExpression> numExprList2 = new ArrayList<NumberExpression>();
    List<String> opList1 = new ArrayList<String>();
    List<String> opList2 = new ArrayList<String>();
    NumberExpression numExpr1 = new SimpleNumberExpression(4);
    NumberExpression numExpr2 = new ReferenceNumberExpression("numVar");
    NumberExpression numExpr3 = new ReferenceNumberExpression("4.9");
    NumberExpression numExpr4 = new ReferenceNumberExpression("-4");
    numExprList1.add(numExpr1);
    numExprList1.add(numExpr2);
View Full Code Here

      return "-(" + e.getExpression() + ")";
    } else if (expression instanceof ReferenceNumberExpression) {
      ReferenceNumberExpression e = (ReferenceNumberExpression) expression;
      return e.getVar();
    } else if (expression instanceof SimpleNumberExpression) {
      SimpleNumberExpression e = (SimpleNumberExpression) expression;
      return e.getNumber().toString();
    } else if (expression instanceof ComposedNumberExpression) {
      ComposedNumberExpression e = (ComposedNumberExpression) expression;
      NumberExpression ne = e.getExpressions().get(0);
      if (ne == null) {
        return "";
      }
      StringBuilder result = new StringBuilder(verbalize(ne));
      for (int i = 0; i < e.getOperators().size(); i++) {
        result.append(" " + e.getOperators().get(i) + " ");
        if (e.getExpressions().size() > i + 1) {
          result.append(verbalize(e.getExpressions().get(i + 1)));
        }
      }
      return result.toString();
    }
    return expression.getClass().getSimpleName();
View Full Code Here

  private final String var;

  public TotalCountCondition(TypeExpression type, NumberExpression min, NumberExpression max,
          String var) {
    super(type);
    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;
    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;
    this.var = var;
  }
View Full Code Here

  private final BooleanExpression filtered;

  public NearCondition(TypeExpression type, NumberExpression min, NumberExpression max,
          BooleanExpression forward, BooleanExpression filtered) {
    super(type);
    this.min = min == null ? new SimpleNumberExpression(1) : min;
    this.max = max == null ? new SimpleNumberExpression(1) : max;
    this.forward = forward == null ? new SimpleBooleanExpression(true) : forward;
    this.filtered = filtered == null ? new SimpleBooleanExpression(false) : filtered;
  }
View Full Code Here

  private final String var;

  public ScoreCondition(NumberExpression min, NumberExpression max, String var) {
    super();
    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;
    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;
    this.var = var;
  }
View Full Code Here

      this.max = min;
    } else {
      this.min = min;
      this.max = max;
      if (this.max == null) {
        this.max = new SimpleNumberExpression(Integer.MAX_VALUE);
      }
    }
  }
View Full Code Here

      this.max = min;
    } else {
      this.min = min;
      this.max = max;
      if (this.max == null) {
        this.max = new SimpleNumberExpression(Integer.MAX_VALUE);
      }
    }
  }
View Full Code Here

  private final String var;

  public ContextCountCondition(TypeExpression type, NumberExpression min, NumberExpression max,
          String var) {
    super(type);
    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;
    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;
    this.var = var;
  }
View Full Code Here

  private final String var;

  public CurrentCountCondition(TypeExpression type, NumberExpression min, NumberExpression max,
          String var) {
    super(type);
    this.min = min == null ? new SimpleNumberExpression(Integer.MIN_VALUE) : min;
    this.max = max == null ? new SimpleNumberExpression(Integer.MAX_VALUE) : max;
    this.var = var;
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.expression.number.SimpleNumberExpression

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.