On 15/03/18 04:57, M.A. Borkowski wrote:
java.lang.RuntimeException: java.lang.RuntimeException: Error applying
mapping w ith targetAttribute
mu:country/gmd:Country
[...]
Caused by: java.lang.ClassCastException:
org.geotools.feature.type.AttributeType
Impl cannot be cast to
org.opengis.feature.type.ComplexType
[...]> Transformed data in HALE looks like this:
[...]
<mu:country>
<gmd:Country codeList="https://www.iso.org/obp/ui/#search/code/"
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL
">NL</gmd:Country>
</mu:country>
gmd:Country is a gco:CodeListValue_Type, which is a complex type with
simple content (like gml:CodeType, of which gml:name is an instance).
Unfortunately, mu:country is a gmd:CountryPropertyType, which appears to
violate the GML object/property encoding rule (section 7.1 of OGC
07-036, the GML 3.2.1 standard). I do not think you can have a property
type enclosing a type with a simple content model. If gmd:Country had a
complex information model, it would not be permitted to have bare simple
content like "NL" above. If mu:country was defined by ref gmd:Country
(not gmd:CountryPropertyType), you could encode it as a
gco:CodeListValue_Type like this with a targetAttribute of mu:country
and two ClientProperty elements:
<mu:country
codeList="https://www.iso.org/obp/ui/#search/code/"
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL>NL</mu:country>
But it is not.
I think gmd:CountryPropertyType is broken because it violates the GML
3.2.1 encoding standard. This is a bug in the GMD schema, uncovered by
the MU schema.
Here are the schemas involved:
http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd
http://schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd
http://schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd
Kind regards,
--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand
------------------------------------------------------------------------------
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
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users