Interface Route

All Superinterfaces:
Aggregateable, Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Route extends OsidRelationship, Aggregateable

A Route represents one or more paths between two locations. A Route is created from a series of RouteSegments which, in turn, may relate to a Path . A Path is an object representation of a fixed means of travel between two locations, such as a road.

  • Method Details

    • getStartingLocationId

      Id getStartingLocationId()
      Gets the Id of the starting location of this route.
      Returns:
      the starting location Id
      Compliance:
      mandatory - This method must be implemented.
    • getStartingLocation

      Location getStartingLocation() throws OperationFailedException
      Gets the starting location of this route.
      Returns:
      the starting location
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getEndingLocationId

      Id getEndingLocationId()
      Gets the Id of the ending location of this route.
      Returns:
      the ending location Id
      Compliance:
      mandatory - This method must be implemented.
    • getEndingLocation

      Location getEndingLocation() throws OperationFailedException
      Gets the ending location of this route.
      Returns:
      the ending location
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getDistance

      Distance getDistance()
      Gets the total distance of this route.
      Returns:
      the total route distance
      Compliance:
      mandatory - This method must be implemented.
    • getETA

      Duration getETA()
      Gets the estimated travel time across the entire route.
      Returns:
      the estimated travel time
      Compliance:
      mandatory - This method must be implemented.
    • getSegmentIds

      IdList getSegmentIds()
      Gets the route segment Ids of this route.
      Returns:
      the segment Ids of this route
      Compliance:
      mandatory - This method must be implemented.
    • getSegments

      Gets the segments of this route.
      Returns:
      the segments of this route
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getRouteRecord

      RouteRecord getRouteRecord(Type routeRecordType) throws OperationFailedException
      Gets the route record corresponding to the given Route record Type .This method is used to retrieve an object implementing the requested record. The pathRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(routeRecordType) is true .
      Parameters:
      routeRecordType - the type of route record to retrieve
      Returns:
      the route record
      Throws:
      NullArgumentException - routeRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(routeRecordType) is false
      Compliance:
      mandatory - This method must be implemented.