Skip to content

Commit aeff146

Browse files
committed
Synchronize DatedServiceJourney with CEN version
1 parent 75d6569 commit aeff146

File tree

3 files changed

+49
-30
lines changed

3 files changed

+49
-30
lines changed

bindings.xjb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
<!-- See the script bin/version_updater.sh It updates version in schema locations-->
1616

17-
| <jxb:bindings schemaLocation="./src/main/resources/xsd/1.15/NeTEx_publication.xsd">
17+
| <jxb:bindings schemaLocation="./src/main/resources/xsd/1.16/NeTEx_publication.xsd">
1818
<jxb:schemaBindings>
1919
<jxb:package name="org.rutebanken.netex.model" />
2020
</jxb:schemaBindings>
2121
</jxb:bindings>
2222

2323
<jxb:bindings
24-
schemaLocation="./src/main/resources/xsd/1.15/netex_framework/netex_genericFramework/netex_organisation_version.xsd">
24+
schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_genericFramework/netex_organisation_version.xsd">
2525
<jxb:bindings node="//xsd:element[@name = 'Status']">
2626
<jxb:property name="StatusOrganisationGroup" />
2727
</jxb:bindings>
@@ -30,35 +30,35 @@
3030
</jxb:bindings>
3131
</jxb:bindings>
3232
<jxb:bindings
33-
schemaLocation="./src/main/resources/xsd/1.15/netex_part_3/part3_fares/netex_salesOfferPackage_version.xsd">
33+
schemaLocation="./src/main/resources/xsd/1.16/netex_part_3/part3_fares/netex_salesOfferPackage_version.xsd">
3434
<jxb:bindings node="//xsd:element[@ref = 'ResponsibilitySetRef']">
3535
<jxb:property name="ResponsibilitySetRefDistributionByGroup" />
3636
</jxb:bindings>
3737
</jxb:bindings>
3838

3939
<jxb:bindings
40-
schemaLocation="./src/main/resources/xsd/1.15/netex_part_2/part2_journeyTimes/netex_vehicleJourneyFrequency_version.xsd">
40+
schemaLocation="./src/main/resources/xsd/1.16/netex_part_2/part2_journeyTimes/netex_vehicleJourneyFrequency_version.xsd">
4141
<jxb:bindings node="//xsd:group[@name= 'HeadwayJourneyGroupGroup']/xsd:sequence/xsd:element[@name = 'Description']">
4242
<jxb:property name="DescriptionHeadwayJourneyGroupGroup" />
4343
</jxb:bindings>
4444
</jxb:bindings>
4545

4646
<jxb:bindings
47-
schemaLocation="./src/main/resources/xsd/1.15/netex_part_3/part3_salesTransactions/netex_salesContract_version.xsd">
47+
schemaLocation="./src/main/resources/xsd/1.16/netex_part_3/part3_salesTransactions/netex_salesContract_version.xsd">
4848
<jxb:bindings node="//xsd:element[@name = 'Status']">
4949
<jxb:property name="StatusPassengerContractGroup" />
5050
</jxb:bindings>
5151
</jxb:bindings>
5252

5353
<jxb:bindings
54-
schemaLocation="./src/main/resources/xsd/1.15/netex_part_3/part3_salesTransactions/netex_retailConsortium_version.xsd">
54+
schemaLocation="./src/main/resources/xsd/1.16/netex_part_3/part3_salesTransactions/netex_retailConsortium_version.xsd">
5555
<jxb:bindings node="//xsd:element[@name = 'Status']">
5656
<jxb:property name="StatusRetailDeviceGroup" />
5757
</jxb:bindings>
5858
</jxb:bindings>
5959

6060
<jxb:bindings
61-
schemaLocation="./src/main/resources/xsd/1.15/netex_framework/netex_responsibility/netex_version_support.xsd">
61+
schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_responsibility/netex_version_support.xsd">
6262
<jxb:bindings node="//xsd:attributeGroup[@name = 'BasicModificationDetailsGroup']/xsd:attribute[@name = 'status']">
6363
<jxb:property name="status_BasicModificationDetailsGroup" />
6464
</jxb:bindings>
@@ -68,7 +68,7 @@
6868
</jxb:bindings>
6969

7070
<jxb:bindings
71-
schemaLocation="./src/main/resources/xsd/1.15/netex_framework/netex_genericFramework/netex_zone_version.xsd">
71+
schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_genericFramework/netex_zone_version.xsd">
7272
<jxb:bindings node="//xsd:complexType[@name = 'tariffZonesInFrame_RelStructure']/xsd:complexContent/xsd:extension[@base = 'containmentAggregationStructure']/xsd:sequence/xsd:element[@ref = 'TariffZone_']">
7373
<jxb:property name="tariffZone" />
7474
</jxb:bindings>

pom.xml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
<jdk.version>11</jdk.version>
7070

7171
<netexRepoName>NeTEx</netexRepoName>
72-
<netexBranch>master</netexBranch>
72+
<netexBranch>update_dsj</netexBranch>
7373
<netexGithubUrl>https://github.com/entur/${netexRepoName}</netexGithubUrl>
74-
<netexVersion>1.15</netexVersion>
74+
<netexVersion>1.16</netexVersion>
7575

7676
<!-- JAXB components versions -->
7777
<jakarta-xml-bind.version>4.0.0</jakarta-xml-bind.version>
@@ -230,22 +230,22 @@
230230
<version>${maven-exec-plugin.version}</version>
231231
<executions>
232232

233-
<!-- This is the current version which the model is built from. -->
234-
<execution>
235-
<id>download-extract-current-version</id>
236-
<phase>generate-sources</phase>
237-
<goals>
238-
<goal>exec</goal>
239-
</goals>
240-
<configuration>
241-
<environmentVariables>
242-
<GITHUB_URL>${netexGithubUrl}/archive/${netexBranch}.zip</GITHUB_URL>
243-
<DESTINATION_PATH>src/main/resources/xsd/${netexVersion}</DESTINATION_PATH>
244-
<ZIP_PATH_TO_EXTRACT>NeTEx-${netexBranch}/xsd/*</ZIP_PATH_TO_EXTRACT>
245-
</environmentVariables>
246-
<executable>./bin/netex-download-extract.sh</executable>
247-
</configuration>
248-
</execution>
233+
<!-- This is the current version which the model is built from. -->
234+
<!--execution>
235+
<id>download-extract-current-version</id>
236+
<phase>generate-sources</phase>
237+
<goals>
238+
<goal>exec</goal>
239+
</goals>
240+
<configuration>
241+
<environmentVariables>
242+
<GITHUB_URL>${netexGithubUrl}/archive/${netexBranch}.zip</GITHUB_URL>
243+
<DESTINATION_PATH>src/main/resources/xsd/${netexVersion}</DESTINATION_PATH>
244+
<ZIP_PATH_TO_EXTRACT>NeTEx-${netexBranch}/xsd/*</ZIP_PATH_TO_EXTRACT>
245+
</environmentVariables>
246+
<executable>./bin/netex-download-extract.sh</executable>
247+
</configuration>
248+
</execution-->
249249
<execution>
250250
<id>replace-hard-coded-id-in-bindings-file</id>
251251
<phase>generate-sources</phase>
@@ -261,6 +261,22 @@
261261
</executable>
262262
</configuration>
263263
</execution>
264+
<execution>
265+
<!-- This downloads 1.15 for validation needs. This is not used to generate the model -->
266+
<id>download-extract-legacy-1.15</id>
267+
<phase>generate-resources</phase>
268+
<goals>
269+
<goal>exec</goal>
270+
</goals>
271+
<configuration>
272+
<environmentVariables>
273+
<GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.15.zip</GITHUB_URL>
274+
<DESTINATION_PATH>src/main/resources/xsd/1.15</DESTINATION_PATH>
275+
<ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.15/xsd/*</ZIP_PATH_TO_EXTRACT>
276+
</environmentVariables>
277+
<executable>./bin/netex-download-extract.sh</executable>
278+
</configuration>
279+
</execution>
264280
<execution>
265281
<!-- This downloads 1.14 for validation needs. This is not used to generate the model -->
266282
<id>download-extract-legacy-1.14</id>

src/test/java/org/rutebanken/netex/model/UnmarshalTimetableFrameTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ void unmarshalTimetableFrame() throws JAXBException {
9797
" <DatedServiceJourney version=\"1\" id=\"VYG:DatedServiceJourney:96_KMB-NK_23-12-09\">\n" +
9898
" <ServiceAlteration>cancellation</ServiceAlteration>" +
9999
" <ServiceJourneyRef ref=\"VYG:ServiceJourney:96-KMB_87815-R\" version=\"11\"></ServiceJourneyRef>\n" +
100-
" <DatedServiceJourneyRef ref=\"VYG:DatedServiceJourney:8916_KVG-DEG_23-10-19\" version=\"1\"></DatedServiceJourneyRef>\n" +
101-
" <OperatingDayRef ref=\"VYG:OperatingDay:2023-12-09\"></OperatingDayRef>\n" +
100+
" <OperatingDayRef ref=\"VYG:OperatingDay:2023-12-09\"/>\n" +
101+
" <replacedJourneys>" +
102+
" <DatedVehicleJourneyRef ref=\"VYG:DatedServiceJourney:8916_KVG-DEG_23-10-19\" version=\"1\"/>\n" +
103+
" </replacedJourneys>\n" +
102104
" </DatedServiceJourney>\n" +
103105
" </vehicleJourneys>\n" +
104106
" </TimetableFrame>\n" +
@@ -127,12 +129,13 @@ void unmarshalTimetableFrame() throws JAXBException {
127129

128130
DatedServiceJourney dsj = (DatedServiceJourney) timetableFrame.getVehicleJourneys().getVehicleJourneyOrDatedVehicleJourneyOrNormalDatedVehicleJourney().get(1);
129131
assertEquals("VYG:OperatingDay:2023-12-09", dsj.getOperatingDayRef().getRef());
130-
assertEquals("VYG:ServiceJourney:96-KMB_87815-R", dsj.getJourneyRef().get(0).getValue().getRef());
131-
assertEquals("VYG:DatedServiceJourney:8916_KVG-DEG_23-10-19", dsj.getJourneyRef().get(1).getValue().getRef());
132+
assertEquals("VYG:ServiceJourney:96-KMB_87815-R", dsj.getJourneyRef().getValue().getRef());
133+
assertEquals("VYG:DatedServiceJourney:8916_KVG-DEG_23-10-19", dsj.getReplacedJourneys().getDatedVehicleJourneyRefOrNormalDatedVehicleJourneyRef().get(0).getValue().getRef());
132134
assertEquals("cancellation", dsj.getServiceAlteration().value());
133135

134136

135137

138+
136139
}
137140

138141

0 commit comments

Comments
 (0)