java.lang.Object
de.stklcode.pubtrans.ura.model.Stop
- All Implemented Interfaces:
Serializable
Entity for a single stop.
- Author:
- Stefan Kalscheuer
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Stop identifier.The letter(s) that are displayed on top of the bus stop flag (e.g.The latitude of the stop.The longitude of the stop.getName()The name of the bus stop.getState()The different stop states and their definitions are provided below: 0: “Open”: Bus stop is being served as usual 1: “Temporarily Closed” : Vehicles are not serving the stop but may be serving a nearby bus stop, predictions may be available 2: “Closed” : Vehicles are not serving the stop.
-
Constructor Details
-
Stop
public Stop(String id, String name, String indicator, Integer state, Double latitude, Double longitude) Construct Stop object.- Parameters:
id- Stop ID.name- Stop name.indicator- Stop indicator.state- Stop state.latitude- Stop geolocation latitude.longitude- Stop geolocation longitude.
-
Stop
Construct Stop object from raw list of attributes parsed from JSON.- Parameters:
raw- List of attributes from JSON line- Throws:
IOException- Thrown on invalid line format.
-
-
Method Details
-
getId
Stop identifier.- Returns:
- The stop ID.
-
getName
The name of the bus stop.- Returns:
- The stop name.
-
getIndicator
The letter(s) that are displayed on top of the bus stop flag (e.g. SA). These are used to help passengers easily identify a bus stop from others in the locality.- Returns:
- The stop indicator.
-
getState
The different stop states and their definitions are provided below:- 0: “Open”: Bus stop is being served as usual
- 1: “Temporarily Closed” : Vehicles are not serving the stop but may be serving a nearby bus stop, predictions may be available
- 2: “Closed” : Vehicles are not serving the stop. Stop should display the closed message and predictions should not be shown.
- 3: “Suspended” : Vehicles are not serving the stop. Stop should display the closed message and predictions should not be shown.
- Returns:
- The stop state.
-
getLatitude
The latitude of the stop. This is expressed using the WGS84 coordinate system.- Returns:
- The stop geolocation latitude.
-
getLongitude
The longitude of the stop. This isexpressed using the WGS84 coordinate system.- Returns:
- The stop geolocation longitude.
-