Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.6-M2
-
Fix Version/s: None
-
Component/s: xsd extensions
-
Labels:None
Description
Attached patch improves support for encoding complex features. This patch includes the changes in the patch attached to GEOT-2455, which is superseded by this patch.
Changes include:
- Adding two new GML3 bindings to permit encoding of attributes simpleContent for complexType with simpleContent: the two supported types are CodeType and StringOrRefType.
- Improved checking for supported descriptors in GML2EncodingUtils.
- Disabled automatic conversion of ComplexAttribute in ElementEncodeExecutor (should not see the toString() of a complex feature in your XML)
- Support encoding of generic attributes stored in UserData map of complex attributes.
Issue Links
- supercedes
-
GEOT-2455
Only one gml:name can be encoded per feature
-
1) I am not crazy about the reference to ComplexAttribute from ElementEncodeExecutor. The core of the encoder should ideally remain independent of any external dependencies. I realize that in this case the dependency is not "external" but it is a dependency on a particular class of a specific object model which should probably remain confined to GML. So if we can avoid it i would like to.
So it seems the problem is that when encoding the binding being executed declares its type to be String, but the object it is getting is a ComplexAttribute. This indicates to me a problem more with the binding. If you can explain the issue to me perhaps you can convince me it is necessary, i just need more context.
2) I would need to do some hand testing but it seems the mods to GML2EncodingUtils kill the simple feature case. The changes to getProperty will basically return null for all cases except for boundedBy? it looks like this is counter balanced with the mods to getProperties() which removes the gml filter check, and only returns attributes for which the value is non-null... hmmm I can't be sure by inspection if this will not break anything. Off the top of my head i can't think of a reason why it would not work, but once again... the cite tests here will relieve any doubt. Has this patch been put through cite QA? For both wfs 1.0 and wfs 1.1?
The rest of the patch looks ok at a first glance.