|
| 1 | +[ |
| 2 | + { |
| 3 | + "rule_context": "resource/kind_of", |
| 4 | + "resource_classes": [ |
| 5 | + "StopPlace", |
| 6 | + "Line", |
| 7 | + "Operator", |
| 8 | + "Network" |
| 9 | + ], |
| 10 | + "rules": [ |
| 11 | + { |
| 12 | + "rule": "attribute/mandatory", |
| 13 | + "name": "name", |
| 14 | + "criticity": "error", |
| 15 | + "code": "name-mandatory", |
| 16 | + "message": "A StopPlace, Line, Operator, Network, GroupOfLines has a Name" |
| 17 | + } |
| 18 | + ] |
| 19 | + }, |
| 20 | + { |
| 21 | + "rule": "attribute/match", |
| 22 | + "name": "short_name", |
| 23 | + "value": "/^.{0,12}$/", |
| 24 | + "criticity": "error", |
| 25 | + "code": "shortname-length", |
| 26 | + "message": "A ShortName have 12 or less than characters" |
| 27 | + }, |
| 28 | + { |
| 29 | + "rule": "attribute/match", |
| 30 | + "name": "public_code", |
| 31 | + "value": "/^.{0,12}$/", |
| 32 | + "criticity": "error", |
| 33 | + "code": "public-code-length", |
| 34 | + "message": "A Public Code have 12 or less than characters" |
| 35 | + }, |
| 36 | + { |
| 37 | + "rule_context": "resource/kind_of", |
| 38 | + "resource_classes": [ |
| 39 | + "Quay", |
| 40 | + "StopPlace", |
| 41 | + "StopPlaceEntrance" |
| 42 | + ], |
| 43 | + "rules": [ |
| 44 | + { |
| 45 | + "rule": "attribute/mandatory", |
| 46 | + "name": "longitude", |
| 47 | + "criticity": "error", |
| 48 | + "code": "longitude-mandatory", |
| 49 | + "message": "Quay, StopPlace and StopPlaceEntrance have a Longitude" |
| 50 | + }, |
| 51 | + { |
| 52 | + "rule": "attribute/mandatory", |
| 53 | + "name": "latitude", |
| 54 | + "criticity": "error", |
| 55 | + "code": "latitude-mandatory", |
| 56 | + "message": "Quay, StopPlace and StopPlaceEntrance have a Latitude" |
| 57 | + } |
| 58 | + ] |
| 59 | + }, |
| 60 | + { |
| 61 | + "rule_context": "resource/kind_of", |
| 62 | + "resource_class": "Line", |
| 63 | + "rules": [ |
| 64 | + { |
| 65 | + "rule": "attribute/mandatory", |
| 66 | + "name": "transport_mode", |
| 67 | + "criticity": "error", |
| 68 | + "code": "line-transport-mode-mandatory", |
| 69 | + "message": "A Line has a Transport Mode" |
| 70 | + } |
| 71 | + ] |
| 72 | + }, |
| 73 | + { |
| 74 | + "rule_context": "resource/kind_of", |
| 75 | + "resource_class": "Line", |
| 76 | + "rules": [ |
| 77 | + { |
| 78 | + "rule": "attribute/mandatory", |
| 79 | + "name": "presentation", |
| 80 | + "criticity": "warning", |
| 81 | + "code": "line-presentation-mandatory", |
| 82 | + "message": "A Line has a Presentation" |
| 83 | + }, |
| 84 | + { |
| 85 | + "rule_context": "reduce/element", |
| 86 | + "element": "presentation", |
| 87 | + "rules": [ |
| 88 | + { |
| 89 | + "rule": "attribute/mandatory", |
| 90 | + "name": "colour", |
| 91 | + "criticity": "warning", |
| 92 | + "code": "line-presentation-colour-mandatory", |
| 93 | + "message": "A Line has a Presentation color" |
| 94 | + } |
| 95 | + ] |
| 96 | + } |
| 97 | + ] |
| 98 | + }, |
| 99 | + { |
| 100 | + "rule_context": "resource/kind_of", |
| 101 | + "resource_class": "Line", |
| 102 | + "rules": [ |
| 103 | + { |
| 104 | + "rule": "attribute/blank", |
| 105 | + "name": "routes", |
| 106 | + "code": "line-no-inner-routes", |
| 107 | + "message": "A Line doesn’t define its own routes" |
| 108 | + } |
| 109 | + ] |
| 110 | + }, |
| 111 | + { |
| 112 | + "rule_context": "resource/kind_of", |
| 113 | + "resource_class": "Route", |
| 114 | + "rules": [ |
| 115 | + { |
| 116 | + "rule": "attribute/mandatory", |
| 117 | + "name": "line_ref", |
| 118 | + "code": "route-line-ref-mandatory", |
| 119 | + "message": "A Route has a LineRef" |
| 120 | + } |
| 121 | + ] |
| 122 | + }, |
| 123 | + { |
| 124 | + "rule_context": "resource/kind_of", |
| 125 | + "resource_class": "JourneyPattern", |
| 126 | + "rules": [ |
| 127 | + { |
| 128 | + "rule": "attribute/mandatory", |
| 129 | + "name": "route_ref", |
| 130 | + "code": "journey-pattern-route-ref-mandatory", |
| 131 | + "message": "A ServiceJourneyPattern has a RouteRef" |
| 132 | + } |
| 133 | + ] |
| 134 | + }, |
| 135 | + { |
| 136 | + "rule_context": "resource/kind_of", |
| 137 | + "resource_class": "ServiceJourney", |
| 138 | + "rules": [ |
| 139 | + { |
| 140 | + "rule": "attribute/mandatory", |
| 141 | + "name": "journey_pattern_ref", |
| 142 | + "code": "service-journey-journey-pattern-ref-mandatory", |
| 143 | + "message": "A ServiceJourney has a JourneyPatternRef" |
| 144 | + } |
| 145 | + ] |
| 146 | + }, |
| 147 | + { |
| 148 | + "rule_context": "resource/kind_of", |
| 149 | + "resource_class": "JourneyPattern", |
| 150 | + "rules": [ |
| 151 | + { |
| 152 | + "rule": "collection/count", |
| 153 | + "collection": "points_in_sequence", |
| 154 | + "minimum_count": 2, |
| 155 | + "code": "service-journey-pattern-many-points-in-sequence", |
| 156 | + "message": "A (Service)JourneyPattern has two or more pointsInSequence" |
| 157 | + } |
| 158 | + ] |
| 159 | + }, |
| 160 | + { |
| 161 | + "rule_context": "resource/kind_of", |
| 162 | + "resource_class": "ServiceJourney", |
| 163 | + "rules": [ |
| 164 | + { |
| 165 | + "rule": "collection/count", |
| 166 | + "collection": "day_types", |
| 167 | + "minimum_count": 1, |
| 168 | + "code": "service-journey-day-types-mandatory", |
| 169 | + "message": "A ServiceJourney has one or more dayTypes" |
| 170 | + } |
| 171 | + ] |
| 172 | + }, |
| 173 | + { |
| 174 | + "rule_context": "resource/kind_of", |
| 175 | + "resource_class": "ServiceJourney", |
| 176 | + "rules": [ |
| 177 | + { |
| 178 | + "rule": "collection/count", |
| 179 | + "collection": "passing_times", |
| 180 | + "minimum_count": 2, |
| 181 | + "code": "service-journey-passing-times-mandatory", |
| 182 | + "message": "A ServiceJourney has two or more passingTimes" |
| 183 | + } |
| 184 | + ] |
| 185 | + }, |
| 186 | + { |
| 187 | + "rule_context": "resource/kind_of", |
| 188 | + "resource_class": "DestinationDisplay", |
| 189 | + "rules": [ |
| 190 | + { |
| 191 | + "rule": "attribute/mandatory", |
| 192 | + "name": "front_text", |
| 193 | + "code": "destination-display-front-text", |
| 194 | + "message": "A Destination Display have a FrontText attribute" |
| 195 | + } |
| 196 | + ] |
| 197 | + }, |
| 198 | + { |
| 199 | + "rule_context": "resource/kind_of", |
| 200 | + "resource_class": "PassengerStopAssignment", |
| 201 | + "rules": [ |
| 202 | + { |
| 203 | + "rule": "attribute/mandatory", |
| 204 | + "name": "scheduled_stop_point_ref", |
| 205 | + "code": "passenger-stop-assignment-scheduled-stop-point-ref", |
| 206 | + "message": "A PassengerStopAssignment has a ScheduledStopPointRef" |
| 207 | + } |
| 208 | + ] |
| 209 | + }, |
| 210 | + { |
| 211 | + "rule": "attribute/match", |
| 212 | + "name": "id", |
| 213 | + "value": "/^.{0,255}$/", |
| 214 | + "criticity": "warning", |
| 215 | + "code": "id-length", |
| 216 | + "message": "Any NeTEx id uses less than 256 characters" |
| 217 | + }, |
| 218 | + { |
| 219 | + "rule": "reference/exist", |
| 220 | + "referenced_class": "ScheduledStopPoint", |
| 221 | + "code": "scheduled-stop-point-refs-exist", |
| 222 | + "message": "Referenced ScheduledStopPoints are present" |
| 223 | + }, |
| 224 | + { |
| 225 | + "rule": "reference/exist", |
| 226 | + "referenced_class": "Operator", |
| 227 | + "code": "operator-refs-exist", |
| 228 | + "message": "Referenced Operators are present" |
| 229 | + }, |
| 230 | + { |
| 231 | + "rule": "reference/exist", |
| 232 | + "referenced_class": "DayType", |
| 233 | + "code": "day-type-refs-exist", |
| 234 | + "message": "Referenced DayTypes are present" |
| 235 | + }, |
| 236 | + { |
| 237 | + "rule": "reference/exist", |
| 238 | + "referenced_class": "Route", |
| 239 | + "code": "route-refs-exist", |
| 240 | + "message": "Referenced Routes are present" |
| 241 | + }, |
| 242 | + { |
| 243 | + "rule": "reference/exist", |
| 244 | + "referenced_class": "JourneyPattern", |
| 245 | + "code": "journey-pattern-refs-exist", |
| 246 | + "message": "Referenced (Service)JourneyPattern are present" |
| 247 | + }, |
| 248 | + { |
| 249 | + "rule": "reference/exist", |
| 250 | + "referenced_class": "DestinationDisplay", |
| 251 | + "code": "destination-display-refs-exist", |
| 252 | + "message": "Referenced DestinationDisplays are present" |
| 253 | + }, |
| 254 | + { |
| 255 | + "rule": "reference/exist", |
| 256 | + "referenced_class": "Direction", |
| 257 | + "code": "direction-refs-exist", |
| 258 | + "message": "Referenced Directions are present" |
| 259 | + }, |
| 260 | + { |
| 261 | + "rule": "reference/exist", |
| 262 | + "referenced_class": "RoutePoint", |
| 263 | + "code": "route-point-refs-exist", |
| 264 | + "message": "Referenced RoutePoints are present" |
| 265 | + }, |
| 266 | + { |
| 267 | + "rule": "service_journey/passing_times_chronology", |
| 268 | + "code": "service-journey-passing-times-chronology", |
| 269 | + "message": "TimedPassingTimes use chronological passing times" |
| 270 | + } |
| 271 | +] |
0 commit comments