Skip to content

Commit e5e8481

Browse files
committed
Synchronize DatedServiceJourney with CEN version - JEE8 version
1 parent 7ed6421 commit e5e8481

File tree

4 files changed

+35
-16
lines changed

4 files changed

+35
-16
lines changed

bindings.xjb

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

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

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

2424
<jxb:bindings
25-
schemaLocation="./src/main/resources/xsd/1.15/netex_framework/netex_genericFramework/netex_organisation_version.xsd">
25+
schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_genericFramework/netex_organisation_version.xsd">
2626
<jxb:bindings node="//xsd:element[@name = 'Status']">
2727
<jxb:property name="StatusOrganisationGroup" />
2828
</jxb:bindings>
@@ -31,35 +31,35 @@
3131
</jxb:bindings>
3232
</jxb:bindings>
3333
<jxb:bindings
34-
schemaLocation="./src/main/resources/xsd/1.15/netex_part_3/part3_fares/netex_salesOfferPackage_version.xsd">
34+
schemaLocation="./src/main/resources/xsd/1.16/netex_part_3/part3_fares/netex_salesOfferPackage_version.xsd">
3535
<jxb:bindings node="//xsd:element[@ref = 'ResponsibilitySetRef']">
3636
<jxb:property name="ResponsibilitySetRefDistributionByGroup" />
3737
</jxb:bindings>
3838
</jxb:bindings>
3939

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

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

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

6161
<jxb:bindings
62-
schemaLocation="./src/main/resources/xsd/1.15/netex_framework/netex_responsibility/netex_version_support.xsd">
62+
schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_responsibility/netex_version_support.xsd">
6363
<jxb:bindings node="//xsd:attributeGroup[@name = 'BasicModificationDetailsGroup']/xsd:attribute[@name = 'status']">
6464
<jxb:property name="status_BasicModificationDetailsGroup" />
6565
</jxb:bindings>
@@ -69,7 +69,7 @@
6969
</jxb:bindings>
7070

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

pom.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
<jdk.version>1.8</jdk.version>
6868

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

7474
<!-- JAXB components versions -->
7575
<jakarta-xml-bind.version>2.3.3</jakarta-xml-bind.version>
@@ -259,6 +259,22 @@
259259
</executable>
260260
</configuration>
261261
</execution>
262+
<execution>
263+
<!-- This downloads 1.15 for validation needs. This is not used to generate the model -->
264+
<id>download-extract-legacy-1.15</id>
265+
<phase>generate-resources</phase>
266+
<goals>
267+
<goal>exec</goal>
268+
</goals>
269+
<configuration>
270+
<environmentVariables>
271+
<GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.15.zip</GITHUB_URL>
272+
<DESTINATION_PATH>src/main/resources/xsd/1.15</DESTINATION_PATH>
273+
<ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.15/xsd/*</ZIP_PATH_TO_EXTRACT>
274+
</environmentVariables>
275+
<executable>./bin/netex-download-extract.sh</executable>
276+
</configuration>
277+
</execution>
262278
<execution>
263279
<!-- This downloads 1.14 for validation needs. This is not used to generate the model -->
264280
<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: 6 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,8 +129,8 @@ 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

0 commit comments

Comments
 (0)