Skip to content

Commit b972e2f

Browse files
committed
Synchronize DatedServiceJourney with CEN version
1 parent 9ea25fb commit b972e2f

File tree

5 files changed

+37
-17
lines changed

5 files changed

+37
-17
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml
2929
- uses: actions/setup-java@v4
3030
with:
31-
java-version: 17.0.13
31+
java-version: 17.0.15
3232
distribution: temurin
3333
- name: Cache Maven dependencies
3434
uses: actions/cache@v4

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: 18 additions & 2 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.2</jakarta-xml-bind.version>
@@ -262,6 +262,22 @@
262262
</executable>
263263
</configuration>
264264
</execution>
265+
<execution>
266+
<!-- This downloads 1.15 for validation needs. This is not used to generate the model -->
267+
<id>download-extract-legacy-1.15</id>
268+
<phase>generate-resources</phase>
269+
<goals>
270+
<goal>exec</goal>
271+
</goals>
272+
<configuration>
273+
<environmentVariables>
274+
<GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.15.zip</GITHUB_URL>
275+
<DESTINATION_PATH>src/main/resources/xsd/1.15</DESTINATION_PATH>
276+
<ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.15/xsd/*</ZIP_PATH_TO_EXTRACT>
277+
</environmentVariables>
278+
<executable>./bin/netex-download-extract.sh</executable>
279+
</configuration>
280+
</execution>
265281
<execution>
266282
<!-- This downloads 1.14 for validation needs. This is not used to generate the model -->
267283
<id>download-extract-legacy-1.14</id>

src/main/java/org/rutebanken/netex/validation/NeTExValidator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public enum NetexVersion {
4343
v1_12 ("1.12"),
4444
v1_13 ("1.13"),
4545
v1_14 ("1.14"),
46-
v1_15 ("1.15");
46+
v1_15 ("1.15"),
47+
v1_16 ("1.16");
4748

4849
private final String folderName;
4950

@@ -58,7 +59,7 @@ public String toString() {
5859
}
5960
private final Schema neTExSchema;
6061

61-
public static final NetexVersion LATEST = NetexVersion.v1_15;
62+
public static final NetexVersion LATEST = NetexVersion.v1_16;
6263

6364
private static final Map<NetexVersion, NeTExValidator> VALIDATORS_PER_VERSION = new EnumMap<>(NetexVersion.class);
6465

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)