I am not capable of testing your solution. I get some errors related to
xpath, mapped properties...
I attach again the zip file with the whole example (feature mapping file,
Schema,..) and here is the table creation script:

*PROVIDER*

CREATE TABLE currentds.oip_provider
(
  id bigint NOT NULL DEFAULT
nextval(('OIP_PROVIDER_ID_S'::text)::regclass), -- Unique system Identifier
  "name" character varying(50) NOT NULL, -- Name or description of the
available vaules of this master table
  provider_status_id bigint,
  provider_status_desc character varying(100),
  is_active boolean NOT NULL DEFAULT true, -- Indicates if the provider is
in state "logical deletion" (deactivate) or not
  update_timestamp timestamp without time zone,
  CONSTRAINT oip_provider_pk PRIMARY KEY (id),
  CONSTRAINT fk_provider_provider_status_n1 FOREIGN KEY (provider_status_id)
      REFERENCES currentds.oip_provider_status (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);


*TRANSIT STOP*

CREATE TABLE currentds.oip_transit_stop
(
  id bigint NOT NULL DEFAULT
nextval(('OIP_TRANSIT_STOP_ID_S'::text)::regclass),
  code character varying(50) NOT NULL, -- OIP entity alphanumeric code or
unique alphanumeric identifier given by the data provider
  "name" character varying(50) NOT NULL, -- Descriptive name for the
transit stop (bus stop, train stop,...).
  long_name character varying(100) NOT NULL,
  description character varying(255),
  url character varying(100),
  provider_id bigint,
  update_timestamp timestamp without time zone NOT NULL,
  optimistic_lock bigint NOT NULL DEFAULT 0,
  "location" geometry, -- Geolocation reference of the bus, train... stop
location as a point defined with two coordinates in microdegrees (latitude
from –90,000,000 to +90,000,000 and longitude from –180,000,000 to
+180,000,000)
  CONSTRAINT oip_transit_stop_pk PRIMARY KEY (id),
  CONSTRAINT fk_transit_stop_provider_n1 FOREIGN KEY (provider_id)
      REFERENCES currentds.oip_provider (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT enforce_dims_location CHECK (st_ndims(location) = 2),
  CONSTRAINT enforce_srid_location CHECK (st_srid(location) = 4326)
)WITH (
  OIDS=FALSE
);

I don't want to disturb you, so if you don't have time to have a look,
don't worry. I will go on trying to find the correct mapping between
tables, feature mapping and the xsd schema. The underlying problem is that
I don't understand the way fields are mapped.

Thanks a lot for your help.

2012/10/25 VT@CSIRO [via OSGeo.org] <ml-node+s1560n5011105...@n6.nabble.com>

> Hi Igor,
>
> Thanks for sending that through. Firstly for cocities:providername your
> mapping should have user providername instead of just name
>
> <targetAttribute>cocities:provider/cocities: providername
> </targetAttribute>
>
> Instead of
>
> <targetAttribute>cocities:provider/cocities:name</targetAttribute>
>
>
> Secondly,
>
> Your feature chaining for cocities:TransitStop  should be something like.
> Without access to your schema file I am unable to test run it but looking
> through your mapping this is something I picked up. Let me know the outcome
>
>
>
>                                 <AttributeMapping>
>                                         <targetAttribute>
>                                                 cocities:provider
>                                         </targetAttribute>
>                                         <sourceExpression>
>                                                 <OCQL>provider_id</OCQL>
> (link this table(oip_transit_stop) providerid)
>                                                 <linkElement>
> cocities:provider </linkElement> (link to this feature)
>
> <linkField>FEATURE_LINK</linkField> (using what has been defined by
> feature_link)
>                                         </sourceExpression>
>                                 </AttributeMapping>
>
>
> And on your chained feature,
>
>                                 <AttributeMapping>
>                                         <targetAttribute>
>                                           FEATURE_LINK[1](myproviderid
> will be used as FEATURE_LINK[1])
>                                         </targetAttribute>
>                                         <sourceExpression>
>
> <OCQL>myproviderid</OCQL>(myproviderid in cocitiesds)
>                                         </sourceExpression>
>                                 </AttributeMapping>
>                                 <AttributeMapping>
>
> <targetAttribute>cocities:provider/cocities:providerid</targetAttribute>
>                                         <sourceExpression>
>                                                 <OCQL>provider_id</OCQL>
>
> <linkElement>cocities:providername</linkElement>
>
> <linkField>providerid</linkField>
>                                         </sourceExpression>
>                                 </AttributeMapping>
>                                 <AttributeMapping>
>
> <targetAttribute>cocities:provider/cocities:name</targetAttribute>
>                                         <sourceExpression>
>
> <linkElement>cocities:providerid</linkElement>
>
> <linkField>name</linkField>
>                                         </sourceExpression>
>                                 </AttributeMapping>
>
>
> Victor Tey
> Software Engineer
> ASRDC
> CSIRO Earth Science and Resource Engineering
> Phone: +61 8 6436 8944
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5011105&i=0> |
> www.csiro.au |
> Address: Australian Resources Research Centre, 26 Dick Perry Avenue,
> Kensington WA 6151
> PLEASE NOTE
> The information contained in this email may be confidential or privileged.
> Any unauthorised use or disclosure is prohibited. If you have received this
> email in error, please delete it immediately and notify the sender by
> return email. Thank you. To the extent permitted by law, CSIRO does not
> represent, warrant and/or guarantee that the integrity of this
> communication has been maintained or that the communication is free of
> errors, virus, interception or interference.
> Please consider the environment before printing this email.
>
>
> -----Original Message-----
> From: igor.erdoiza [mailto:[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5011105&i=1>]
>
> Sent: Thursday, 25 October 2012 2:39 PM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=5011105&i=2>
> Subject: Re: [Geoserver-users] GEOServer: app-schema & Feature Chaining
>
> Good Morning Victor:
> I'm working on the Geoserver 2.2 version
>
> I have attached the complete folder  cocities.zip
> <http://osgeo-org.1560.n6.nabble.com/file/n5011072/cocities.zip>   in a
> zip
> file that contains, among other stuff, a mapping file with two
> FeatureMapping ,where each FeatureMapping points to a database table and a
> xsd that defines the desired output.
>
> Thank you very much for your help. I owe you many coffees :-)
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/GEOServer-app-schema-Feature-Chaining-tp5010210p5011072.html
>
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
>
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics Download AppDynamics Lite for
> free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> _______________________________________________
> Geoserver-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5011105&i=3>
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> ------------------------------------------------------------------------------
>
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> _______________________________________________
> Geoserver-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5011105&i=4>
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.n6.nabble.com/GEOServer-app-schema-Feature-Chaining-tp5010210p5011105.html
>  To unsubscribe from GEOServer: app-schema & Feature Chaining, click 
> here<http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5010210&code=aWdvci5lcmRvaXphQGdtYWlsLmNvbXw1MDEwMjEwfDE4ODM4MDM4MDg=>
> .
> NAML<http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


cocities.zip (15K) 
<http://osgeo-org.1560.n6.nabble.com/attachment/5011134/0/cocities.zip>




--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/GEOServer-app-schema-Feature-Chaining-tp5010210p5011134.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to