On 19/11/12 19:44, Julián González wrote:
 > Is it possible to add the referenced AdministrativeUnitName,
 > PostalDescriptor and ThoroughfareName at the end of the xml response?

No. The included features are specified by the Web Feature Service 
standard: only those features matching a filter query are encoded, and 
nested properties are encoded inside those features or by reference. 
While it is possible to include additional types at the top level, they 
will not be related to features of another type.

Client applications should be able to use the xlink:href obtained from a 
response to make a second query to resolve a nested feature.

 > I've read that it's impossible to ask for a feature referenced by an
 > xlink:href, then we can't ask the service for the addresses of a certain
 > thoroughfarename, can we? I suposse that the only way is to change the
 > type of the component property to a gml:AbstractFeature, isn't it?

I am not quite sure what you are asking. Are you talking about a filter 
query on xlink:href? This is possible where it is created using feature 
chaining and you are querying a nested property (users like this but I 
am not sure that it is valid use of WFS!). I am not sure this is what 
you mean. Do you have an example?

Kind regards,
Ben.


On 19/11/12 19:44, Julián González wrote:
> Hi list.
>
> I'm trying to map a custom address model to the address model of INSPIRE
> using de app-schema plugin (version 2.2.1).
> There is a relationship between two featuretypes, Address and
> AddressComponent (an abstract feature), called component in the first
> featuretype.
>
> There are some subtypes of AddressComponent: AdministrativeUnitName,
> PostalDescriptor, ThoroughfareName,...
> In the xsd, the component property of the Address featuretype is defined
> like this:
>
> <element maxOccurs="unbounded" name="component">
> <annotation>
> <documentation>
>           -- Definition -- Represents that the address component is
> engaged as a part of the address. -- Description -- EXAMPLE For the
> address designated "Calle Mayor 13, Cortijo del Marqués, 41037, Écija,
> Sevilla, España" the six address components "Calle Mayor", "Cortijo del
> Marqués", "41037", "Écija", "Sevilla" and "España" are engaged as
> address components.
> </documentation>
> <appinfo>
> <targetElement
> xmlns="http://www.opengis.net/gml/3.2";>ad:AddressComponent</targetElement>
> </appinfo>
> </annotation>
> <complexType>
> <complexContent>
> <extension base="gml:AbstractMemberType">
> <sequence/>
> <attributeGroup ref="gml:AssociationAttributeGroup"/>
> </extension>
> </complexContent>
> </complexType>
> </element>
>
> Then I've understood that:
>
> - An address must have one or more components.
> - The xml element of the component property has no content but it has an
> xlink:href attribute pointing to an AdministrativeunitName or a
> PostalDescriptor or a Thorougfarename
>
> The Attribue mapping of the component property for a ThoroughfareName is:
>
> <AttributeMapping>
> <targetAttribute>ad:component</targetAttribute>
> <targetAttributeNode>ad:ThoroughfareNameType</targetAttributeNode>
> <sourceExpression>
> <OCQL>XLINK2COMPONENT</OCQL>
> <linkElement>ad:ThoroughfareName</linkElement>
> <linkField>ad:inspireId/base:Identifier/base:localId</linkField>
> </sourceExpression>
> <isMultiple>true</isMultiple>
> <ClientProperty>
> <name>xlink:href</name>
> <value>strConcat('http://localhost:8080/geoserver/wfs?request=GetFeature&amp;version=2.0.0&amp;typeName=ad:ThoroughfareName&amp;FEATUREID=
> <http://localhost:8080/geoserver/wfs?request=GetFeature&amp;version=2.0.0&amp;typeName=ad:ThoroughfareName&amp;FEATUREID=>',
> GMLID)</value>
> </ClientProperty>
> </AttributeMapping>
>
> In this way, an Address served by the wfs service is:
>
> <ad:Address gml:id="AD_PPK_000000000001">
>     ... a lot of xml elements ...
> <ad:component
> href="http://localhost:8080/geoserver/wfs?request=GetFeature&version=2.0.0&typeName=ad:ThoroughfareName&FEATUREID=TH_VIA_000000000001
> <http://localhost:8080/geoserver/wfs?request=GetFeature&version=2.0.0&typeName=ad:ThoroughfareName&FEATUREID=TH_VIA_000000000001>"/>
> <ad:component
> href="http://localhost:8080/geoserver/wfs?request=GetFeature&version=2.0.0&typeName=ad:AdminUnitName&FEATUREID=AUN_MUN_000000040194
> <http://localhost:8080/geoserver/wfs?request=GetFeature&version=2.0.0&typeName=ad:AdminUnitName&FEATUREID=AUN_MUN_000000040194>"/>
> <ad:component
> href="http://localhost:8080/geoserver/wfs?request=GetFeature&version=2.0.0&typeName=ad:PostalDescriptor&FEATUREID=PD_CP_000000000001
> <http://localhost:8080/geoserver/wfs?request=GetFeature&version=2.0.0&typeName=ad:PostalDescriptor&FEATUREID=PD_CP_000000000001>"/>
> </ad:Address>
>
> My questions are:
>
> Is it possible to add the referenced AdministrativeUnitName,
> PostalDescriptor and ThoroughfareName at the end of the xml response?
>
> I've read that it's impossible to ask for a feature referenced by an
> xlink:href, then we can't ask the service for the addresses of a certain
> thoroughfarename, can we? I suposse that the only way is to change the
> type of the component property to a gml:AbstractFeature, isn't it?
>
> Regards and thanks in advance.

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to