Interface RoutingSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RoutingSession extends OsidSession

This session defines methods to traverse through a map.

  • Method Details

    • getMapId

      Id getMapId()
      Gets the Map Id associated with this session.
      Returns:
      the Map Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getMap

      Gets the Map associated with this session.
      Returns:
      the map
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupRoutes

      boolean canLookupRoutes()
      Tests if this user can query routes. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not offer lookup operations to unauthorized users.
      Returns:
      false if routing methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedMapView

      void useFederatedMapView()
      Federates the view for methods in this session. A federated view will include paths in maps which are children of this map in the map hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedMapView

      void useIsolatedMapView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this map only.
      Compliance:
      mandatory - This method is must be implemented.
    • getRoutingTypes

      TypeList getRoutingTypes()
      Gets the supported routing types.
      Returns:
      a list of routing types
      Compliance:
      mandatory - This method must be implemented.
    • supportsRoutingType

      boolean supportsRoutingType(Type routingType)
      Tests if the given routing type is supported.
      Parameters:
      routingType - a routing type
      Returns:
      true of the routing type is supported, false otherwise
      Throws:
      NullArgumentException - routingType is null
      Compliance:
      mandatory - This method must be implemented.
    • getShortestRoute

      Route getShortestRoute(Id locationId, Id anotherLocationId, Type routingType) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the shortest route between the two given locations.
      Parameters:
      locationId - the given location Id
      anotherLocationId - the given location Id
      routingType - a routing type
      Returns:
      a list of inbound paths
      Throws:
      NotFoundException - locationId or anotherLocationId is not found
      NullArgumentException - locationId or anotherLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - supportsRoutingType(routingType) is false
      Compliance:
      mandatory - This method must be implemented.
    • getFastestRoute

      Route getFastestRoute(Id locationId, Id anotherLocationId, Type routingType) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the fastest route between the two given locations.
      Parameters:
      locationId - the given location Id
      anotherLocationId - the given location Id
      routingType - a routing type
      Returns:
      a list of inbound paths
      Throws:
      NotFoundException - locationId or anotherLocationId is not found
      NullArgumentException - locationId or anotherLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - supportsRoutingType(routingType) is false
      Compliance:
      mandatory - This method must be implemented.
    • getRoutes

      Route getRoutes(Id locationId, Id anotherLocationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets all routes between the two given locations.
      Parameters:
      locationId - the given location Id
      anotherLocationId - the given location Id
      Returns:
      a list of inbound paths
      Throws:
      NotFoundException - locationId or anotherLocationId is not found
      NullArgumentException - locationId or anotherLocationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.