org.deegree.filter
Class IdFilter

java.lang.Object
  extended by org.deegree.filter.IdFilter
All Implemented Interfaces:
Filter

public class IdFilter
extends Object
implements Filter

Filter that matches resources by ResourceIds.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.filter.Filter
Filter.Type
 
Constructor Summary
IdFilter(List<ResourceId> selectedIds)
          Creates a new IdFilter that selects the resources with the given ids.
IdFilter(Set<String> selectedIds)
          Creates a new IdFilter that selects the resources with the given ids.
IdFilter(String... selectedIds)
          Creates a new IdFilter that selects the resources with the given ids.
 
Method Summary
<T> boolean
evaluate(T obj, XPathEvaluator<T> xpathEvaluator)
          Determines if the given object matches this Filter.
 Set<String> getMatchingIds()
          Deprecated. use getSelectedIds() instead
 List<ResourceId> getSelectedIds()
          Returns the ids of the resources that this filter selects.
 Filter.Type getType()
          Always returns Filter.Type.ID_FILTER (for IdFilter instances).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdFilter

public IdFilter(String... selectedIds)
Creates a new IdFilter that selects the resources with the given ids.

Parameters:
ids - ids of the resources that the filter will selects, must not be null

IdFilter

public IdFilter(Set<String> selectedIds)
Creates a new IdFilter that selects the resources with the given ids.

Parameters:
ids - ids of the resources that the filter will selects, must not be null

IdFilter

public IdFilter(List<ResourceId> selectedIds)
Creates a new IdFilter that selects the resources with the given ids.

Parameters:
selectedIds - ids of the resources that the filter will selects, must not be null
Method Detail

getType

public Filter.Type getType()
Always returns Filter.Type.ID_FILTER (for IdFilter instances).

Specified by:
getType in interface Filter
Returns:
Filter.Type.ID_FILTER

getSelectedIds

public List<ResourceId> getSelectedIds()
Returns the ids of the resources that this filter selects.

Returns:
the ids of the resources that this filter selects

getMatchingIds

public Set<String> getMatchingIds()
Deprecated. use getSelectedIds() instead

Returns the ids of the objects that this filter matches.

Returns:
the ids of the objects that this filter matches

evaluate

public <T> boolean evaluate(T obj,
                            XPathEvaluator<T> xpathEvaluator)
                 throws FilterEvaluationException
Description copied from interface: Filter
Determines if the given object matches this Filter.

Specified by:
evaluate in interface Filter
Type Parameters:
T - type of the context object
Parameters:
obj - object that the operator is evaluated upon, must not be null
xpathEvaluator - used for evaluation of XPath expressions, must not be null
Returns:
true, if the operator evaluates to true, false otherwise
Throws:
FilterEvaluationException - if the evaluation fails


Copyright © 2011. All Rights Reserved.