Gabriel Roldán ha scritto:
> On Wednesday 05 September 2007 01:46:51 Justin Deoliveira wrote:
>> Hi Andrea,
>>
>> I am just now looking at the Feature part of your review. And here are
>> my comments.
>>
>> * Property exposing name and type from descriptor
>>
>> This is kind of tricky issue. I need to provide some context. Consider
>> for a moment two types of attributes:
>>
>> 1. An attribute that is part of another type
>> 2. An attribute that is at the top level
>>
>> In the first case Attribute.getDescriptor() != null, but in the second
>> case Attribute.getDescriptor() == null. The reason being that in the
>> second case the attribute is not part of another type... so there is
>> nothing to "descript". I know the javadocs do not state that at all...
>> they are horrible
> just a quick note on this one.
> The rationale for getDescriptor() being null for attributes that are at the 
> top level seems sensible, but in practice I've found the following issue:
> It previous experiments and even in the FM module, it was considered that 
> Feature instances returned from a DataStore are at the top level, and thus 
> they come without a descriptor. This is inconvenient when encoding that 
> feature to gml and the actual problem is generally masked by the fact that we 
> used to encode the FeatureType name as the Feature instance name, which might 
> be handy for direct single db table mapping. Anyhow, I found out that Feature 
> instances comming directly from a datastore need a descriptor, as per having 
> the name of the Feature at hand. It makes sense for that descriptor to have 
> 0..N multiplicity too.

This a (weak) reason to have Feature.getDescriptor(), but I don't see 
how this would extend to Attribute and Association. Why do we need a 
descriptor for them?

> As the new model is a better representation of the ogc abstract feature model 
> and is a better to map to gml too, there's no more need to do the tricks we 
> used to (say, when encoding gml, using the FeatureType name for the Feature 
> instance, and when encoding a DescribeFeatureType request, appending "_Type" 
> to the FeatureTypeName in the generated gml schema).
> Now we have both the actual FT name and the Feature name. Moreover, when a 
> GetFeature request is sent, the typeName parameter actually refers to the 
> Feature instance name. Say, typeName=River, not typeName=RiverType. So the 
> need for Feature instances to come out from the datastore with proper 
> AttributeDescriptor.

They both seem very minor inconveniences compared to the data/metadata 
mix I was referring to in my answer to Martin?

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to