On 05/09/2009, at 12:43 AM, Justin Deoliveira wrote:
My question is how should gml:MeasureType be represented as a
ComplexType (not ComplexAttribute) for the purposes of building up the
GMLSchema with a true geotools feature model representation. I guess
for
purposes of moving forward i will just make them normal properties, as
elements are... and the encoder should be able to figure out that the
property is actually an attribute no?
Yep.
I tried out outline how MeasureType works in my reply to Ben.
Let me try and do it in code ...
FeatureTypeFactory factory =
CommonFactoryFinder.getFeatureTypeFactory(null);
AttributeTypeBuilder b = new AttributeTypeBuilder(factory);
AttributeType ANY_URI = b.name("anyURI").binding
(URI.class).buildType();
AttributeType DOUBLE = b.name("Double").binding
(Double.class).buildType();
AttributeDescriptor uom = b.buildDescriptor("uom", ANY_URI );
AttributeDescriptor value = b.inline(true).buildDescriptor
("value", DOUBLE );
Set<PropertyDescriptor> properties = new
HashSet<PropertyDescriptor>();
properties.add( value );
properties.add( uom );
ComplexType MEASURE_TYPE = factory.createComplexType( new
NameImpl("MeasureType"),
properties, true, false, Collections.EMPTY_LIST,
null, null );
So what is missing here is the "inline" method on the attribute
builder; and a builder for complex types. It looks like isInline is
only defined for ComplexType and to meet this use case we would need
to move it to AttributeType.
Regards,
Jody
Kind regards,
Ben.
Rob Atkinson wrote:
The constructor takes a Collection<Properties> which is hard coded
to
Collections.EMPTY_LIST.
In the patch I attached was an experimental modification to
GMLSchema
: I've updated this and attached it separately so it uses Attribute
not Property, now Jody has made the PropertyImpl abstract.
Ther MeasureTypeBindingTest still fails however, so I'm not sure
what
I'm missing. One reason I was trying to generate GMLSchema with
attributes was to look for clues as to excalty how to represent an
attribute so the encoder finds it.
Rob
On Fri, Sep 4, 2009 at 12:30 PM, Justin
Deoliveira<[email protected]> wrote:
Hi all,
I am working on regenerating the GMLSchema class complete with
attributes and i am not 100% sure how attributes are represented
in our
feature model with regard to appschema. I understand that they are
somewhat hacked in for encoding purposes into client properties.
But how
should i represent them in the types in GMLSchema? Ben and folks
can
hopefully provide some guidance.
-Justin
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports
2008
30-Day
trial. Simplify your report design, integration and deployment -
and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day trial. Simplify your report design, integration and
deployment
- and focus on what you do best, core application coding. Discover
what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel