Skip to content

Commit

Permalink
feat: use codelists instead of enumerations
Browse files Browse the repository at this point in the history
According to [this schema release](https://github.com/INSPIRE-MIF/application-schemas/releases/tag/2024.1),
the enumerations used in the INSPIRE schemas are replaced by codelists.
The alignments using enumerations so far are adapted accordingly including
import of the codelists into the alignment, assigning them to the respective
elements and assigning the matching value.

SVC-1946
  • Loading branch information
JohannaOtt committed Oct 15, 2024
1 parent 7e5cd7c commit 7b849ab
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 6 deletions.
6 changes: 6 additions & 0 deletions annex-1/mappings/RailroadTransportNetwork/aaa-tn-ra-01.halex
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ Im Alignment wird ein *TransportProperty*-Objekt erstellt zusammenfassend für a
<setting name="source">http://inspire.ec.europa.eu/codelist/FormOfRailwayNodeValue</setting>
<setting name="contentType">eu.esdihumboldt.hale.io.codelist.inspire</setting>
</resource>
<resource action-id="eu.esdihumboldt.hale.codelist.read" provider-id="eu.esdihumboldt.hale.io.codelist.inspire.reader">
<setting name="charset">UTF-8</setting>
<setting name="resourceId">0f029f28-a226-4f19-8c2f-65a17b69321c</setting>
<setting name="source">http://inspire.ec.europa.eu/codelist/TransportTypeValue</setting>
<setting name="contentType">eu.esdihumboldt.hale.io.codelist.inspire</setting>
</resource>
<export-config name="hale-connect">
<configuration action-id="eu.esdihumboldt.hale.io.instance.write.transformed" provider-id="eu.esdihumboldt.hale.io.gml.writer">
<setting name="charset">UTF-8</setting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ collect.nominalTrackGauge.consume { key, values -&gt;
uom( 'mm' )
}
}
nominalGaugeCategory( key )
nominalGaugeCategory{
href( 'http://inspire.ec.europa.eu/codelist/TrackGaugeCategoryValue/' + key )
}
id( _id )
inspireId {
Identifier {
Expand Down Expand Up @@ -1793,7 +1795,7 @@ Es werden Referenzen (NetworkReference) zu allen Netzwerk-Elementen (z.B. `Rail
<child name="href" ns="http://www.w3.org/1999/xlink"/>
</property>
</target>
<parameter value="rail" name="value"/>
<parameter value="http://inspire.ec.europa.eu/codelist/TransportTypeValue/rail" name="value"/>
</cell>
<modifier cell="C48d3be90-5843-4323-bd79-ba1928b2429e">
<disable-for parent="Ca500e629-76b0-4cda-b53f-c9db0c272403"/>
Expand Down
13 changes: 13 additions & 0 deletions annex-1/mappings/RoadTransportNetwork/aaa-tn-ro-01.halex
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ Im Projekt gibt es drei verschiedene Herangehensweisen zur Bildung von *Transpor
<setting name="source">http://inspire.ec.europa.eu/codelist/ServiceFacilityValue</setting>
<setting name="contentType">eu.esdihumboldt.hale.io.codelist.inspire</setting>
</resource>
<resource action-id="eu.esdihumboldt.hale.codelist.read" provider-id="eu.esdihumboldt.hale.io.codelist.inspire.reader">
<setting name="charset">UTF-8</setting>
<setting name="resourceId">75908d5d-d4f3-4efc-a6b6-089d47524efe</setting>
<setting name="source">http://inspire.ec.europa.eu/codelist/TransportTypeValue</setting>
<setting name="contentType">eu.esdihumboldt.hale.io.codelist.inspire</setting>
</resource>
<export-config name="hale-connect">
<configuration action-id="eu.esdihumboldt.hale.io.instance.write.transformed" provider-id="eu.esdihumboldt.hale.io.gml.writer">
<setting name="charset">UTF-8</setting>
Expand All @@ -79,6 +85,13 @@ Im Projekt gibt es drei verschiedene Herangehensweisen zur Bildung von *Transpor
<file name="styles.sld" location="aaa-tn-ro-01.halex.styles.sld"/>
<complex-property name="codelists">
<associations>
<codeList identifier="//inspire.ec.europa.eu/codelist/TransportTypeValue" namespace="http://inspire.ec.europa.eu/codelist/TransportTypeValue">
<entity>
<type name="TransportNetworkType" namespace="http://inspire.ec.europa.eu/schemas/tn/5.0"/>
<property name="typeOfTransport" namespace="http://inspire.ec.europa.eu/schemas/tn/5.0"/>
<property name="href" namespace="http://www.w3.org/1999/xlink"/>
</entity>
</codeList>
<codeList identifier="//inspire.ec.europa.eu/codelist/ServiceFacilityValue" namespace="http://inspire.ec.europa.eu/codelist/ServiceFacilityValue">
<entity>
<type name="RoadServiceTypeType" namespace="http://inspire.ec.europa.eu/schemas/tn-ro/5.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ collect.functionalClass.consume { key, values -&gt;
def _ns = _project.vars.INSPIRE_NAMESPACE

_target {
functionalClass( key )
functionalClass {
href( 'http://inspire.ec.europa.eu/codelist/FunctionalRoadClassValue/' + key )
}
id( _id )
inspireId {
Identifier {
Expand Down Expand Up @@ -4604,7 +4606,7 @@ collect.trafficFlowDirection.consume { key, values -&gt;&#13;
<child name="href" ns="http://www.w3.org/1999/xlink"/>
</property>
</target>
<parameter value="road" name="value"/>
<parameter value="http://inspire.ec.europa.eu/codelist/TransportTypeValue/road" name="value"/>
</cell>
<modifier cell="C010d8324-6422-49f2-883a-7ee5d875177b">
<disable-for parent="C2581bae5-bd09-416c-948e-bcb8b5835ca3"/>
Expand Down
6 changes: 6 additions & 0 deletions annex-1/mappings/WaterTransportNetwork/aaa-tn-w-01.halex
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Ein *TransportProperty*-Objekt wird erstellt für alle Features die über die gl
<setting name="source">https://inspire.ec.europa.eu/schemas/tn-w/5.0/WaterTransportNetwork.xsd</setting>
<setting name="contentType">eu.esdihumboldt.hale.io.xsd</setting>
</resource>
<resource action-id="eu.esdihumboldt.hale.codelist.read" provider-id="eu.esdihumboldt.hale.io.codelist.inspire.reader">
<setting name="charset">UTF-8</setting>
<setting name="resourceId">c2e10a31-6368-4ff2-812a-aa247dd18c8d</setting>
<setting name="source">http://inspire.ec.europa.eu/codelist/TransportTypeValue</setting>
<setting name="contentType">eu.esdihumboldt.hale.io.codelist.inspire</setting>
</resource>
<export-config name="hale-connect">
<configuration action-id="eu.esdihumboldt.hale.io.instance.write.transformed" provider-id="eu.esdihumboldt.hale.io.gml.writer">
<setting name="charset">UTF-8</setting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ Für alle anderen `bauwerksfunktion`en, Referenzen auf andere Objekte oder auch
<child name="href" ns="http://www.w3.org/1999/xlink"/>
</property>
</target>
<parameter value="water" name="value"/>
<parameter value="http://inspire.ec.europa.eu/codelist/TransportTypeValue/water" name="value"/>
</cell>
<cell relation="eu.esdihumboldt.cst.functions.groovy.join" id="Cc3026039-7b92-4b52-aaa5-cc40b3749b65" priority="high">
<source name="types">
Expand Down
4 changes: 3 additions & 1 deletion annex-1/mappings/base-tn.halex.alignment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ collect.verticalPosition.consume { key, values -&gt;
def _ns = _project.vars.INSPIRE_NAMESPACE

_target {
verticalPosition( key )
verticalPosition {
href( 'http://inspire.ec.europa.eu/codelist/VerticalPositionValue/' + key )
}
id( _id )
inspireId {
Identifier {
Expand Down

0 comments on commit 7b849ab

Please sign in to comment.