|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.filter.SQLEncoder org.geotools.filter.SQLEncoderLocationsXY
Encodes a filter into a SQL WHERE statement for MySQL. This class adds the ability to turn geometry filters into sql statements if they are bboxes.
Field Summary |
Fields inherited from class org.geotools.filter.SQLEncoder |
mapper, out |
Constructor Summary | |
SQLEncoderLocationsXY(int srid)
|
|
SQLEncoderLocationsXY(java.lang.String xcolumn,
java.lang.String ycolumn)
Empty constructor TODO: rethink empty constructor, as BBOXes _need_ an SRID, must make client set it somehow. |
Method Summary | |
protected FilterCapabilities |
createFilterCapabilities()
Sets the capabilities of this filter. |
void |
setDefaultGeometry(java.lang.String name)
Sets the default geometry, so that filters with null for one of their expressions can assume that the default geometry is intended. |
void |
setSRID(int srid)
Sets a spatial reference system ESPG number, so that the geometry can be properly encoded for postgis. |
void |
visit(GeometryFilter filter)
Turns a geometry filter into the postgis sql bbox statement. |
void |
visitLiteralGeometry(LiteralExpression expression)
Checks to see if the literal is a geometry, and encodes it if it is, if not just sends to the parent class. |
Methods inherited from class org.geotools.filter.SQLEncoder |
encode, encode, escapeName, getCapabilities, getColnameEscape, setColnameEscape, setFIDMapper, setSqlNameEscape, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitLiteralGeometry |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.filter.FilterVisitor |
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Constructor Detail |
public SQLEncoderLocationsXY(java.lang.String xcolumn, java.lang.String ycolumn)
public SQLEncoderLocationsXY(int srid)
Method Detail |
protected FilterCapabilities createFilterCapabilities()
SQLEncoder
createFilterCapabilities
in class SQLEncoder
SQLEncoder.createFilterCapabilities()
public void setSRID(int srid)
srid
- the integer code for the EPSG spatial reference system.public void setDefaultGeometry(java.lang.String name)
name
- the name of the default geometry Attribute.public void visit(GeometryFilter filter) throws java.lang.RuntimeException
visit
in interface FilterVisitor
visit
in class SQLEncoder
filter
- the geometry filter to be encoded.
java.lang.RuntimeException
- for IO exception (need a better error)FilterVisitor.visit(org.geotools.filter.GeometryFilter)
public void visitLiteralGeometry(LiteralExpression expression) throws java.io.IOException
visitLiteralGeometry
in class SQLEncoder
expression
- the expression to visit and encode.
java.io.IOException
- for IO exception (need a better error)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |