org.deegree.filter
Class Filters

java.lang.Object
  extended by org.deegree.filter.Filters

public class Filters
extends Object

Various static methods for performing standard tasks on Filter objects.

Version:
$Revision: 31658 $, $Date: 2011-08-25 20:09:40 +0200 (Thu, 25 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $
See Also:
Filter

Constructor Summary
Filters()
           
 
Method Summary
static Filter addBBoxConstraint(Envelope bbox, Filter filter, ValueReference propName)
          Adds a bounding box constraint to the given Filter.
static Geometry[] getGeometries(Filter filter)
          Returns all Geometry-values contained in the given Filter (taking nesting into account).
static ValueReference[] getPropertyNames(Filter filter)
          Returns all ValueReferences contained in the given Filter (taking nesting into account).
static void setDefaultCRS(Filter filter, ICRS crs)
          Sets the CRS for all geometries contained in the given Filter that do not have crs information.
static Pair<Filter,Envelope> splitOffBBoxConstraint(Filter filter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filters

public Filters()
Method Detail

addBBoxConstraint

public static Filter addBBoxConstraint(Envelope bbox,
                                       Filter filter,
                                       ValueReference propName)
Adds a bounding box constraint to the given Filter.

Parameters:
bbox - bounding box, can be null
filter - filter expression, can be null
propName - can be null
Returns:
combined filter or null (if bbox and filter are null)

splitOffBBoxConstraint

public static Pair<Filter,Envelope> splitOffBBoxConstraint(Filter filter)
Parameters:
filter - can be null
Returns:
the reverse of #addBBoxConstraint

getPropertyNames

public static ValueReference[] getPropertyNames(Filter filter)
Returns all ValueReferences contained in the given Filter (taking nesting into account).

Parameters:
filter - filter to be traversed, must not be null
Returns:
ValueReferences found on any nodes of the Filter, can be empty, but never null

getGeometries

public static Geometry[] getGeometries(Filter filter)
Returns all Geometry-values contained in the given Filter (taking nesting into account).

Parameters:
filter - filter to be traversed, must not be null
Returns:
Geometrys found on any nodes of the Filter, can be empty, but never null

setDefaultCRS

public static void setDefaultCRS(Filter filter,
                                 ICRS crs)
Sets the CRS for all geometries contained in the given Filter that do not have crs information.

Parameters:
filter - filter to process, must not be null
crs - crs to set, must not be null


Copyright © 2011. All Rights Reserved.