use of org.apache.cxf.jaxrs.ext.search.SearchParseException in project cxf by apache.
the class ODataParser method parse.
@Override
@SuppressWarnings("unchecked")
public SearchCondition<T> parse(String searchExpression) throws SearchParseException {
try {
final T condition = conditionClass.newInstance();
final FilterExpression expression = parser.parseFilterString(searchExpression);
final FilterExpressionVisitor visitor = new FilterExpressionVisitor(condition);
return (SearchCondition<T>) expression.accept(visitor);
} catch (ODataMessageException | ODataApplicationException | InstantiationException | IllegalAccessException ex) {
throw new SearchParseException(ex);
}
}
Aggregations