[geotk] Feature identifier retrieved from WFS prepended a '@' ??

Martin Desruisseaux martin.desruisseaux at geomatys.com
Wed Mar 11 10:04:18 PDT 2015


Hello Emmanuel

Thanks for asking. I should have posted earlier what is going on.

We defined new Feature interfaces in GeoAPI [1][2], to be proposed to
OGC as GeoAPI 3.1 (date undetermined - OGC is starting a discussion
about what should be their policy about API). The new interfaces are
based on ISO 19109 and hopefully simpler. We are slowly starting
migration from the old to the new feature model.

One difference is that the old model was a little bit XML-oriented, and
distinguished between whether an information was a "XML attribute" or a
"XML value". The new model is more abstract and does not distinguish
such XML-specific details. We were thinking about applying a naming
convention but I'm not sure if this is done (Johann would know better).

An other issue is that we wanted to distinguish "real property" from
"generated property". The idea is to prefix "generated property" with
"@" to make them look like annotations. One goal was to avoid name
collision: maybe the feature has a real "fid" property which has nothing
to do with identifiers, so adding a "@" prefix for everything generated
would hopefully avoid collision (a little bit like the Java compiler
adding the "$" prefix in front of generated variable names).

The new ISO 19109 model has the concept of "operation", which we are
hopping to apply to the "@fid" attribute: if a real identifier already
exists in the feature, the "@fid" attribute would be an operation that
just delegate to the existing property. Otherwise the "@fid" attribute
would be an operation generating an identifier.

Do you think it would be okay?

    Martin


[1] http://jira.codehaus.org/browse/GEO-229
[2]
http://www.geoapi.org/snapshot/javadoc/org/opengis/feature/package-summary.html


Le 11/03/15 16:40, Emmanuel Blondel a écrit :
> I'm also wondering if it is correct to add this 'fid' as part of the
> featureType by default, as it is not explicitely part of the WFS
> DescribeFeatureType response (except maybe if we consider super
> properties?)
>
> Le 11/03/2015 16:10, Emmanuel Blondel a écrit :
>> Hello,
>>
>> I'm using JAXPStreamFeatureReader and JAXBFeatureTypeReader to read
>> WFS data.
>> Until now everything worked well (WFS 1.0.0 / 1.1.0), now testing i
>> see i get the "fid" taken from the xml attribute of the same name.
>> Strangely the featureType retrieved prepends "fid" with "@" -> "@fid"
>> (i believe related code is
>> https://github.com/Geomatys/geotoolkit/blob/master/modules/jaxp-xml-parser/geotk-jaxp-gml/src/main/java/org/geotoolkit/feature/xml/jaxb/JAXBFeatureTypeReader.java#L748).
>> I'm just wondering if it's correct behavior.
>> It's good to have access to the feature identifier, but shouldn't we
>> rather expect to have the exact attribute name? (with no '@'). What
>> do you think? or is there a particular reason that requires this naming?
>>
>> Thanks in advance
>>
>> Bests,
>> Emmanuel



More information about the Geotoolkit mailing list