HapiLeg

data class HapiLeg(idx: Int, name: String?, number: String?, category: String?, type: HapiLeg.Type?, cancelled: Boolean, partCancelled: Boolean, reachable: Boolean, redirected: Boolean, direction: String?, duration: Duration?, dist: Int?, hide: Boolean, psCtxArriveEarlier: String?, psCtxDepartureLater: String?, Origin: HapiOrigin, Destination: HapiDestination, Notes: List<HapiNote>, JourneyDetailRef: String?, Freq: HapiFrequency?, GisRef: String?, GisRoute: HapiGisRoute?, Messages: List<HapiMessage>, JourneyStatus: HapiJourneyStatus?, Product: List<HapiProduct>, Polyline: HapiPolyline?, PolylineGroup: HapiPolylineGroup?, Stops: List<HapiStop>, ServiceDays: List<HapiServiceDays>, ParallelJourney: List<HapiJourney>, Occupancy: List<HapiOccupancy>)

Types

Type
Link copied to clipboard
enum Type : Enum<HapiLeg.Type>

Properties

cancelled
Link copied to clipboard
val cancelled: Boolean = false

Will be true if this journey is cancelled.

category
Link copied to clipboard
val category: String?

The train category name. The category assignments are stored in the "zugart" file of the raw Hafas plan data.

Destination
Link copied to clipboard
val Destination: HapiDestination
direction
Link copied to clipboard
val direction: String?

Direction information. This will be the name of the last station of the train's journey. Call the JourneyDetail service to get detailed information about the train journey.

dist
Link copied to clipboard
val dist: Int?

Distance for this leg in meter.

duration
Link copied to clipboard
val duration: Duration?

The duration.

Freq
Link copied to clipboard
val Freq: HapiFrequency?
GisRef
Link copied to clipboard
val GisRef: String?
GisRoute
Link copied to clipboard
val GisRoute: HapiGisRoute?
hide
Link copied to clipboard
val hide: Boolean = false

Will be true if this journey is hidden.

idx
Link copied to clipboard
val idx: Int

Specifies the index of the leg starting from 0 and incrementing by 1. It corresponds to travel-order ascending; unique within composite Trip.

JourneyDetailRef
Link copied to clipboard
val JourneyDetailRef: String?
JourneyStatus
Link copied to clipboard
val JourneyStatus: HapiJourneyStatus? = null
Messages
Link copied to clipboard
val Messages: List<HapiMessage>
name
Link copied to clipboard
val name: String?

The attribute name specifies the name of the leg (e.g. "Bus 100").

Notes
Link copied to clipboard
val Notes: List<HapiNote>
number
Link copied to clipboard
val number: String?

The train number.

Occupancy
Link copied to clipboard
val Occupancy: List<HapiOccupancy>
Origin
Link copied to clipboard
val Origin: HapiOrigin
ParallelJourney
Link copied to clipboard
val ParallelJourney: List<HapiJourney>
partCancelled
Link copied to clipboard
val partCancelled: Boolean = false

Will be true if this journey is partially cancelled.

Polyline
Link copied to clipboard
val Polyline: HapiPolyline?
PolylineGroup
Link copied to clipboard
val PolylineGroup: HapiPolylineGroup?
Product
Link copied to clipboard
val Product: List<HapiProduct>
psCtxArriveEarlier
Link copied to clipboard
val psCtxArriveEarlier: String?

Provides a context that may be used in service PartialSearch to increase the time for interchange between the previous journey arrival stop and the following journey departure stop by searching a trip that will lead to an earlier arrival time for the previous journey while keeping the departure time for the following journey(s) constant.

psCtxDepartureLater
Link copied to clipboard
val psCtxDepartureLater: String?

Provides a context that may be used in service PartialSearch to increase the time for interchange between the previous journey arrival stop and the following journey departure stop by searching a trip that will lead to a later departure time for the following journey while keeping the arrival time for the previous journey(s) constant

reachable
Link copied to clipboard
val reachable: Boolean = true

Will be true if this journey is reachable.

redirected
Link copied to clipboard
val redirected: Boolean = false

Will be true if this journey is redirected.

ServiceDays
Link copied to clipboard
val ServiceDays: List<HapiServiceDays>
Stops
Link copied to clipboard
val Stops: List<HapiStop>
type
Link copied to clipboard
val type: HapiLeg.Type? = null

The attribute type specifies the type of the leg. The value can be the JNY for public transport or WALK, TRSF (transfer), BIKE, KISS (car), PARK (Park and Ride) or TAXI, CHKI (check-in), CHKO (check-out) or TETA (Tele taxi).