vylan / javaapiforkml

Automatically exported from code.google.com/p/javaapiforkml
0 stars 0 forks source link

use @XmlElementRef annotation for every abstract element #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
{{{
    @XmlElement(name = "AbstractFeatureObjectExtensionGroup")
    protected List<AbstractObject> featureObjectExtension;
}}}

results in wrong kml output:
{{{
<GroundOverlay id="ID">
    <AbstractFeatureObjectExtensionGroup
xmlns:ns5="http://www.w3.org/2001/XMLSchema-instance"
ns5:type="gx:LatLonQuadType">
        <coordinates>0.0,0.0</coordinates>
    </AbstractFeatureObjectExtensionGroup>
...
}}}

XmlElement needed to be changed into XmlElementRef for all AbstractObjects

{{{
    @XmlElementRef(name = "AbstractFeatureObjectExtensionGroup")
    protected List<AbstractObject> featureObjectExtension;
}}}

produces the correct output:
{{{
<GroundOverlay id="ID">
    <gx:LatLonQuad>
        <coordinates>0.0,0.0</coordinates>
    </gx:LatLonQuad>
...
}}}

Original issue reported on code.google.com by bachmann...@gmail.com on 26 Aug 2009 at 8:04