org.geotools.filter.visitor
Class EnvironmentVariableResolver

java.lang.Object
  extended byorg.geotools.filter.visitor.EnvironmentVariableResolver

public class EnvironmentVariableResolver
extends java.lang.Object

Finds instances of specific environment variable expressions within filters and composite expressins and replaces them with simple literals.

Author:
James Macgill, Penn State

Constructor Summary
EnvironmentVariableResolver()
          Empty constructor
 
Method Summary
 boolean needsResolving(Filter f)
          Test supplied filter to see if it contains any EnvironmentVariable expressions
 Expression resolve(Expression exp, double mapScale)
          Find all instances of MapScaleDenominator and replace them with the a literal expression for the provided map scale.
 Filter resolve(Filter filter, double mapScale)
          Find all instances of MapScaleDenominator and replace them with the a literal expression for the provided map scale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentVariableResolver

public EnvironmentVariableResolver()
Empty constructor

Method Detail

resolve

public Filter resolve(Filter filter,
                      double mapScale)
               throws org.geotools.filter.parser.ParseException
Find all instances of MapScaleDenominator and replace them with the a literal expression for the provided map scale. The passed in filter is NOT modifed by calls to this method.

Parameters:
filter - The Filter to check for MapScaleDenominator Environment Variables
Returns:
A Filter with the map scale env variable replaced by literals
Throws:
org.geotools.filter.parser.ParseException

resolve

public Expression resolve(Expression exp,
                          double mapScale)
                   throws org.geotools.filter.parser.ParseException
Find all instances of MapScaleDenominator and replace them with the a literal expression for the provided map scale. The passed in filter is NOT modifed by calls to this method.

Parameters:
exp - The Expression to check for MapScaleDenominator Environment Variables
Returns:
An Epression with the map scale env variable replaced by literals
Throws:
org.geotools.filter.parser.ParseException

needsResolving

public boolean needsResolving(Filter f)
Test supplied filter to see if it contains any EnvironmentVariable expressions



Copyright © GeoTools. All Rights Reserved.