Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of AbstractGML #1643

Open
lgoltz opened this issue Feb 7, 2024 · 0 comments
Open

Handling of AbstractGML #1643

lgoltz opened this issue Feb 7, 2024 · 0 comments
Labels
needs discussion question tools deegree command line tools (CLI) WFS deegree Web Feature Service

Comments

@lgoltz
Copy link
Contributor

lgoltz commented Feb 7, 2024

Executing the GmlTool to create the SQLFeatureStore configuration for MineralResourcesCore.xsd with reference data fails with

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.parseJobParameter' defined in org.deegree.tools.featurestoresql.config.SqlFeatureStoreConfigCreatorConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.deegree.tools.featurestoresql.config.LoadParameter]: Factory method 'parseJobParameter' threw exception; nested exception is class org.deegree.commons.xml.XMLParsingException: Error in XML document (file 'file:/xxx/refrenceData.gml', line: 27, column: 9, character offset: 3694): Feature type "{http://inspire.ec.europa.eu/schemas/base2/2.0}DocumentCitation" is unknown.

The relevant part of the referenceData.gml:

 <gml:featureMember>
    <mr-core:MineralOccurrence gml:id="MineralOccurence_1">
    ...
     <mr-core:sourceReference>
        <base2:DocumentCitation gml:id="DocumentCitation_1">
          <gml:identifier codeSpace="https://inspire.ec.europa.eu/ids">https://registry.gdi-de.org/id/test/DocumentCitation_1</gml:identifier>

deegree evaluates the annotation of the property declaration of sourceReference as reference to base2:DocumentCitation:

<element maxOccurs="unbounded" name="sourceReference" nillable="true">
  <annotation>
    <documentation>-- Definition -- The source or reference for the Earth Resource.</documentation>
    <appinfo>
      <targetElement xmlns="http://www.opengis.net/gml/3.2">base2:DocumentCitation</targetElement>
    </appinfo>
  </annotation>
  ...

base2:DocumentCitation is substituted from AbstractGML (https://inspire.ec.europa.eu/schemas/base2/2.0/BaseTypes2.xsd):

  <element name="DocumentCitation" substitutionGroup="gml:AbstractGML" type="base2:DocumentCitationType">
    <annotation>
      <documentation>-- Name --
document citation

-- Definition --
Citation for the purposes of unambiguously referencing a document.</documentation>
    </annotation>
  </element>
  <complexType name="DocumentCitationType">
    <complexContent>
      <extension base="gml:AbstractGMLType">
 ...

deegree recognized only substituions of "AbstractFeature" as feature types, hence DocumentCitation is not detected as feature type and parsing of the reference data fails.

There may be more examples of AbstractGML "feature types" in INSPIRE application schema.

@lgoltz lgoltz added question needs discussion WFS deegree Web Feature Service tools deegree command line tools (CLI) labels Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion question tools deegree command line tools (CLI) WFS deegree Web Feature Service
Projects
None yet
Development

No branches or pull requests

1 participant