Package org.geotools.filter
Class FidFilterImpl
Object
FilterAbstract
AbstractFilter
FidFilterImpl
- All Implemented Interfaces:
Filter
,Id
,FilterType
- Direct Known Subclasses:
JoinId
Defines a ID filter, which holds a list of IDs ( usually feature id;s ). This filter stores a series of IDs, which
are used to distinguish features uniquely.
Please note that addAllFids( Collection ) may be a performance hog; uDig makes use of its own implementation of FidFilter in order to reuse the internal set of fids between uses.
- Author:
- Rob Hranac, TOPP, Justin Deoliveira, TOPP
TODO: this class shoul be renamed to IdFilterImpl
-
Field Summary
Fields inherited from interface FilterType
ALL, BETWEEN, COMPARE_EQUALS, COMPARE_GREATER_THAN, COMPARE_GREATER_THAN_EQUAL, COMPARE_LESS_THAN, COMPARE_LESS_THAN_EQUAL, COMPARE_NOT_EQUALS, FID, GEOMETRY_BBOX, GEOMETRY_BEYOND, GEOMETRY_CONTAINS, GEOMETRY_CROSSES, GEOMETRY_DISJOINT, GEOMETRY_DWITHIN, GEOMETRY_EQUALS, GEOMETRY_INTERSECTS, GEOMETRY_OVERLAPS, GEOMETRY_TOUCHES, GEOMETRY_WITHIN, LIKE, LOGIC_AND, LOGIC_NOT, LOGIC_OR, NONE, NULL
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FidFilterImpl
(Set<? extends Identifier> fids) Constructor which takesIdentifier
, not String. -
Method Summary
Modifier and TypeMethodDescriptionaccept
(FilterVisitor visitor, Object extraData) Used by FilterVisitors to perform some action on this filter instance.void
addAllFids
(Collection fidsToAdd) Adds a collection of feature IDs to the filter.final void
Adds a feature ID to the filter.boolean
Returns a flag indicating object equality.boolean
Determines whether or not the given feature's ID matches this filter.Accessor method for fid set as Strings.Returns the set of identifiers used by this filter.getIDs()
Set of IDs representing the Identifiers used by this filter.int
hashCode()
Override of hashCode method.void
removeAllFids
(Collection fidsToRemove) Removes a collection of feature IDs from the filter.final void
Removes a feature ID from the filter.void
toString()
Returns a string representation of this filter.Methods inherited from class AbstractFilter
isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
Methods inherited from class FilterAbstract
accepts, eval, eval
-
Constructor Details
-
FidFilterImpl
Constructor which takesIdentifier
, not String.
-
-
Method Details
-
getIDs
Description copied from interface:Id
Set of IDs representing the Identifiers used by this filter. -
getIdentifiers
Description copied from interface:Id
Returns the set of identifiers used by this filter.- Specified by:
getIdentifiers
in interfaceId
- See Also:
-
setIDs
- See Also:
-
org.geotools.api.filter.identity.FeatureId#setIDs(Set)
-
getFidsSet
Accessor method for fid set as Strings.- Returns:
- the internally stored fids.
-
addFid
Adds a feature ID to the filter.- Parameters:
fid
- A single feature ID.
-
addAllFids
Adds a collection of feature IDs to the filter.- Parameters:
fidsToAdd
- A collection of feature IDs as strings.
-
removeFid
Removes a feature ID from the filter.- Parameters:
fid
- A single feature ID.
-
removeAllFids
Removes a collection of feature IDs from the filter.- Parameters:
fidsToRemove
- A collection of feature IDs.
-
evaluate
Determines whether or not the given feature's ID matches this filter.In order to get the object's ID, the
PropertyAccessor
capable of dealing withfeature
has to support the request of the expression"@id"
-
toString
Returns a string representation of this filter. -
accept
Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure. Implementations should always call: visitor.visit(this); It is importatant that this is not left to a parent class unless the parents API is identical. -
equals
Returns a flag indicating object equality. -
hashCode
public int hashCode()Override of hashCode method.
-