Changes between Version 36 and Version 37 of Rules/PublicTransportGtfs


Ignore:
Timestamp:
2021-10-08T01:22:07+02:00 (4 years ago)
Author:
skyper
Comment:

add route_id syntax for DE-BW-bodo

Legend:

Unmodified
Added
Removed
Modified
  • Rules/PublicTransportGtfs

    v36 v37  
    261261/* FIXME: Split checks per feed instead of one global regex.
    262262/* FIXME: Get proper syntax as regex displayed. */
    263 *[gtfs:route_id      ][gtfs:route_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+(;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+)*$/],
    264 *[gtfs:shape_id      ][gtfs:shape_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/],
    265 *[gtfs:trip_id       ][gtfs:trip_id        !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/],
    266 *[gtfs:trip_id:sample][gtfs:trip_id:sample !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js][1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/] {
     263*[gtfs:route_id      ][gtfs:route_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+(;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+)*$/],
     264*[gtfs:shape_id      ][gtfs:shape_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/],
     265*[gtfs:trip_id       ][gtfs:trip_id        !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/],
     266*[gtfs:trip_id:sample][gtfs:trip_id:sample !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}[A-Z]?(-[0-9A-Z])?-[js]?[1-9][0-9j]a?-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/] {
    267267  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax.", "{0.value}", "{0.key}");
    268268/*  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax `{2}`.", "{0.value}", "{0.key}", "{1.value}"); */
     
    275275  assertNoMatch: "relation gtfs:route_id=90-742-B-j20-1";               /* DE-BW-SWEG */
    276276  assertNoMatch: "relation gtfs:route_id=10-11-I-j20-1";                /* DE-BW-VAG */
     277  assertNoMatch: "relation gtfs:route_id=5-20-21a-1";                   /* DE-BW-bodo */
    277278  assertMatch:   "relation gtfs:shape_id=11-4-I-j20-1.23.";
    278279  assertNoMatch: "relation gtfs:shape_id=11-4-I-j20-1.23.H";            /* DE-BW-VAG */
    279280  assertNoMatch: "relation gtfs:shape_id=92-R01-F-j20-1.117.R";         /* DE-SPNV */
    280281  assertNoMatch: "relation gtfs:shape_id=0-S3-E-j20-2.1.R";             /* DE-BW-SWEG */
     282  assertNoMatch: "relation gtfs:shape_id=5-20-21a-1.40.H";              /* DE-BW-bodo */
    281283  assertMatch:   "relation gtfs:trip_id=1108.T2.11-4-I-j20-1.10.";
    282284  assertNoMatch: "relation gtfs:trip_id=1108.T2.11-4-I-j20-1.10.H";     /* DE-BW-VAG */
    283285  assertNoMatch: "relation gtfs:trip_id=29.T0.7-342-j1j-1.50.H";        /* DE-BW-SBG */
    284286  assertNoMatch: "relation gtfs:trip_id=2.TA.90-742-B-j20-1.4.R";       /* DE-BW-SWEG */
     287  assertNoMatch: "relation gtfs:trip_id=21.T0.5-20-21a-1.40.H";         /* DE-BW-bodo */
    285288}
    286289/* gtfs:feed, *:guid, gtfs:release_date */
     
    496499 */
    497500}
    498 
    499501}}}