MG Sexton
2017-03-28 02:02:46 UTC
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
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