Contact: |
|
|---|---|
Tracker: |
|
Tagline: |
modifyFeatures(Name,Value,Filter) |
This page represents the current plan; for discussion please check the tracker link above.
Description
I have a bug assigned to me, GEOT-2376 covering what appears to be a mistake early on when defining FeatureStore. The modifyFeature methods both take an AttributeDescriptor, rather then a Name.
There are a couple of drawbacks to this:
- it introduced the possibility of error (the user has to look up the exactly correct attribute descriptor).
- It "mixing up "query" api with "metadata" description (a mistake me made earlier when Filter required an AttributeType)
- it is needlessly complicated
To back up this bug a code review of all feature store implementations show that:
- implementors noticed the waste of time and simply use the provided AttributeDescriptor as as String (using descriptor.getLocalName())
- i the case of JDBCDataStore they look up the correct attribute descriptor by Name and silently substitute.
API CHANGE
Before:
After:
The patch also updates implementations and passes tests when applied against 2.6.x at the time of writing.
Related:
- It would be kind to add SimpleFeatureStore implementations that take a String should that proposal be accepted.
Status
This bug report now needs a proposal as it reflects an api change; the patch is ready.
Proposal accepted; applied to trunk:
- Andrea Aime +1
- Ben Caradoc-Davies +1
- Christian Mueller +1
- Ian Turton +1
- Justin Deoliveira +1
- Jody Garnett +1
- Michael Bedward +0
- Simone Giannecchini +0
Tasks
|
no progress |
|
done |
|
impeded |
|
lack mandate/funds/time |
|
volunteer needed |
|---|
- Apply patch from http://jira.codehaus.org/browse/GEOT-2376 to trunk
- May wish to update SimpleFeatureStore with modifyFeature( String name, Object value, Filter filter ) and modifyFeatures( String name[], Object value[], Filter filter )
- Update example code