@@ -742,42 +742,54 @@ protected ValidationTree getTimetableFrameValidationTree(String path) {
742
742
new ValidateNotExist (
743
743
"vehicleJourneys/ServiceJourney/passingTimes/TimetabledPassingTime[not(DepartureTime or EarliestDepartureTime) and not(ArrivalTime or LatestArrivalTime)]" ,
744
744
"SERVICE_JOURNEY_4" ,
745
- "TimetabledPassingTime contains neither DepartureTime/EarliestDepartureTime nor ArrivalTime/LatestArrivalTime"
745
+ "ServiceJourney missing arrival and departure" ,
746
+ "TimetabledPassingTime contains neither DepartureTime/EarliestDepartureTime nor ArrivalTime/LatestArrivalTime" ,
747
+ Severity .ERROR
746
748
)
747
749
);
748
750
validationTree .addValidationRule (
749
751
new ValidateNotExist (
750
752
"vehicleJourneys/ServiceJourney[not(passingTimes/TimetabledPassingTime[1]/DepartureTime) and not(passingTimes/TimetabledPassingTime[1]/EarliestDepartureTime)]" ,
751
753
"SERVICE_JOURNEY_5" ,
752
- "All TimetabledPassingTime except last call must have DepartureTime"
754
+ "ServiceJourney missing departure times" ,
755
+ "All TimetabledPassingTime except last call must have DepartureTime" ,
756
+ Severity .ERROR
753
757
)
754
758
);
755
759
validationTree .addValidationRule (
756
760
new ValidateNotExist (
757
761
"vehicleJourneys/ServiceJourney[count(passingTimes/TimetabledPassingTime[last()]/ArrivalTime) = 0 and count(passingTimes/TimetabledPassingTime[last()]/LatestArrivalTime) = 0]" ,
758
762
"SERVICE_JOURNEY_6" ,
759
- "Last TimetabledPassingTime must have ArrivalTime"
763
+ "ServiceJourney missing arrival time for last stop" ,
764
+ "Last TimetabledPassingTime must have ArrivalTime" ,
765
+ Severity .ERROR
760
766
)
761
767
);
762
768
validationTree .addValidationRule (
763
769
new ValidateNotExist (
764
770
"vehicleJourneys/ServiceJourney/passingTimes/TimetabledPassingTime[DepartureTime = ArrivalTime]" ,
765
771
"SERVICE_JOURNEY_7" ,
766
- "ArrivalTime is identical to DepartureTime"
772
+ "ServiceJourney identical arrival and departure" ,
773
+ "ArrivalTime is identical to DepartureTime" ,
774
+ Severity .WARNING
767
775
)
768
776
);
769
777
validationTree .addValidationRule (
770
778
new ValidateNotExist (
771
779
"vehicleJourneys/ServiceJourney/passingTimes/TimetabledPassingTime[not(@id)]" ,
772
780
"SERVICE_JOURNEY_8" ,
773
- "Missing id on TimetabledPassingTime"
781
+ "ServiceJourney missing id on TimetabledPassingTime" ,
782
+ "Missing id on TimetabledPassingTime" ,
783
+ Severity .WARNING
774
784
)
775
785
);
776
786
validationTree .addValidationRule (
777
787
new ValidateNotExist (
778
788
"vehicleJourneys/ServiceJourney/passingTimes/TimetabledPassingTime[not(@version)]" ,
779
789
"SERVICE_JOURNEY_9" ,
780
- "Missing version on TimetabledPassingTime"
790
+ "ServiceJourney missing version on TimetabledPassingTime" ,
791
+ "Missing version on TimetabledPassingTime" ,
792
+ Severity .WARNING
781
793
)
782
794
);
783
795
@@ -789,115 +801,147 @@ protected ValidationTree getTimetableFrameValidationTree(String path) {
789
801
new ValidateNotExist (
790
802
"vehicleJourneys/ServiceJourney[not(JourneyPatternRef)]" ,
791
803
"SERVICE_JOURNEY_10" ,
792
- "The ServiceJourney does not refer to a JourneyPattern"
804
+ "ServiceJourney missing reference to JourneyPattern" ,
805
+ "The ServiceJourney does not refer to a JourneyPattern" ,
806
+ Severity .ERROR
793
807
)
794
808
);
795
809
validationTree .addValidationRule (
796
810
new ValidateNotExist (
797
811
"vehicleJourneys/ServiceJourney[(TransportMode and not(TransportSubmode)) or (not(TransportMode) and TransportSubmode)]" ,
798
812
"SERVICE_JOURNEY_11" ,
799
- "If overriding Line TransportMode or TransportSubmode on a ServiceJourney, both elements must be present"
813
+ "ServiceJourney invalid overriding of transport modes" ,
814
+ "If overriding Line TransportMode or TransportSubmode on a ServiceJourney, both elements must be present" ,
815
+ Severity .WARNING
800
816
)
801
817
);
802
818
validationTree .addValidationRule (
803
819
new ValidateNotExist (
804
820
"vehicleJourneys/ServiceJourney[not(OperatorRef) and not(//ServiceFrame/lines/*[self::Line or self::FlexibleLine]/OperatorRef)]" ,
805
821
"SERVICE_JOURNEY_12" ,
806
- "Missing OperatorRef on ServiceJourney (not defined on Line)"
822
+ "ServiceJourney missing OperatorRef" ,
823
+ "Missing OperatorRef on ServiceJourney (not defined on Line)" ,
824
+ Severity .ERROR
807
825
)
808
826
);
809
827
validationTree .addValidationRule (
810
828
new ValidateNotExist (
811
829
"vehicleJourneys/ServiceJourney[not(dayTypes/DayTypeRef) and not(@id=//TimetableFrame/vehicleJourneys/DatedServiceJourney/ServiceJourneyRef/@ref)]" ,
812
830
"SERVICE_JOURNEY_13" ,
813
- "The ServiceJourney does not refer to DayTypes nor DatedServiceJourneys"
831
+ "ServiceJourney missing reference to calendar data" ,
832
+ "The ServiceJourney does not refer to DayTypes nor DatedServiceJourneys" ,
833
+ Severity .ERROR
814
834
)
815
835
);
816
836
validationTree .addValidationRule (
817
837
new ValidateNotExist (
818
838
"vehicleJourneys/ServiceJourney[dayTypes/DayTypeRef and @id=//TimetableFrame/vehicleJourneys/DatedServiceJourney/ServiceJourneyRef/@ref]" ,
819
839
"SERVICE_JOURNEY_14" ,
820
- "The ServiceJourney references both DayTypes and DatedServiceJourneys"
840
+ "ServiceJourney duplicated reference to calendar data" ,
841
+ "The ServiceJourney references both DayTypes and DatedServiceJourneys" ,
842
+ Severity .ERROR
821
843
)
822
844
);
823
845
validationTree .addValidationRule (
824
846
new ValidateNotExist (
825
847
"for $a in vehicleJourneys/ServiceJourney return if(count(//ServiceFrame/journeyPatterns/*[@id = $a/JourneyPatternRef/@ref]/pointsInSequence/StopPointInJourneyPattern) != count($a/passingTimes/TimetabledPassingTime)) then $a else ()" ,
826
848
"SERVICE_JOURNEY_15" ,
827
- "ServiceJourney does not specify passing time for all StopPointInJourneyPattern"
849
+ "ServiceJourney missing some passing times" ,
850
+ "ServiceJourney does not specify passing time for all StopPointInJourneyPattern" ,
851
+ Severity .ERROR
828
852
)
829
853
);
830
854
validationTree .addValidationRule (
831
855
new ValidateNotExist (
832
856
"vehicleJourneys/ServiceJourney[@id = preceding-sibling::ServiceJourney/@id]" ,
833
857
"SERVICE_JOURNEY_16" ,
834
- "ServiceJourney is repeated with a different version"
858
+ "ServiceJourney multiple versions" ,
859
+ "ServiceJourney is repeated with a different version" ,
860
+ Severity .WARNING
835
861
)
836
862
);
837
863
838
864
validationTree .addValidationRule (
839
865
new ValidateNotExist (
840
866
"vehicleJourneys/DatedServiceJourney[not(OperatingDayRef)]" ,
841
867
"DATED_SERVICE_JOURNEY_1" ,
842
- "Missing OperatingDayRef on DatedServiceJourney"
868
+ "DatedServiceJourney missing OperatingDayRef" ,
869
+ "Missing OperatingDayRef on DatedServiceJourney" ,
870
+ Severity .ERROR
843
871
)
844
872
);
845
873
validationTree .addValidationRule (
846
874
new ValidateNotExist (
847
875
"vehicleJourneys/DatedServiceJourney[not(ServiceJourneyRef)]" ,
848
876
"DATED_SERVICE_JOURNEY_2" ,
849
- "Missing ServiceJourneyRef on DatedServiceJourney"
877
+ "DatedServiceJourney missing ServiceJourneyRef" ,
878
+ "Missing ServiceJourneyRef on DatedServiceJourney" ,
879
+ Severity .ERROR
850
880
)
851
881
);
852
882
validationTree .addValidationRule (
853
883
new ValidateNotExist (
854
884
"vehicleJourneys/DatedServiceJourney[count(ServiceJourneyRef) > 1]" ,
855
885
"DATED_SERVICE_JOURNEY_3" ,
856
- "Multiple ServiceJourneyRef on DatedServiceJourney"
886
+ "DatedServiceJourney multiple ServiceJourneyRef" ,
887
+ "Multiple ServiceJourneyRef on DatedServiceJourney" ,
888
+ Severity .ERROR
857
889
)
858
890
);
859
891
validationTree .addValidationRule (
860
892
new ValidateNotExist (
861
893
"vehicleJourneys/DatedServiceJourney[@id = preceding-sibling::DatedServiceJourney/@id]" ,
862
894
"DATED_SERVICE_JOURNEY_4" ,
863
- "DatedServiceJourney is repeated with a different version"
895
+ "DatedServiceJourney multiple versions" ,
896
+ "DatedServiceJourney is repeated with a different version" ,
897
+ Severity .WARNING
864
898
)
865
899
);
866
900
validationTree .addValidationRule (
867
901
new ValidateNotExist (
868
902
"vehicleJourneys/DatedServiceJourney/DatedServiceJourneyRef[@ref = preceding-sibling::DatedServiceJourneyRef/@ref]" ,
869
903
"DATED_SERVICE_JOURNEY_5" ,
870
- "Multiple references from a DatedServiceJourney to the same DatedServiceJourney"
904
+ "DatedServiceJourney multiple references to the same DatedServiceJourney" ,
905
+ "Multiple references from a DatedServiceJourney to the same DatedServiceJourney" ,
906
+ Severity .ERROR
871
907
)
872
908
);
873
909
874
910
validationTree .addValidationRule (
875
911
new ValidateNotExist (
876
912
"vehicleJourneys/DeadRun[not(passingTimes)]" ,
877
913
"DEAD_RUN_1" ,
878
- "The Dead run does not reference passing times"
914
+ "DeadRun missing PassingTime references" ,
915
+ "The Dead run does not reference passing times" ,
916
+ Severity .INFO
879
917
)
880
918
);
881
919
validationTree .addValidationRule (
882
920
new ValidateNotExist (
883
921
"vehicleJourneys/DeadRun[not(JourneyPatternRef)]" ,
884
922
"DEAD_RUN_2" ,
885
- "The Dead run does not reference a journey pattern"
923
+ "DeadRun missing JourneyPattern references" ,
924
+ "The Dead run does not reference a journey pattern" ,
925
+ Severity .ERROR
886
926
)
887
927
);
888
928
validationTree .addValidationRule (
889
929
new ValidateNotExist (
890
930
"vehicleJourneys/DeadRun[not(dayTypes/DayTypeRef)]" ,
891
931
"DEAD_RUN_3" ,
892
- "The Dead run does not reference day types"
932
+ "DeadRun missing DayType references" ,
933
+ "The Dead run does not reference day types" ,
934
+ Severity .ERROR
893
935
)
894
936
);
895
937
896
938
validationTree .addValidationRule (
897
939
new ValidateNotExist (
898
940
"vehicleJourneys/ServiceJourney/FlexibleServiceProperties[not(@id)]" ,
899
941
"FLEXIBLE_SERVICE_1" ,
900
- "Missing id on FlexibleServiceProperties"
942
+ "FlexibleService missing Id on FlexibleServiceProperties" ,
943
+ "Missing id on FlexibleServiceProperties" ,
944
+ Severity .ERROR
901
945
)
902
946
);
903
947
validationTree .addValidationRule (
@@ -1184,6 +1228,7 @@ protected ValidationTree getVehicleScheduleFrameValidationTree(String path) {
1184
1228
new ValidateAtLeastOne (
1185
1229
"blocks/Block | blocks/TrainBlock" ,
1186
1230
"BLOCK_1" ,
1231
+ "Block missing VehicleScheduleFrame" ,
1187
1232
"At least one Block or TrainBlock required in VehicleScheduleFrame" ,
1188
1233
Severity .ERROR
1189
1234
)
0 commit comments