Hi,

I have had the same problem on Geotools and have found a working sollution,
but i don't know how to get my changes into the project.

I have 2 adaptations:

1. rerouted the type binding for generic types like "doubleList" in
"org.geotools.xml.impl.ParseExecutor"
2. changed the execution mode of
"org.geotools.gml3.bindings.LinearRingTypeBinding" to prevent that the
anytype will override the LinearRing result.

addaption nr1:

  public void visit(Binding binding) {
  ...

    if (Schemas.nameMatches(instance.getDeclaration(), binding.getTarget()))
{
      //instance binding
      type = instance.getTypeDefinition();
    }
    else {
      //type binding
      type = Schemas.getBaseTypeDefinition(instance.getTypeDefinition(),
binding.getTarget());
//******** begin addaption **********
      if (type == null) {
        // when the type is not found, it is probably a generic (version
independant) component
        // which can be found by using the namespace of the instance instead
of the generic binding.
        QName qName = new QName(instance.getNamespace(),
binding.getTarget().getLocalPart());
        type = Schemas.getBaseTypeDefinition(instance.getTypeDefinition(),
qName);
      }
//******** end addaption **********
    }
 ...
}

addaption nr2:


public class LinearRingTypeBinding extends AbstractComplexBinding {
  ...

//******** begin addaption **********
  /**
    * Changed BEFORE into OVERRIDE because otherwise the LinearRing will be
overridden by the anytype
    */
  public int getExecutionMode() {
    return OVERRIDE;
  }
//******** end addaption    **********

  ...
}

I'm new to the Geotools project so I don't know if this will break anything.
My simple tests with Version 3.1.1 and Version 3.2.1 where succesfull.
Please respond if this is usefull or if there is already another sollution
present.

Regards,

Hans


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/GML-3-2-parsing-problem-in-GeoTools-2-7-beta1-and-GeoTools-2-6-5-tp5947067p7062260.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to