public String getId ( ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( trip_id ) ; sb . append ( ' ' ) ; sb . append ( convertToGtfsTime ( start_time ) ) ; sb . append ( "_to_" ) ; sb . append ( convertToGtfsTime ( end_time ) ) ; sb . append ( "_every_" ) ; sb . append ( String . format ( "%dm%02ds" , headway_secs / 60 , headway_secs % 60 ) ) ; if ( exact_times == 1 ) sb . append ( "_exact" ) ; return sb . toString ( ) ; }
Frequency entries have no ID in GTFS so we define one based on the fields in the frequency entry .