Skip to content

Commit d45c451

Browse files
authored
Merge changes from CEN NeTex repository (#122)
1 parent 34d32c8 commit d45c451

File tree

5 files changed

+34
-18
lines changed

5 files changed

+34
-18
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.14/NeTEx_publication.xsd">
18+
<jxb:bindings schemaLocation="./src/main/resources/xsd/1.15/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.14/netex_framework/netex_genericFramework/netex_organisation_version.xsd">
25+
schemaLocation="./src/main/resources/xsd/1.15/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.14/netex_part_3/part3_fares/netex_salesOfferPackage_version.xsd">
34+
schemaLocation="./src/main/resources/xsd/1.15/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.14/netex_part_2/part2_journeyTimes/netex_vehicleJourneyFrequency_version.xsd">
41+
schemaLocation="./src/main/resources/xsd/1.15/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.14/netex_part_3/part3_salesTransactions/netex_salesContract_version.xsd">
48+
schemaLocation="./src/main/resources/xsd/1.15/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.14/netex_part_3/part3_salesTransactions/netex_retailConsortium_version.xsd">
55+
schemaLocation="./src/main/resources/xsd/1.15/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.14/netex_framework/netex_responsibility/netex_version_support.xsd">
62+
schemaLocation="./src/main/resources/xsd/1.15/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.14/netex_framework/netex_genericFramework/netex_zone_version.xsd">
72+
schemaLocation="./src/main/resources/xsd/1.15/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: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<netexRepoName>NeTEx</netexRepoName>
7070
<netexBranch>master</netexBranch>
7171
<netexGithubUrl>https://github.com/entur/${netexRepoName}</netexGithubUrl>
72-
<netexVersion>1.14</netexVersion>
72+
<netexVersion>1.15</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.14 for validation needs. This is not used to generate the model -->
264+
<id>download-extract-legacy-1.14</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.14.zip</GITHUB_URL>
272+
<DESTINATION_PATH>src/main/resources/xsd/1.14</DESTINATION_PATH>
273+
<ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.14/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.13 for validation needs. This is not used to generate the model -->
264280
<id>download-extract-legacy-1.13</id>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public enum NetexVersion {
4242
v1_11 ("1.11"),
4343
v1_12 ("1.12"),
4444
v1_13 ("1.13"),
45-
v1_14 ("1.14");
45+
v1_14 ("1.14"),
46+
v1_15 ("1.15");
4647

4748
private final String folderName;
4849

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

60-
public static final NetexVersion LATEST = NetexVersion.v1_14;
61+
public static final NetexVersion LATEST = NetexVersion.v1_15;
6162

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void unmarshalServiceFrame() throws JAXBException {
172172
assertEquals("VYG:ServiceLink:KMB-1_ABOe-1_NULL",serviceLinkInJourneyPattern.getServiceLinkRef().getRef());
173173

174174
PassengerStopAssignment passengerStopAssignment = (PassengerStopAssignment) serviceFrame.getStopAssignments().getStopAssignment().get(0).getValue();
175-
assertEquals("NSR:Quay:111", passengerStopAssignment.getQuayRef().getRef());
175+
assertEquals("NSR:Quay:111", passengerStopAssignment.getQuayRef().getValue().getRef());
176176
assertEquals("VYG:ScheduledStopPoint:HAL-1", passengerStopAssignment.getScheduledStopPointRef().getValue().getRef());
177177

178178

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,20 @@ void unmarshalSiteFrame() throws JAXBException {
156156
PublicationDeliveryStructure publicationDeliveryStructure = jaxbElement.getValue();
157157
SiteFrame siteFrame = (SiteFrame) publicationDeliveryStructure.getDataObjects().getCompositeFrameOrCommonFrame().get(0).getValue();
158158

159-
StopPlace stopPlace = siteFrame.getStopPlaces().getStopPlace().get(0);
159+
StopPlace stopPlace = (StopPlace) siteFrame.getStopPlaces().getStopPlace_().get(0).getValue();
160160
assertEquals("Krokstien", stopPlace.getName().getValue());
161-
assertEquals(VehicleModeEnumeration.BUS, stopPlace.getTransportMode());
161+
assertEquals(AllVehicleModesOfTransportEnumeration.BUS, stopPlace.getTransportMode());
162162
assertEquals(StopTypeEnumeration.ONSTREET_BUS, stopPlace.getStopPlaceType());
163-
assertEquals("BRA:TariffZone:311", stopPlace.getTariffZones().getTariffZoneRef().get(0).getRef());
163+
assertEquals("BRA:TariffZone:311", stopPlace.getTariffZones().getTariffZoneRef_().get(0).getValue().getRef());
164164

165-
Quay quay = (Quay) stopPlace.getQuays().getQuayRefOrQuay().get(0);
165+
Quay quay = (Quay) stopPlace.getQuays().getQuayRefOrQuay().get(0).getValue();
166166
assertEquals(BigDecimal.valueOf(59.910579), quay.getCentroid().getLocation().getLatitude());
167-
168167
TariffZone tariffZone = (TariffZone) siteFrame.getTariffZones().getTariffZone().get(0).getValue();
169168
assertEquals("1", tariffZone.getName().getValue());
170169

171170
GroupOfStopPlaces groupOfStopPlaces = siteFrame.getGroupsOfStopPlaces().getGroupOfStopPlaces().get(0);
172171
assertEquals("Lillehammer", groupOfStopPlaces.getName().getValue());
173-
assertEquals("NSR:StopPlace:420", groupOfStopPlaces.getMembers().getStopPlaceRef().get(0).getRef());
172+
assertEquals("NSR:StopPlace:420", groupOfStopPlaces.getMembers().getStopPlaceRef().get(0).getValue().getRef());
174173

175174

176175

0 commit comments

Comments
 (0)