public FilterValidator setFilter(final FilterOption filter) {
    this.filter = filter;

    if (filter.getExpression() == null) {
      fail("FilterValidator: no filter found");
    }
    setExpression(filter.getExpression());
    return this;
  }
 public FilterValidator runUri(final String path, final String query)
     throws UriParserException, UriValidationException {
   final UriInfo uriInfo = new Parser(edm, odata).parseUri(path, query, null);
   assertTrue(
       "Filtervalidator can only be used on resourcePaths",
       uriInfo.getKind() == UriInfoKind.resource);
   setFilter(uriInfo.getFilterOption());
   curExpression = filter.getExpression();
   return this;
 }
  public FilterValidator runUri(final String path, final String query) throws UriParserException {
    Parser parser = new Parser();
    UriInfo uriInfo = null;

    uriInfo = parser.parseUri(path, query, null, edm);

    if (uriInfo.getKind() != UriInfoKind.resource) {
      fail("Filtervalidator can only be used on resourcePaths");
    }

    setFilter(uriInfo.getFilterOption());
    curExpression = filter.getExpression();
    return this;
  }
 public FilterValidator setFilter(final FilterOption filter) {
   this.filter = filter;
   assertNotNull("FilterValidator: no filter found", filter.getExpression());
   setExpression(filter.getExpression());
   return this;
 }
 public FilterValidator root() {
   curExpression = filter == null ? rootExpression : filter.getExpression();
   return this;
 }