Package org.apache.uima.ruta.extensions

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


  }

  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

    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

  }

  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

Related Classes of org.apache.uima.ruta.extensions.RutaParseException

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.