|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectCQLParser
CQLCompiler
public class CQLCompiler
CQL Compiler. This class extend the CQLParser generated by javacc with semantic actions.
The "build..." methods implement that semantic actions making a filter for each syntax rules recognized.
Warning: This component is not published. It is part of module implementation. Client module should not use this feature.
TODO This module should use the new geometry API, more info in http://docs.codehaus.org/display/GEOTOOLS/GeomeryFactoryFinder+Proposal
Field Summary |
---|
Fields inherited from class CQLParser |
---|
GEOOP, jj_nt, jjtree, lookingAhead, RELGEOOP, token, token_source |
Fields inherited from interface CQLParserTreeConstants |
---|
JJTADDNODE, JJTBETWEEN_NODE, JJTBOOLEAN_AND_NODE, JJTBOOLEAN_NOT_NODE, JJTBOOLEAN_OR_NODE, JJTCOMPARISSONPREDICATE_EQ_NODE, JJTCOMPARISSONPREDICATE_GT_NODE, JJTCOMPARISSONPREDICATE_GTE_NODE, JJTCOMPARISSONPREDICATE_LT_NODE, JJTCOMPARISSONPREDICATE_LTE_NODE, JJTCOMPARISSONPREDICATE_NOT_EQUAL_NODE, JJTCOMPOUND_ATTRIBUTE_NODE, JJTDATETIME_NODE, JJTDISTANCEUNITS_NODE, JJTDIVNODE, JJTDURATION_DATE_NODE, JJTENVELOPETAGGEDTEXT_NODE, JJTEXCLUDE_NODE, JJTEXISTENCE_PREDICATE_DOESNOTEXIST_NODE, JJTEXISTENCE_PREDICATE_EXISTS_NODE, JJTFALSENODE, JJTFLOATINGNODE, JJTFUNCTION_NODE, JJTFUNCTIONARG_NODE, JJTFUNCTIONNAME_NODE, JJTIDENTIFIER_NODE, JJTIDENTIFIER_PART_NODE, JJTINCLUDE_NODE, JJTINTEGERNODE, JJTLIKE_NODE, JJTMULNODE, jjtNodeName, JJTNOT_BETWEEN_NODE, JJTNOT_LIKE_NODE, JJTNOTNULLPREDICATENODE, JJTNULLPREDICATENODE, JJTPERIOD_BETWEEN_DATES_NODE, JJTPERIOD_WITH_DATE_DURATION_NODE, JJTPERIOD_WITH_DURATION_DATE_NODE, JJTROUTINEINVOCATION_GEOOP_BBOX_NODE, JJTROUTINEINVOCATION_GEOOP_BBOX_SRS_NODE, JJTROUTINEINVOCATION_GEOOP_CONTAIN_NODE, JJTROUTINEINVOCATION_GEOOP_CROSS_NODE, JJTROUTINEINVOCATION_GEOOP_DISJOINT_NODE, JJTROUTINEINVOCATION_GEOOP_EQUAL_NODE, JJTROUTINEINVOCATION_GEOOP_INTERSECT_NODE, JJTROUTINEINVOCATION_GEOOP_OVERLAP_NODE, JJTROUTINEINVOCATION_GEOOP_RELATE_NODE, JJTROUTINEINVOCATION_GEOOP_TOUCH_NODE, JJTROUTINEINVOCATION_GEOOP_WITHIN_NODE, JJTROUTINEINVOCATION_RELOP_BEYOND_NODE, JJTROUTINEINVOCATION_RELOP_DWITHIN_NODE, JJTSIMPLE_ATTRIBUTE_NODE, JJTSTRINGNODE, JJTSUBTRACTNODE, JJTTOLERANCE_NODE, JJTTPAFTER_DATETIME_NODE, JJTTPBEFORE_DATETIME_NODE, JJTTPBEFORE_OR_DURING_PERIOD_NODE, JJTTPDURING_OR_AFTER_PERIOD_NODE, JJTTPDURING_PERIOD_NODE, JJTTRUENODE, JJTVOID, JJTWKTNODE |
Fields inherited from interface CQLParserConstants |
---|
AFTER, AND, BBOX, BEFORE, BETWEEN, BEYOND, COLON, COMMA, CONTAINS, CROSS, DATE_TIME, DEFAULT, DIGIT, DISJOINT, DOES_NOT_EXIST, DUR_DATE, DUR_DAY, DUR_HOUR, DUR_MINUTE, DUR_MONTH, DUR_SECOND, DUR_TIME, DUR_YEAR, DURATION, DURING, DWITHIN, ENVELOPE, EOF, EQ, EQUAL, EXCLUDE, EXISTS, EXPONENT, FALSE, FEET, FLOATING_LITERAL, FULL_DATE, GEOMETRYCOLLECTION, GT, GTE, IDENTIFIER, INCLUDE, INTEGER_LITERAL, INTERSECT, IS, KILOMETERS, LETTER, LIKE, LINESTRING, LP, LSP, LT, LTE, METERS, MINUS, MULT, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, NAUTICAL_MILES, NEQ, NOT, NULL, OR, OVERLAP, PERIOD, PLUS, POINT, POLYGON, RELATE, RP, RSP, SENTENCE_SEPARATOR, SLASH, STATUTE_MILES, STRING_LITERAL, tokenImage, TOUCH, TRUE, UNKNOWN, UTC, UTC_TIME, WITHIN |
Constructor Summary | |
---|---|
CQLCompiler(String cqlSource,
FilterFactory filterFactory)
new instance of CQL Compiler |
Method Summary | |
---|---|
void |
compileExpression()
compile source to produce a Expression |
void |
compileFilter()
compile source to produce a Filter. |
void |
compileFilterList()
Compiles the source string to produce a List of Filter . |
Expression |
getExpression()
Return the expression resultant of compiling process |
Filter |
getFilter()
Return the filter resultant of compiling process |
List<Filter> |
getFilterList()
Returns the list of Filters built as the result of calling #MultipleCompilationUnit() |
String |
getSource()
|
IToken |
getTokenInPosition(int index)
Return the token presents in the position specified. |
void |
jjtreeCloseNodeScope(Node n)
|
void |
jjtreeOpenNodeScope(Node n)
|
static void |
main(String[] args)
On line cql interpreter |
Methods inherited from class CQLParser |
---|
Attribute, AttributeTail, BBoxArgumentList, BetweenPredicate, BinaryExpression, BooleanFactor, BooleanLiteral, BooleanPrimary, BooleanTerm, BooleanValueExpression, CharacterPattern, ComparissonPredicate, DateTime, DateTimeExpression, disable_tracing, DistanceUnits, Duration, enable_tracing, EnvelopeTaggedText, EnvelopText, Evaluate, ExistencePredicate, Expression, ExpressionCompilationUnit, FilterCompilationUnit, FilterListCompilationUnit, FloatingLiteral, Function, FunctionArg, GeneralLiteral, generateParseException, GeometryCollectionTaggedText, GeometryCollectionText, GeometryLiteral, GeoRoutineArgumentList, getNextToken, getToken, Identifier, IdentifierPart, IncludeExcludePredicate, IntegerLiteral, isGeoOp, isRelGeoOp, LineStringTaggedText, LineStringText, Literal, MultiLineStringTaggedText, MultiLineStringText, MultiplicativeExpression, MultiPointTaggedText, MultiPointText, MultiPolygonTaggedText, MultiPolygonText, NullPredicate, NumericLiteral, Period, PeriodTail, Point, PointTaggedText, PointText, PolygonTaggedText, PolygonText, Predicate, ReInit, ReInit, ReInit, ReInit, RelGeoRoutineArgumentList, RoutineInvocation, RoutineInvocationGeneric, RoutineInvocationGeoOp, RoutineInvocationRelGeoOp, SearchCondition, SequenceOfSearchConditions, SignedNumericLiteral, SimpleAttributeName, StringLiteral, TemporalPredicate, TemporalPredicateAfter, TemporalPredicateBefore, TemporalPredicateDuring, TextPredicate, Tolerance, UnaryExpression, UnsignedNumericLiteral |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CQLCompiler(String cqlSource, FilterFactory filterFactory)
cqlSource
- filterFactory
- Method Detail |
---|
public void compileFilter() throws CQLException
getFilter()
.
compileFilter
in interface ICompiler
CQLException
public void compileExpression() throws CQLException
compileExpression
in interface ICompiler
CQLException
public void compileFilterList() throws CQLException
ICompiler
List
of Filter
.
The result must be retrieved with ICompiler.getFilterList()()
.
compileFilterList
in interface ICompiler
CQLException
public final String getSource()
getSource
in interface ICompiler
public final Filter getFilter() throws CQLException
getFilter
in interface ICompiler
CQLException
ICompiler.compileFilter()
public final Expression getExpression() throws CQLException
getExpression
in interface ICompiler
CQLException
ICompiler.compileExpression()
public final List<Filter> getFilterList() throws CQLException
#MultipleCompilationUnit()
getFilterList
in interface ICompiler
CQLException
- if a ClassCastException occurs while casting a built item to
a Filter.ICompiler.compileFilterList()
public IToken getTokenInPosition(int index)
ICompiler
getTokenInPosition
in interface ICompiler
public final void jjtreeOpenNodeScope(Node n)
jjtreeOpenNodeScope
in class CQLParser
public final void jjtreeCloseNodeScope(Node n) throws ParseException
jjtreeCloseNodeScope
in class CQLParser
ParseException
public static void main(String[] args) throws ParseException
args
-
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |