org.geotools.filter.text.ecql
Class ECQLCompiler

java.lang.Object
  extended by org.geotools.filter.text.generated.parsers.ECQLParser
      extended by org.geotools.filter.text.ecql.ECQLCompiler
All Implemented Interfaces:
ICompiler, org.geotools.filter.text.generated.parsers.ECQLParserConstants, org.geotools.filter.text.generated.parsers.ECQLParserTreeConstants

public class ECQLCompiler
extends org.geotools.filter.text.generated.parsers.ECQLParser
implements ICompiler

ECQLCompiler

Builds the filter, expression or arguments related with the visited node of syntax tree

Since:
2.6
Version:
Revision: 1.9
Author:
Jody Garnett, Mauricio Pazos (Axios Engineering)

Field Summary
 
Fields inherited from class org.geotools.filter.text.generated.parsers.ECQLParser
GEOOP, jj_nt, jjtree, RELGEOOP, token, token_source
 
Fields inherited from interface org.geotools.filter.text.generated.parsers.ECQLParserTreeConstants
JJTADDNODE, JJTBETWEEN_NODE, JJTBOOLEAN_AND_NODE, JJTBOOLEAN_NOT_NODE, JJTBOOLEAN_OR_NODE, JJTCOMPARISONPREDICATE_EQ_NODE, JJTCOMPARISONPREDICATE_GT_NODE, JJTCOMPARISONPREDICATE_GTE_NODE, JJTCOMPARISONPREDICATE_LT_NODE, JJTCOMPARISONPREDICATE_LTE_NODE, JJTCOMPARISONPREDICATE_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, JJTEXPRESSION_IN_LIST_NODE, JJTFALSENODE, JJTFEATURE_ID_NODE, JJTFLOATINGNODE, JJTFUNCTION_NODE, JJTFUNCTIONARG_NODE, JJTFUNCTIONNAME_NODE, JJTGEOMETRYCOLLECTIONTEXT_NODE, JJTGEOMETRYLITERAL, JJTID_PREDICATE_NODE, JJTIDENTIFIER_NODE, JJTIDENTIFIER_PART_NODE, JJTIN_PREDICATE_NODE, JJTINCLUDE_NODE, JJTINTEGERNODE, JJTLIKE_NODE, JJTLINESTRINGTEXT_NODE, JJTMULNODE, JJTMULTILINESTRINGTEXT_NODE, JJTMULTIPOINTTEXT_NODE, JJTMULTIPOLYGONTEXT_NODE, JJTNEGATIVENUMBER_NODE, jjtNodeName, JJTNOT_BETWEEN_NODE, JJTNOT_ID_PREDICATE_NODE, JJTNOT_IN_PREDICATE_NODE, JJTNOT_LIKE_NODE, JJTNOTNULLPREDICATENODE, JJTNULLPREDICATENODE, JJTPERIOD_BETWEEN_DATES_NODE, JJTPERIOD_WITH_DATE_DURATION_NODE, JJTPERIOD_WITH_DURATION_DATE_NODE, JJTPOINT_NODE, JJTPOINTTEXT_NODE, JJTPOLYGONTEXT_NODE, JJTRELATE_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_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 org.geotools.filter.text.generated.parsers.ECQLParserConstants
AFTER, AND, BBOX, BEFORE, BETWEEN, BEYOND, COLON, COMMA, CONTAINS, CROSSES, 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, EQUALS, EXCLUDE, EXISTS, EXPONENT, FALSE, FEET, FLOATING_LITERAL, FULL_DATE, GEOMETRYCOLLECTION, GT, GTE, ID, IDENTIFIER, IN, INCLUDE, INTEGER_LITERAL, INTERSECTS, IS, KILOMETERS, LETTER, LIKE, LINESTRING, LP, LSP, LT, LTE, METERS, MINUS, MULT, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, NAUTICAL_MILES, NEQ, NOT, NULL, OR, OVERLAPS, PERIOD, PLUS, POINT, POLYGON, RELATE, RP, RSP, SENTENCE_SEPARATOR, SLASH, STATUTE_MILES, STRING_LITERAL, tokenImage, TOUCHES, TRUE, UNKNOWN, UTC, UTC_TIME, WITHIN
 
Constructor Summary
ECQLCompiler(java.lang.String txtSource, org.opengis.filter.FilterFactory filterFactory)
          new instance of TXTCompiler
 
Method Summary
 void compileExpression()
          compiles source to produce a Expression
 void compileFilter()
          compile source to produce a Filter.
 void compileFilterList()
          Compiles a list of filters
 org.opengis.filter.expression.Expression getExpression()
          Return the expression resultant of compiling process
 org.opengis.filter.Filter getFilter()
          Return the filter resultant of compiling process
 java.util.List<org.opengis.filter.Filter> getFilterList()
          Returns the list of Filters built as the result of calling ECQLParser.FilterListCompilationUnit()()
 java.lang.String getSource()
           
 IToken getTokenInPosition(int index)
          Return the token presents in the position specified.
 void jjtreeCloseNodeScope(org.geotools.filter.text.generated.parsers.Node n)
          called by parser when the node is closed.
 void jjtreeOpenNodeScope(org.geotools.filter.text.generated.parsers.Node n)
           
 
Methods inherited from class org.geotools.filter.text.generated.parsers.ECQLParser
Attribute, AttributeTail, BBoxArgListTail, BBoxArgumentList, BetweenPredicate, BinaryExpression, BooleanFactor, BooleanLiteral, BooleanPrimary, BooleanTerm, BooleanValueExpression, BoundingBox, CharacterPattern, ComparisonPredicate, DateTime, DateTimeExpression, disable_tracing, DistanceUnits, Duration, ECQLExpression, enable_tracing, EnvelopeTaggedText, EnvelopText, Evaluate, ExistencePredicate, Expression, ExpressionCompilationUnit, ExpressionInList, FilterCompilationUnit, FilterListCompilationUnit, FloatingLiteral, Function, FunctionArg, FunctionName, GeneralLiteral, generateParseException, GeometryCollectionTaggedText, GeometryCollectionText, GeometryLiteral, GeoRoutineArgumentList, getNextToken, getToken, Identifier, IdentifierPart, IdList, IdPredicate, IdValue, IncludeExcludePredicate, InPredicate, InPredicateList, 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, RelateTail, RelGeoRoutineArgumentList, RoutineInvocation, RoutineInvocationGeneric, RoutineInvocationGeoOp, RoutineInvocationRelGeoOp, SearchCondition, SequenceOfSearchConditions, SimpleAttributeName, StringLiteral, TemporalPredicate, TemporalPredicateAfter, TemporalPredicateBefore, TemporalPredicateDuring, TextPredicate, Tolerance, UnaryExpression, UnsignedNumericLiteral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECQLCompiler

public ECQLCompiler(java.lang.String txtSource,
                    org.opengis.filter.FilterFactory filterFactory)
new instance of TXTCompiler

Parameters:
txtSource -
filterFactory -
Method Detail

compileFilter

public void compileFilter()
                   throws CQLException
compile source to produce a Filter. The filter result must be retrieved with getFilter().

Specified by:
compileFilter in interface ICompiler
Throws:
CQLException

compileExpression

public void compileExpression()
                       throws CQLException
compiles source to produce a Expression

Specified by:
compileExpression in interface ICompiler
Throws:
CQLException

compileFilterList

public void compileFilterList()
                       throws CQLException
Compiles a list of filters

Specified by:
compileFilterList in interface ICompiler
Throws:
CQLException

getSource

public final java.lang.String getSource()
Specified by:
getSource in interface ICompiler
Returns:
the ECQLsource

getFilter

public final org.opengis.filter.Filter getFilter()
                                          throws CQLException
Return the filter resultant of compiling process

Specified by:
getFilter in interface ICompiler
Returns:
Filter
Throws:
CQLException
See Also:
ICompiler.compileFilter()

getExpression

public final org.opengis.filter.expression.Expression getExpression()
                                                             throws CQLException
Return the expression resultant of compiling process

Specified by:
getExpression in interface ICompiler
Returns:
Expression
Throws:
CQLException
See Also:
ICompiler.compileExpression()

getTokenInPosition

public IToken getTokenInPosition(int index)
Description copied from interface: ICompiler
Return the token presents in the position specified.

Specified by:
getTokenInPosition in interface ICompiler
Returns:
IToken

getFilterList

public java.util.List<org.opengis.filter.Filter> getFilterList()
                                                        throws CQLException
Returns the list of Filters built as the result of calling ECQLParser.FilterListCompilationUnit()()

Specified by:
getFilterList in interface ICompiler
Returns:
List
Throws:
CQLException - if a ClassCastException occurs while casting a built item to a Filter.
See Also:
ICompiler.compileFilterList()

jjtreeOpenNodeScope

public final void jjtreeOpenNodeScope(org.geotools.filter.text.generated.parsers.Node n)
Overrides:
jjtreeOpenNodeScope in class org.geotools.filter.text.generated.parsers.ECQLParser

jjtreeCloseNodeScope

public final void jjtreeCloseNodeScope(org.geotools.filter.text.generated.parsers.Node n)
                                throws org.geotools.filter.text.generated.parsers.ParseException
called by parser when the node is closed.

Overrides:
jjtreeCloseNodeScope in class org.geotools.filter.text.generated.parsers.ECQLParser
Throws:
org.geotools.filter.text.generated.parsers.ParseException


Copyright © 1996-2010 Geotools. All Rights Reserved.