| java.lang.Object org.geotools.filter.SQLUnpacker
SQLUnpacker | public class SQLUnpacker (Code) | | Determines which parts of a Filter can be turned into valid SQL statements.
Given a filter it constructs two filters, one of the supported parts of the
filter passed in, one of the unsupported. If one of the constructed
filters is null (ie the whole filter is supported or unsupported), it is
the clients responsibility to deal with that. The SQLUnpacker should be
tightly coordinated with the SQLEncoder. The SQLEncoder passes its
Capabilities (ie which filters it can encode and which it can't) to the
Unpacker, and the Unpacker returns a supported filter, which should be
passed to the Encoder as the Encoder Capabilities claimed to fully support
everything in the supported filter. The unsupported filter should be used
after the SQL statement is executed, testing each feature in the result set
with the contains method.
This Unpacker can likely be easily used with any Encoder that has a
FilterCapabilities of the actions it can perform. May want to rename it
FilterUnpacker, as it is likely generic enough, but for now this name
should be fine, to emphasize that the SQLEncoder needs to be closely linked
to it to work properly.
author: Chris Holmes, TOPP |
Constructor Summary | |
public | SQLUnpacker(FilterCapabilities capabilities) Constructor with FilterCapabilities from the Encoder used in conjunction
with this Unpacker. |
Method Summary | |
public Filter | getSupported() After an unPack has been called, returns the resulting Filter of the
supported parts of the unPacked filter. | public Filter | getUnSupported() After an unPack has been called, returns the resulting Filter of the
unsupported parts of the unPacked filter. | public void | unPackAND(org.opengis.filter.Filter filter) Performs the unpacking of a filter, for the cases when ANDs can be split
and ORs can not. | public void | unPackOR(Filter filter) Performs the unpacking of a filter, for the cases when ORs can be split
and ANDs can not. |
SQLUnpacker | public SQLUnpacker(FilterCapabilities capabilities)(Code) | | Constructor with FilterCapabilities from the Encoder used in conjunction
with this Unpacker.
Parameters: capabilities - what FilterTypes should be supported. |
getSupported | public Filter getSupported()(Code) | | After an unPack has been called, returns the resulting Filter of the
supported parts of the unPacked filter. If the unPacked filter is not
supported at all this returns a null, it is the client's responsibility
to deal with it. If there are multiple supported subfilters they are
ANDed together.
A filter of the supported parts of the unPacked filter. |
getUnSupported | public Filter getUnSupported()(Code) | | After an unPack has been called, returns the resulting Filter of the
unsupported parts of the unPacked filter. If the unPacked filter is
fully supported this returns a null, it is the client's responsibility
to deal with it. If there are multiple unsupported subfilters they are
ANDed together.
A filter of the unsupported parts of the unPacked filter. |
unPackAND | public void unPackAND(org.opengis.filter.Filter filter)(Code) | | Performs the unpacking of a filter, for the cases when ANDs can be split
and ORs can not. To get the results of the unpacking getUnsupported
and getSupported must be called before another unpacking is done.
Parameters: filter - to be unpacked, split on ANDs |
unPackOR | public void unPackOR(Filter filter)(Code) | | Performs the unpacking of a filter, for the cases when ORs can be split
and ANDs can not. To get the results of the unpacking getUnsupported
and getSupported must be called before another unpacking is done.
Parameters: filter - to be unpacked, split on ANDs |
|
|