Rini Angreani created GEOT-4035:
-----------------------------------

             Summary: GMLSchema 3.2 has wrong definition for ValuePropertyType
                 Key: GEOT-4035
                 URL: https://jira.codehaus.org/browse/GEOT-4035
             Project: GeoTools
          Issue Type: Bug
          Components: xsd-gml
    Affects Versions: 8.0-M4
            Reporter: Rini Angreani


Schema definition:
{code}
        <complexType name="ValuePropertyType">
                <sequence minOccurs="0">
                        <group ref="gml:Value"/>
                </sequence>
                <attributeGroup ref="gml:AssociationAttributeGroup"/>
                <attributeGroup ref="gml:OwnershipAttributeGroup"/>
        </complexType>
{code}

gml:Value can have types such as gml:QuantityList, gml:BooleanList etc.

In GMLSchema 3.1 implementation, it's generated correctly with all the 
sub-types listed in the descriptors:
{code}
...
schema.add(
            new AttributeDescriptorImpl(
                XSSchema.BOOLEAN_TYPE, new 
NameImpl("http://www.opengis.net/gml","Boolean";), 1, 1, false, null
            )
        );
        schema.add(
            new AttributeDescriptorImpl(
                CODETYPE_TYPE, new 
NameImpl("http://www.opengis.net/gml","Category";), 1, 1, false, null
            )
        );
        schema.add(
            new AttributeDescriptorImpl(
                MEASURETYPE_TYPE, new 
NameImpl("http://www.opengis.net/gml","Quantity";), 1, 1, false, null
            )
        );
        schema.add(
            new AttributeDescriptorImpl(
                XSSchema.INTEGER_TYPE, new 
NameImpl("http://www.opengis.net/gml","Count";), 1, 1, false, null
            )
        );
        schema.add(
            new AttributeDescriptorImpl(
                BOOLEANORNULLLIST_TYPE, new 
NameImpl("http://www.opengis.net/gml","BooleanList";), 1, 1, false, null
            )
        );
...
{code}

In GMLSchema 3.2, it only lists the abstract types. It encodes correctly, but 
app-schema can't find the descriptors, so the features cannot be built 
properly. 
{code}
...
descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYTYPE_TYPE,
                        new 
NameImpl("http://www.opengis.net/gml/3.2","AbstractValue";),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        ABSTRACTGEOMETRYTYPE_TYPE,
                        new 
NameImpl("http://www.opengis.net/gml/3.2","AbstractGeometry";),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        ABSTRACTTIMEOBJECTTYPE_TYPE,
                        new 
NameImpl("http://www.opengis.net/gml/3.2","AbstractTimeObject";),
                        1, 1, false, null));
...
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to