Package org.apache.uima.ruta.expression.type

Examples of org.apache.uima.ruta.expression.type.SimpleTypeExpression


    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();
    List<IStringExpression> stringExprList = new ArrayList<IStringExpression>();
    List<IRutaExpression> exprList = new ArrayList<IRutaExpression>();
    List<INumberExpression> indexes = new ArrayList<INumberExpression>();
    String var = "anyVar";
    TypeExpression typeExpr1 = new SimpleTypeExpression("Type1");
    TypeExpression typeExpr2 = new ReferenceTypeExpression("typeVar");
    typeExprList.add(typeExpr1);
    typeExprList.add(typeExpr2);
    INumberExpression numExpr1 = new SimpleNumberExpression(4);
    INumberExpression numExpr2 = new ReferenceNumberExpression("numVar");
View Full Code Here


////    indexes.add(numExpr1);
////    indexes.add(numExpr2);

    String s = null;
  String var = "anyVar";
    TypeExpression typeExpr1 = new SimpleTypeExpression("Type1");
    TypeExpression typeExpr2 = new ReferenceTypeExpression("typeVar");
   
    List<INumberExpression> numExprList1 = new ArrayList<INumberExpression>();
    List<INumberExpression> numExprList2 = new ArrayList<INumberExpression>();
    List<String> opList1 = new ArrayList<String>();
View Full Code Here

    RutaVerbalizer v = new RutaVerbalizer();
    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();
    List<IStringExpression> stringExprList = new ArrayList<IStringExpression>();
    String var = "anyVar";
    IStringExpression varExpr = new ReferenceNumberExpression(var);
    TypeExpression typeExpr1 = new SimpleTypeExpression("Type1");
    TypeExpression typeExpr2 = new ReferenceTypeExpression("typeVar");
    typeExprList.add(typeExpr1);
    typeExprList.add(typeExpr2);
    INumberExpression numExpr1 = new SimpleNumberExpression(4);
    INumberExpression numExpr2 = new ReferenceNumberExpression("numVar");
View Full Code Here

    return new ReferenceBooleanExpression(id.getText());
  }

  public static TypeExpression createSimpleTypeExpression(Token typeToken, RutaBlock parent) {
    String typeString = typeToken == null ? "uima.tcas.DocumentAnnotation" : typeToken.getText();
    return new SimpleTypeExpression(typeString);
  }
View Full Code Here

    String varString = varToken == null ? "" : varToken.getText();
    return new ReferenceTypeExpression(varString);
  }

  public static TypeExpression createSimpleTypeExpression(String typeString, RutaBlock parent) {
    return new SimpleTypeExpression(typeString);
  }
View Full Code Here

  private TypeExpression buildTypeExpression(String candidate, RutaEnvironment e) {
    if (e.isVariableOfType(candidate, "TYPE")) {
      return new ReferenceTypeExpression(candidate);
    } else if (e.getType(candidate) != null) {
      return new SimpleTypeExpression(candidate);
    }
    return null;
  }
View Full Code Here

    return expression.getClass().getSimpleName();
  }

  public String verbalize(TypeExpression expression) {
    if (expression instanceof SimpleTypeExpression) {
      SimpleTypeExpression e = (SimpleTypeExpression) expression;
      String type = e.getTypeString();
      int indexOf = type.lastIndexOf(".");
      if (indexOf != -1) {
        type = type.substring(indexOf + 1, type.length());
      }
      if (type.equals("DocumentAnnotation")) {
        type = "Document";
      }
      return type;
    } else if (expression instanceof ReferenceTypeExpression) {
      ReferenceTypeExpression e = (ReferenceTypeExpression) expression;
      return e.getVar();
    }
    return expression.getClass().getSimpleName();
  }
View Full Code Here

    return new ReferenceBooleanExpression(id.getText());
  }

  public static TypeExpression createSimpleTypeExpression(Token typeToken, RutaBlock parent) {
    String typeString = typeToken == null ? "uima.tcas.DocumentAnnotation" : typeToken.getText();
    return new SimpleTypeExpression(typeString);
  }
View Full Code Here

    String varString = varToken == null ? "" : varToken.getText();
    return new ReferenceTypeExpression(varString);
  }

  public static TypeExpression createSimpleTypeExpression(String typeString, RutaBlock parent) {
    return new SimpleTypeExpression(typeString);
  }
View Full Code Here

    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();
    List<StringExpression> stringExprList = new ArrayList<StringExpression>();
    List<RutaExpression> exprList = new ArrayList<RutaExpression>();
    List<NumberExpression> indexes = new ArrayList<NumberExpression>();
    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");
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.expression.type.SimpleTypeExpression

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.