java.lang.Object
de.stklcode.pubtrans.ura.model.Stop
All Implemented Interfaces:
Serializable

public final class Stop extends Object
Entity for a single stop.
Author:
Stefan Kalscheuer
See Also:
  • 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

      public Stop(List<Serializable> raw) throws IOException
      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

      public String getId()
      Stop identifier.
      Returns:
      The stop ID.
    • getName

      public String getName()
      The name of the bus stop.
      Returns:
      The stop name.
    • getIndicator

      public String 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

      public Integer 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

      public Double getLatitude()
      The latitude of the stop. This is expressed using the WGS84 coordinate system.
      Returns:
      The stop geolocation latitude.
    • getLongitude

      public Double getLongitude()
      The longitude of the stop. This isexpressed using the WGS84 coordinate system.
      Returns:
      The stop geolocation longitude.