Justin Deoliveira wrote:
> <snip>
>
> Works for me. I admit a bit flaky... but i blame the OGC for there
> crazy namespace schemes :).
>
ok, applied it. Thanks for the prompt answer btw.
Gabriel
>> yup, I was kind of wanting to find a cleaner solution but if the
>> following is ok for you I can go for it:
>>
>> Index: src/main/java/org/geotools/gml2/bindings/GML2ParsingUtils.java
>> ===================================================================
>> --- src/main/java/org/geotools/gml2/bindings/GML2ParsingUtils.java
>> (revision 32695)
>> +++ src/main/java/org/geotools/gml2/bindings/GML2ParsingUtils.java
>> (working copy)
>> @@ -251,9 +251,11 @@
>> // create the type
>>
>> ftBuilder.minOccurs(min).maxOccurs(max).add(property.getName(),
>> theClass);
>>
>> - //set the default geometry explicitly
>> + //set the default geometry explicitly. Note we're
>> comparing the GML namespace
>> + //with String.startsWith to catch up on the GML 3.2
>> namespace too, which is hacky.
>> + final String propNamespace = property.getTargetNamespace();
>> if (Geometry.class.isAssignableFrom(theClass)
>> - &&
>> !GML.NAMESPACE.equals(property.getTargetNamespace())) {
>> + && (propNamespace == null ||
>> !propNamespace.startsWith(GML.NAMESPACE))) {
>> //only set if non-gml, we do this because of
>> "gml:location",
>> // we dont want that to be the default if the user
>> has another
>> // geometry attribute
>>
>>
>>
>> cheers,
>> Gabriel
>>
>> PS: created http://jira.codehaus.org/browse/GEOT-2408
>>>>
>>>> Also, how can I proceed to commit the change in main for GEOT-2403
>>>> without breaking the build while this is sorted out?
>>>>
>>>> Cheers,
>>>>
>>>> Gabriel.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel