Interface RouteSegment

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject

public interface RouteSegment extends OsidObject

A route segment represents a portion of a route.

  • Method Details

    • getStartingInstructions

      DisplayText getStartingInstructions()
      Gets the starting instructions for this segment.
      Returns:
      the starting instructions
      Compliance:
      mandatory - This method must be implemented.
    • getEndingInstructions

      DisplayText getEndingInstructions()
      Gets the ending instructions for this segment.
      Returns:
      the ending instructions
      Compliance:
      mandatory - This method must be implemented.
    • getDistance

      Distance getDistance()
      Gets the length of the entire segment.
      Returns:
      the distance
      Compliance:
      mandatory - This method must be implemented.
    • getETA

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

      boolean hasPath()
      Tests if this segment has a corresponding path.
      Returns:
      true if there is a path, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPathId

      Id getPathId()
      Gets the corresponding path Id on which this segment travels.
      Returns:
      the path
      Throws:
      IllegalStateException - hasPath() is null
      Compliance:
      mandatory - This method must be implemented.
    • getPath

      Path getPath() throws OperationFailedException
      Gets the corresponding path on which this segment travels.
      Returns:
      the path
      Throws:
      IllegalStateException - hasPath() is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getRouteSegmentRecord

      RouteSegmentRecord getRouteSegmentRecord(Type routeSegmentRecordType) throws OperationFailedException
      Gets the route segment record corresponding to the given RouteSegment record Type .
      Parameters:
      routeSegmentRecordType - a route segment record type
      Returns:
      the route segment record
      Throws:
      NullArgumentException - routeRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasDomainType(routeSegmentRecordType) is false
      Compliance:
      mandatory - This method must be implemented.