By default test executes the test parsing Comparison Predicate using the CQL compiler.
The subclass could use this as default and add more test cases with different language.
8081828384858687888990
try { item = stack.pop(); return (org.opengis.filter.expression.Expression) item.getBuilt(); } catch (ClassCastException cce) { throw new CQLException("Expecting Expression", item.getToken(), cce, this.cqlSource); } catch (EmptyStackException ese) { throw new CQLException("No items on stack"); } }
949596979899100101102103104
try { item = stack.pop(); return (Literal) item.getBuilt(); } catch (ClassCastException cce) { throw new CQLException("Expecting Literal", item.getToken(), cce, this.cqlSource); } catch (EmptyStackException ese) { throw new CQLException("No items on stack"); } }
109110111112113114115116117118119
try { item = stack.pop(); return (PropertyName) item.getBuilt(); } catch (ClassCastException cce) { throw new CQLException("Expecting Property", item.getToken(), cce, this.cqlSource); } catch (EmptyStackException ese) { throw new CQLException("No items on stack"); } }
124125126127128129130131132133134
try { item = stack.pop(); return (Filter) item.getBuilt(); } catch (ClassCastException cce) { throw new CQLException("Expecting Filter", item.getToken(), cce, this.cqlSource); } catch (EmptyStackException ese) { throw new CQLException("No items on stack"); } }
139140141142143144145146147148149
try { item = stack.pop(); return (PeriodNode) item.getBuilt(); } catch (ClassCastException cce) { throw new CQLException("Expecting Period", item.getToken(), cce, this.cqlSource); } catch (EmptyStackException ese) { throw new CQLException("No items on stack"); } }
162163164165166167168169170171172
Period period = new DefaultPeriod(new DefaultInstant(ip1),new DefaultInstant(ip2 )); return period; } catch (ClassCastException cce) { throw new CQLException("Expecting Period", item.getToken(), cce, this.cqlSource); } catch (EmptyStackException ese) { throw new CQLException("No items on stack"); } }
176177178179180181182183
Literal expr = this.popLiteral(); Double number = new Double(expr.getValue().toString()); return number.doubleValue(); } catch (ClassCastException cce) { throw new CQLException("Expected double"); } }
187188189190191192193194
Literal expr = this.popLiteral(); Integer number = (Integer) expr.getValue(); return number.intValue(); } catch (ClassCastException cce) { throw new CQLException("Expected double"); } }
204205206207208209210211
Result resultPart = stack.pop(); IToken token = resultPart.getToken(); return token.toString(); } catch (ClassCastException e) { throw new CQLException("identifier part is expected"); } }
215216217218219220221222
Result result = (Result) stack.pop(); String identifier = (String) result.getBuilt(); return identifier; } catch (ClassCastException e) { throw new CQLException("fail in identifier parsing"); } }