|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.xml.filter.FilterEncodingPreProcessor
public class FilterEncodingPreProcessor
Prepares a filter for xml encoded for interoperability with another system. It will behave differently depeding on the compliance level chosen. A new request will have to be made and the features will have to be tested again on the client side if there are any FidFilters in the filter. Consider the following to understand why: and { nullFilter or{ fidFilter nullFilter } } for strict it would throw an exception, for low it would be left alone, but for Medium it would end up as: and{ nullFilter nullFilter } and getFids() would return the fids in the fidFilter. So the final filter would (this is not standard but a common implementation) return the results of the and filter as well as all the features that match the fids. Which is more than the original filter would accept. The XML Document writer can operate at different levels of compliance. The geotools level is extremely flexible and forgiving.
All NOT(FidFilter) are changed to Filter.INCLUDE. So make sure that the filter is processed again on the client with the original filter
For a description of the difference Compliance levels that can be used seeXMLHandlerHints.VALUE_FILTER_COMPLIANCE_LOW
XMLHandlerHints.VALUE_FILTER_COMPLIANCE_MEDIUM
XMLHandlerHints.VALUE_FILTER_COMPLIANCE_HIGH
Constructor Summary | |
---|---|
FilterEncodingPreProcessor(java.lang.Integer complianceLevel)
|
Method Summary | |
---|---|
FidFilter |
getFidFilter()
Gets the fid filter that contains all the fids. |
org.opengis.filter.Filter |
getFilter()
Returns the filter that can be encoded. |
boolean |
requiresPostProcessing()
Returns true if the filter was one where the request to the server is more general than the actual filter. |
void |
visit(AttributeExpression expression)
Called when accept is called on an attribute expression. |
void |
visit(BetweenFilter filter)
Called when accept is called on a BetweenFilter. |
void |
visit(CompareFilter filter)
Called when accept is called on a Compare Filter. |
void |
visit(org.opengis.filter.ExcludeFilter filter)
|
void |
visit(Expression expression)
This should never be called. |
void |
visit(FidFilter filter)
Called when accept is called on a Fid Filter. |
void |
visit(Filter filter)
Called when accept is called on an AbstractFilter. |
void |
visit(FunctionExpression expression)
Called when accept is called on an function expression. |
void |
visit(GeometryFilter filter)
Called when accept is called on a Geometry Filter. |
void |
visit(org.opengis.filter.IncludeFilter filter)
|
void |
visit(LikeFilter filter)
Called when accept is called on a Like Filter. |
void |
visit(LiteralExpression expression)
Called when accept is called on a literal expression. |
void |
visit(LogicFilter filter)
Called when accept is called on a Logic Filter. |
void |
visit(MathExpression expression)
Called when accept is called on an math expression. |
void |
visit(NullFilter filter)
Called when accept is called on a Null Filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilterEncodingPreProcessor(java.lang.Integer complianceLevel)
Method Detail |
---|
public FidFilter getFidFilter()
public org.opengis.filter.Filter getFilter()
public void visit(Filter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visitpublic void visit(BetweenFilter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visitpublic void visit(CompareFilter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visitpublic void visit(GeometryFilter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visitpublic void visit(LikeFilter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visit.public void visit(LogicFilter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visit.public void visit(NullFilter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visit.public void visit(FidFilter filter)
FilterVisitor
visit
in interface FilterVisitor
filter
- The filter to visit.public void visit(AttributeExpression expression)
FilterVisitor
visit
in interface FilterVisitor
expression
- The expression to visit.public void visit(Expression expression)
FilterVisitor
visit
in interface FilterVisitor
expression
- the expression to visit.public void visit(LiteralExpression expression)
FilterVisitor
visit
in interface FilterVisitor
expression
- The expression to visit.public void visit(MathExpression expression)
FilterVisitor
visit
in interface FilterVisitor
expression
- The expression to visit.public void visit(FunctionExpression expression)
FilterVisitor
visit
in interface FilterVisitor
expression
- The expression to visit.public void visit(org.opengis.filter.IncludeFilter filter)
visit
in interface FilterVisitor2
public void visit(org.opengis.filter.ExcludeFilter filter)
visit
in interface FilterVisitor2
public boolean requiresPostProcessing()
XMLHandlerHints.VALUE_FILTER_COMPLIANCE_MEDIUM
and example of when this can happen.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |