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

public final class Stop
extends java.lang.Object
Entity for a single stop.
Author:
Stefan Kalscheuer
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    Stop​(java.lang.String id, java.lang.String name, java.lang.String indicator, java.lang.Integer state, java.lang.Double latitude, java.lang.Double longitude)
    Construct Stop object.
    Stop​(java.util.List<java.io.Serializable> raw)
    Construct Stop object from raw list of attributes parsed from JSON.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getId()
    Stop identifier.
    java.lang.String getIndicator()
    The letter(s) that are displayed on top of the bus stop flag (e.g.
    java.lang.Double getLatitude()
    The latitude of the stop.
    java.lang.Double getLongitude()
    The longitude of the stop.
    java.lang.String getName()
    The name of the bus stop.
    java.lang.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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Stop

      public Stop​(java.lang.String id, java.lang.String name, java.lang.String indicator, java.lang.Integer state, java.lang.Double latitude, java.lang.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​(java.util.List<java.io.Serializable> raw) throws java.io.IOException
      Construct Stop object from raw list of attributes parsed from JSON.
      Parameters:
      raw - List of attributes from JSON line
      Throws:
      java.io.IOException - Thrown on invalid line format.
  • Method Details

    • getId

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

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

      public java.lang.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 java.lang.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 java.lang.Double getLatitude()
      The latitude of the stop. This is expressed using the WGS84 coordinate system.
      Returns:
      The stop geolocation latitude.
    • getLongitude

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