summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/IRIS
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-02-14 22:59:22 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-02-14 22:59:22 +0100
commit56685ea830077964eaa5fc083d2b0cd17bb90aa5 (patch)
tree25f9cc25a7db8ffacf0a976e6a9fa60faf236de0 /lib/Travel/Status/DE/IRIS
parent155ddeee707fe31f52e8c54b92476d746f30ea9e (diff)
parse <ref> fields in fchg. not used in db-iris yet.
Diffstat (limited to 'lib/Travel/Status/DE/IRIS')
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm27
1 files changed, 23 insertions, 4 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index 6b4ebb1..75f02cc 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -17,10 +17,10 @@ our $VERSION = '0.03';
Travel::Status::DE::IRIS::Result->mk_ro_accessors(
qw(arrival classes date datetime delay departure is_cancelled is_transfer
- line_no old_train_id old_train_no platform raw_id realtime_xml
- route_start route_end sched_arrival sched_departure sched_platform
- sched_route_start sched_route_end start stop_no time train_id train_no
- transfer type unknown_t unknown_o)
+ line_no train_no_transfer old_train_id old_train_no platform raw_id
+ realtime_xml route_start route_end sched_arrival sched_departure
+ sched_platform sched_route_start sched_route_end start stop_no time
+ train_id train_no transfer type unknown_t unknown_o)
);
sub new {
@@ -171,6 +171,16 @@ sub add_realtime {
return $self;
}
+sub add_ref {
+ my ( $self, %attrib ) = @_;
+
+ $self->{train_no_transfer} = $attrib{train_no};
+
+ # TODO
+
+ return $self;
+}
+
sub add_tl {
my ( $self, %attrib ) = @_;
@@ -766,6 +776,15 @@ stations.
Number of this train, unique per day. E.g. C<< 2225 >> for C<< IC 2225 >>.
+=item $result->train_no_transfer
+
+Number of this train after a following transfer, undefined if no such transfer
+exists. See B<is_transfer> for a note about this.
+
+Note that unlike B<old_train_no>, this information is always based on realtime
+data (not included in any schedule) and only set for stations before the
+transfer station, not the transfer station itself.
+
=item $result->type
Type of this train, e.g. C<< S >> for S-Bahn, C<< RE >> for Regional-Express,