Examples of SizeCondition


Examples of org.apache.uima.ruta.condition.SizeCondition

    c = new ScoreCondition(numExpr1, numExpr2, var);
    s = v.verbalize(c);
    assertEquals("SCORE(4, numVar, anyVar)", s);

    // SIZE
    c = new SizeCondition(typeListExpr, numExpr1, numExpr2, var);
    s = v.verbalize(c);
    assertEquals("SIZE({Type1, typeVar}, 4, numVar, anyVar)", s);

    // STARTSWITH
    c = new StartsWithCondition(typeExpr1);
View Full Code Here

Examples of org.apache.uima.ruta.condition.SizeCondition

      } else {
        type = verbalizer.verbalize(c.getList());
      }
      return name + type + ")";
    } else if (condition instanceof SizeCondition) {
      SizeCondition c = (SizeCondition) condition;
      INumberExpression minE = c.getMinExpr();
      String min = verbalizeMin(minE, Integer.MIN_VALUE);
      INumberExpression maxE = c.getMaxExpr();
      String max = verbalizeMax(maxE, Integer.MAX_VALUE);
      String var = c.getVarExpr() == null ? "" : ", " + c.getVarExpr();
      ListExpression<?> listExpr = c.getListExpr();
      if (listExpr == null) {
        return name + min + max + var + ")";
      } else {
        String l = verbalizer.verbalize(listExpr);
        return name + l + min + max + var + ")";
      }
    } else if (condition instanceof ImplicitCondition) {
      ImplicitCondition c = (ImplicitCondition) condition;
      return verbalizer.verbalize(c.getExpr());
    }

    return condition.getClass().getSimpleName();
  }
View Full Code Here

Examples of org.apache.uima.ruta.condition.SizeCondition

      } else {
        type = verbalizer.verbalize(c.getList());
      }
      return name + type + ")";
    } else if (condition instanceof SizeCondition) {
      SizeCondition c = (SizeCondition) condition;
      NumberExpression minE = c.getMinExpr();
      String min = verbalizeMin(minE, Integer.MIN_VALUE);
      NumberExpression maxE = c.getMaxExpr();
      String max = verbalizeMax(maxE, Integer.MAX_VALUE);
      String var = c.getVarExpr() == null ? "" : ", " + c.getVarExpr();
      ListExpression<?> listExpr = c.getListExpr();
      if(listExpr == null) {
        return name + min + max + var + ")";
      } else {
        String l = verbalizer.verbalize(listExpr);
        return name + l + min + max + var + ")";
View Full Code Here

Examples of org.apache.uima.ruta.condition.SizeCondition

    c = new ScoreCondition(numExpr1, numExpr2, var);
    s = v.verbalize(c);
    assertEquals("SCORE(4, numVar, anyVar)", s);

    // SIZE
    c = new SizeCondition(typeListExpr, numExpr1, numExpr2, var);
    s = v.verbalize(c);
    assertEquals("SIZE({Type1, typeVar}, 4, numVar, anyVar)", s);

    // STARTSWITH
    c = new StartsWithCondition(typeExpr1);
View Full Code Here

Examples of org.apache.uima.ruta.condition.SizeCondition

    c = new ScoreCondition(numExpr1, numExpr2, var);
    s = v.verbalize(c);
    assertEquals("SCORE(4, numVar, anyVar)", s);

    // SIZE
    c = new SizeCondition(typeListExpr, numExpr1, numExpr2, var);
    s = v.verbalize(c);
    assertEquals("SIZE({Type1, typeVar}, 4, numVar, anyVar)", s);

    // STARTSWITH
    c = new StartsWithCondition(typeExpr1);
View Full Code Here

Examples of org.apache.uima.ruta.condition.SizeCondition

      } else {
        type = verbalizer.verbalize(c.getList());
      }
      return name + type + ")";
    } else if (condition instanceof SizeCondition) {
      SizeCondition c = (SizeCondition) condition;
      NumberExpression minE = c.getMinExpr();
      String min = verbalizeMin(minE, Integer.MIN_VALUE);
      NumberExpression maxE = c.getMaxExpr();
      String max = verbalizeMax(maxE, Integer.MAX_VALUE);
      String var = c.getVarExpr() == null ? "" : ", " + c.getVarExpr();
      ListExpression<?> listExpr = c.getListExpr();
      if (listExpr == null) {
        return name + min + max + var + ")";
      } else {
        String l = verbalizer.verbalize(listExpr);
        return name + l + min + max + var + ")";
      }
    } else if (condition instanceof ImplicitCondition) {
      ImplicitCondition c = (ImplicitCondition) condition;
      return verbalizer.verbalize(c.getExpr());
    }

    return condition.getClass().getSimpleName();
  }
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.