Hi Ben,
Thanks for the response. As you can probably gather, I'm a bit new at this.
OK, so I've changed the namespace in the XSDs and referred to them in the
mapping files and created an extra workspace for the GML 3.2 requirements.
The files load into Geoserver OK.
However, when I try and create GML 3.2 via a WFS query, I get the following:
<wfs:member>
<aasg1:Facility id="facility.1">
<aasg1:FacilityName>Edinburgh Castle</aasg1:FacilityName>
<aasg1:FacilityOperatingStatus>Open</aasg1:FacilityOperatingStatus>
<aasg1:VerticalConstructionMaterial>Stone</aasg1:VerticalConstructionMaterial>
<aasg1:TerrainConstructionMaterial>Stone</aasg1:TerrainConstructionMaterial>
<aasg1:StatisticalGeographicArea>Text</aasg1:StatisticalGeographicArea>
<aasg1:GeopoliticalEntity>text2</aasg1:GeopoliticalEntity>
<aasg1:FacilityID>1</aasg1:FacilityID>
<aasg1:AdministrativeDivision>1</aasg1:AdministrativeDivision>
<aasg1:longitude>3.1987</aasg1:longitude>
<aasg1:latitude>55.9486</aasg1:latitude>
<aasg1:AdministrativeAreas/>
<aasg1:Shape/>
</aasg1:Facility>
</wfs:member>
<wfs:member>
As you can see the aasg1:Shape is not populated and neither is the
AdministrativeAreas (this is the complex field if you like that is of type
AdministrativeAreas and references another mapping file.
The mapping file fragments are as follows:
To create Administrative areas:
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>tcStore</sourceDataStore>
<sourceType>administrativeareas</sourceType>
<targetElement>aasg2:AdministrativeAreas</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>aasg2:IDR</targetAttribute>
<sourceExpression>
<OCQL>id</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg2:NameOfArea</targetAttribute>
<sourceExpression>
<OCQL>nameofarea</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg2:lat</targetAttribute>
<sourceExpression>
<OCQL>lat</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg2:long</targetAttribute>
<sourceExpression>
<OCQL>long</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg2:Shape</targetAttribute>
<idExpression>
<OCQL>id</OCQL>
</idExpression>
<sourceExpression>
<OCQL>shape</OCQL>
</sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
To create Facility:
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>SeismicEventStore</sourceDataStore>
<sourceType>facility</sourceType>
<targetElement>aasg1:Facility</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>aasg1:Shape</targetAttribute>
<idExpression>
<OCQL>facilityid</OCQL>
</idExpression>
<sourceExpression>
<OCQL>facilitylocation</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:FacilityName</targetAttribute>
<sourceExpression>
<OCQL>facilityname</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:FacilityOperatingStatus</targetAttribute>
<sourceExpression>
<OCQL>facilityoperatingstatus</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:VerticalConstructionMaterial</targetAttribute>
<sourceExpression>
<OCQL>verticalconstructionmaterial</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:TerrainConstructionMaterial</targetAttribute>
<sourceExpression>
<OCQL>terrainconstructionmaterial</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:StatisticalGeographicArea</targetAttribute>
<sourceExpression>
<OCQL>statisticalgeographicarea</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:GeopoliticalEntity</targetAttribute>
<sourceExpression>
<OCQL>geopoliticalentity</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:FacilityID</targetAttribute>
<sourceExpression>
<OCQL>facilityid</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:AdministrativeDivision</targetAttribute>
<sourceExpression>
<OCQL>administrativedivision</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:longitude</targetAttribute>
<sourceExpression>
<OCQL>longitude</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:AdministrativeAreas</targetAttribute>
<sourceExpression>
<OCQL>administrativedivision</OCQL>
<linkElement>aasg3:AdministrativeAreas</linkElement>
<linkField>aasg3:IDR</linkField>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aasg1:latitude</targetAttribute>
<sourceExpression>
<OCQL>latitude</OCQL>
</sourceExpression>
</AttributeMapping>
</attributeMappings>
</typeMappings>
I'm not sure what else to check. Any help is gratefully appreciated!
Sam
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Complex-GML-3-1-1-from-App-Schema-tp5309269p5309530.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users