Examples of RutaParseException


Examples of org.apache.uima.ruta.extensions.RutaParseException

  }

  public ExampleBooleanFunction createBooleanFunction(String name, List<RutaExpression> args)
          throws RutaParseException {
    if (args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {
      throw new RutaParseException(
              "ExampleBooleanFunction accepts only one TypeExpression as argument!");
    }
    return new ExampleBooleanFunction((TypeExpression) args.get(0));
  }
View Full Code Here

Examples of org.apache.uima.ruta.extensions.RutaParseException

  }

  public ExampleStringFunction createStringFunction(String name, List<RutaExpression> args)
          throws RutaParseException {
    if (args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {
      throw new RutaParseException("ExampleStringFunction accepts only one TypeExpression as argument!");
    }
    return new ExampleStringFunction((TypeExpression) args.get(0));
  }
View Full Code Here

Examples of org.apache.uima.ruta.extensions.RutaParseException

    if (args != null) {
      for (RutaExpression each : args) {
        if (each instanceof NumberExpression) {
          arguments.add((NumberExpression) each);
        } else {
          throw new RutaParseException("ExampleAction accepts only NumberExpressions as arguments");
        }
      }
    }
    return new ExampleAction(arguments);
  }
View Full Code Here

Examples of org.apache.uima.ruta.extensions.RutaParseException

  }

  public NumberFunctionExpression createNumberFunction(String name, List<RutaExpression> args)
          throws RutaParseException {
    if (args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {
      throw new RutaParseException("ExampleNumberFunction accepts only one TypeExpression as argument!");
    }
    return new ExampleNumberFunction((TypeExpression) args.get(0));
  }
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.