Discussion:
[Geoserver-users] App schema mapping from gml:GenericMetaData to cit:CI_Citation
MG Sexton
2017-03-28 02:02:46 UTC
Permalink
Hi

Trying to get the mapping working in GeoSciML-Basic 4.1 to the
gml:metadataProperty field. Using the mapping files below, I get the error:

java.lang.RuntimeException: Error applying mapping with targetAttribute
cit:CI_Citation/cit:title/gco:CharacterStringError applying mapping with
targetAttribute
cit:CI_Citation/cit:title/gco:CharacterStringcit:CI_Citation is not a valid
location path for type http://www.opengis.net/gml/3.2:GenericMetaDataType.
cit:CI_Citation ns: http://standards.iso.org/iso/19115/-3/cit/1.0,
GenericMetaDataType properties: null#FEATURE_LINK

My mapping files are as follows:

gsmlb_GeologicUnit.xml

<FeatureTypeMapping>
<sourceDataStore>datastore</sourceDataStore>
<sourceType>MV_GSML_GEOLOGICUNIT</sourceType>
<targetElement>gsmlb:GeologicUnit</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>gsmlb:GeologicUnit</targetAttribute>
<idExpression>
<OCQL>GMLID</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>gml:metaDataProperty</targetAttribute>
<sourceExpression>
<OCQL>GMLID</OCQL>
<linkElement>gml:GenericMetaData</linkElement>
<linkField>FEATURE_LINK[3]</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
...
<attributeMappings>
<FeatureTypeMapping>

gml_GenericMetaData.xml

<FeatureTypeMapping>
<sourceDataStore>datastore</sourceDataStore>
<sourceType>MV_CI_CITATION</sourceType>
<targetElement>gml:GenericMetaData</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>gml:GenericMetaData</targetAttribute>
<idExpression>
<OCQL>REF_GMLID</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>FEATURE_LINK[3]</targetAttribute>
<sourceExpression>
<OCQL>STRAT_GMLID</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>

<targetAttribute>cit:CI_Citation/cit:title/gco:CharacterString</targetAttribute>

<targetAttributeNode>gml:AbstractMetaDataType</targetAttributeNode>
<sourceExpression>
<OCQL>TITLE</OCQL>
</sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>

The target types they map to are
http://schemas.opengis.net/gsml/4.1/geoSciMLBasic.xsd and
http://schemas.opengis.net/gml/3.2.1/gml.xsd respectively.

The GenericMetaDataType has no properties, so how do you map to it?

Kind regards

Michael
Ben Caradoc-Davies
2017-04-02 01:05:42 UTC
Permalink
Michael,

have you tried using targetAttributeNode to map gml:metaDataProperty to
some type with usable properties? (Or layers of nested
targetAttributeNode?) You should then be able to chain using this type.
I note that gml:metaDataProperty is deprecated.

- What is cit:CI_Citation and is it related to gmd:CI_Citation?

- Do you have a sample instance document that represents the output you
expect?

- Is this instance document schema-valid (considering substitution
groups and inheritance)?

Kind regards,
Ben.
Post by MG Sexton
Hi
Trying to get the mapping working in GeoSciML-Basic 4.1 to the
java.lang.RuntimeException: Error applying mapping with targetAttribute
cit:CI_Citation/cit:title/gco:CharacterStringError applying mapping with
targetAttribute
cit:CI_Citation/cit:title/gco:CharacterStringcit:CI_Citation is not a valid
location path for type http://www.opengis.net/gml/3.2:GenericMetaDataType.
cit:CI_Citation ns: http://standards.iso.org/iso/19115/-3/cit/1.0,
GenericMetaDataType properties: null#FEATURE_LINK
gsmlb_GeologicUnit.xml
<FeatureTypeMapping>
<sourceDataStore>datastore</sourceDataStore>
<sourceType>MV_GSML_GEOLOGICUNIT</sourceType>
<targetElement>gsmlb:GeologicUnit</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>gsmlb:GeologicUnit</targetAttribute>
<idExpression>
<OCQL>GMLID</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>gml:metaDataProperty</targetAttribute>
<sourceExpression>
<OCQL>GMLID</OCQL>
<linkElement>gml:GenericMetaData</linkElement>
<linkField>FEATURE_LINK[3]</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
...
<attributeMappings>
<FeatureTypeMapping>
gml_GenericMetaData.xml
<FeatureTypeMapping>
<sourceDataStore>datastore</sourceDataStore>
<sourceType>MV_CI_CITATION</sourceType>
<targetElement>gml:GenericMetaData</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>gml:GenericMetaData</targetAttribute>
<idExpression>
<OCQL>REF_GMLID</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>FEATURE_LINK[3]</targetAttribute>
<sourceExpression>
<OCQL>STRAT_GMLID</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>cit:CI_Citation/cit:title/gco:CharacterString</targetAttribute>
<targetAttributeNode>gml:AbstractMetaDataType</targetAttributeNode>
<sourceExpression>
<OCQL>TITLE</OCQL>
</sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
The target types they map to are
http://schemas.opengis.net/gsml/4.1/geoSciMLBasic.xsd and
http://schemas.opengis.net/gml/3.2.1/gml.xsd respectively.
The GenericMetaDataType has no properties, so how do you map to it?
Kind regards
Michael
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
comtesacristain
2017-05-04 03:25:20 UTC
Permalink
Hi Ben

I've passed this on to my colleague for whom I asked this question. I can't
answer the others at this moment, but I can answer the cit:CI_Citation
question.

cit:CI_Citation is part of version 3 of ISO 19115 - they've changed the
namespace

http://standards.iso.org/iso/19115/-3/cit/1.0

targetAttributeNode was something we tried but to no avail.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/App-schema-mapping-from-gml-GenericMetaData-to-cit-CI-Citation-tp5314541p5319331.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Loading...