Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.entur</groupId>
<artifactId>netex-validator-java</artifactId>
<version>12.0.12-SNAPSHOT</version>
<version>12.1.0-SNAPSHOT</version>

<name>netex-validator-java</name>
<description>Library for validating NeTEx datasets against the Nordic NeTEx Profile.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class DefaultServiceFrameValidationTreeFactory implements ValidationTreeF
"PASSENGER_STOP_ASSIGNMENT_3";
public static final String CODE_DESTINATION_DISPLAY_1 = "DESTINATION_DISPLAY_1";
public static final String CODE_DESTINATION_DISPLAY_2 = "DESTINATION_DISPLAY_2";
public static final String CODE_DESTINATION_DISPLAY_3 = "DESTINATION_DISPLAY_3";
public static final String CODE_SERVICE_LINK_1 = "SERVICE_LINK_1";
public static final String CODE_SERVICE_LINK_2 = "SERVICE_LINK_2";
public static final String CODE_SERVICE_LINK_3 = "SERVICE_LINK_3";
Expand Down Expand Up @@ -219,6 +220,15 @@ public ValidationTreeBuilder builder() {
Severity.ERROR
)
)
.withRule(
new ValidateNotExist(
"destinationDisplays/DestinationDisplay/variants/DestinationDisplayVariant[not(@id)]",
CODE_DESTINATION_DISPLAY_3,
"DestinationDisplay missing id on DestinationDisplayVariant",
"Missing id on DestinationDisplayVariant",
Severity.WARNING
)
)
.withRuleForLineFile(
new ValidateExactlyOne(
"lines/*[self::Line or self::FlexibleLine]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class DefaultServiceFrameValidationTreeFactoryTest {
<vias>
<Via/>
</vias>
<variants>
<DestinationDisplayVariant/>
</variants>
</DestinationDisplay>
</destinationDisplays>
<stopAssignments>
Expand Down Expand Up @@ -281,7 +284,8 @@ static Stream<String> ruleCodes() {
CODE_PASSENGER_STOP_ASSIGNMENT_2,
CODE_PASSENGER_STOP_ASSIGNMENT_3,
CODE_DESTINATION_DISPLAY_1,
CODE_DESTINATION_DISPLAY_2
CODE_DESTINATION_DISPLAY_2,
CODE_DESTINATION_DISPLAY_3
);
}

Expand Down
Loading