Examples of RutaExpression


Examples of org.apache.uima.ruta.expression.RutaExpression

  public String verbalizeExpressionList(List<? extends RutaExpression> list) {
    StringBuilder result = new StringBuilder();
    Iterator<? extends RutaExpression> it = list.iterator();
    while (it.hasNext()) {
      RutaExpression e = it.next();
      result.append(verbalizer.verbalize(e));
      if (it.hasNext()) {
        result.append(", ");
      }
    }
View Full Code Here

Examples of org.apache.uima.ruta.expression.RutaExpression

          AnnotationFS matchedAnnotation, RuleElement element, RuleMatch match,
          RutaStream stream) {
    Map<String, List<Number>> map = new HashMap<String, List<Number>>();
    for (Entry<StringExpression, RutaExpression> each : features.entrySet()) {
      String value = each.getKey().getStringValue(element.getParent());
      RutaExpression expr = each.getValue();
      List<Number> ints = new ArrayList<Number>();
      if (expr instanceof NumberExpression) {
        NumberExpression ne = (NumberExpression) expr;
        ints.add(ne.getIntegerValue(element.getParent()));
        map.put(value, ints);
View Full Code Here

Examples of org.apache.uima.ruta.expression.RutaExpression

      StringExpression key = entry.getKey();
      String stringValue = key.getStringValue(element.getParent());
      ConfigurationParameter configurationParameter = configurationParameterDeclarations
              .getConfigurationParameter(null, stringValue);
      if (configurationParameter != null) {
        RutaExpression value = entry.getValue();
        String type = configurationParameter.getType();
        if (type.equals("String")) {
          if (configurationParameter.isMultiValued()) {
            if (value instanceof StringListExpression) {
              StringListExpression sle = (StringListExpression) value;
View Full Code Here

Examples of org.apache.uima.ruta.expression.RutaExpression

        map.put(type, typeMap);
      }
      Set<Entry<StringExpression, RutaExpression>> entrySet2 = value.entrySet();
      for (Entry<StringExpression, RutaExpression> entry2 : entrySet2) {
        StringExpression key2 = entry2.getKey();
        RutaExpression value2 = entry2.getValue();
        String stringValue = key2.getStringValue(getParent(), null, stream);
        typeMap.put(stringValue, value2);
      }
    }
    return result;
View Full Code Here

Examples of org.apache.uima.ruta.expression.RutaExpression

      StringExpression key = entry.getKey();
      String stringValue = key.getStringValue(parent, match, element, stream);
      ConfigurationParameter configurationParameter = configurationParameterDeclarations
              .getConfigurationParameter(null, stringValue);
      if (configurationParameter != null) {
        RutaExpression value = entry.getValue();
        String type = configurationParameter.getType();
        if (type.equals("String")) {
          if (configurationParameter.isMultiValued()) {
            if (value instanceof StringListExpression) {
              StringListExpression sle = (StringListExpression) value;
View Full Code Here

Examples of org.apache.uima.ruta.expression.RutaExpression

      stream.getCas().removeFsFromIndexes(each);
    }
    Collection<AnnotationFS> featureAnnotations = expr.getFeatureAnnotations(annotations, stream,
            element.getParent(), false);
    Feature feature = expr.getFeature(element.getParent());
    RutaExpression arg = expr.getArg();
    for (AnnotationFS each : featureAnnotations) {
      setFeatureValue(each, feature, arg, element, stream);
    }
    for (AnnotationFS each : annotations) {
      stream.getCas().addFsToIndexes(each);
View Full Code Here

Examples of org.apache.uima.ruta.expression.RutaExpression

          AnnotationFS matchedAnnotation, RuleElement element, RuleMatch match, RutaStream stream) {
    Map<String, List<Number>> map = new HashMap<String, List<Number>>();
    for (Entry<StringExpression, RutaExpression> each : features.entrySet()) {
      RutaBlock parent = element.getParent();
      String value = each.getKey().getStringValue(parent, match, element, stream);
      RutaExpression expr = each.getValue();
      List<Number> ints = new ArrayList<Number>();
      if (expr instanceof NumberExpression) {
        NumberExpression ne = (NumberExpression) expr;
        ints.add(ne.getIntegerValue(parent, match, element, stream));
        map.put(value, ints);
View Full Code Here

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

      if (object2 instanceof ASTNode) {
        ASTNode astnode = (ASTNode) object2;
        List<?> childs2 = astnode.getChilds();
        for (Object object : childs2) {
          if (object instanceof RutaExpression) {
            RutaExpression expr = (RutaExpression) object;
            // if (expr.isInParantheses()) {
            // append(PAR_OPEN);
            // append(expr);
            // append(PAR_CLOSE);
            // } else {
View Full Code Here

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

      if (tma.getKind() == RutaActionConstants.A_ASSIGN) {
        List<?> childs = tma.getChilds();
        try {
          RutaVariableReference ref = (RutaVariableReference) childs.get(0);
          RutaExpression expr = (RutaExpression) childs.get(1);
          int type = expr.getKind();
          if (ref.getType() == RutaTypeConstants.RUTA_TYPE_G) {
            ref.setType(type);
          }
        } catch (IndexOutOfBoundsException e) {
          // exception should have been recognized and reported in
View Full Code Here

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

        if (tma.getKind() == RutaActionConstants.A_ASSIGN) {
          List<?> childs = tma.getChilds();
          try {
            RutaVariableReference ref = (RutaVariableReference) childs.get(0);
            RutaExpression expr = (RutaExpression) childs.get(1);
            int type = expr.getKind();
            if (ref.getType() == RutaTypeConstants.RUTA_TYPE_G) {
              ref.setType(type);
            }
          } catch (IndexOutOfBoundsException e) {
            // exception should have been recognized and reported in
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.