Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: main
-
Labels:None
Description
c.f. previous req on SourceForge and in repsonse to e-mai from Chris Holmes:
would be good to be able to remove one or many Fids (also add many) to FidFilter. Here's a suggested patch (hope this is the appropriate way to submit this):
In "core", org.geotools.filter.FidFilter, add:
/**
- Adds a collection of feature IDs to the filter.
* - @param fids A collection of feature IDs.
*/
void addAllFids(Collection fidsToAdd);
/**
- Removes a collection of feature IDs from the filter.
* - @param fids A collection of feature IDs.
*/
void removeAllFids(Collection fidsToRemove);
/**
- Removes a feature ID from the filter.
* - @param fid A single feature ID.
*/
public final void removeFid(String fid)
and implement them in "defaultcore", org.geotools.filter.FidFilterImpl by adding functions to appropriately manipulate its 'HashSet fids':
/**
- Removes a collection of feature IDs from the filter.
* - @param fids A collection of feature IDs.
*/
void removeAllFids(Collection fidsToRemove); { LOGGER.finest("got" + fidsToRemove.size() + "fids to remove"); fids.removeAll(fidsToRemove); }
/**
- Adds a collection of feature IDs to the filter.
* - @param fids A collection of feature IDs.
*/
void addAllFids(Collection fidsToAdd); { LOGGER.finest("got " + fidsToAdd.size() + " fids to add"); fids.addAll(fidsToAdd); }
/**
- Removes a feature ID from the filter.
* - @param fid A single feature ID.
*/
public final void removeFid(String fid) { LOGGER.finest("got fid to remove: " + fid); fids.remove(fid); }
Don't know what you want to do with the LOGGER, but o/wise, hope that's as straightforward as it seems!
best,
proshun.