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=',
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
"/>
   <ad:component href="
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
"/>
</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.
------------------------------------------------------------------------------
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to