public interface PathTravelSession extends OsidSession
This session provides methods for examining Path
travel.
This session defines views that offer differing behaviors when retrieving multiple objects.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedMapView()
and
useIsolatedMapView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupPathTravel()
Tests if this user can perform
Path lookups. |
Speed |
getAverageSpeed(Id pathId,
Coordinate coordinate,
Distance distance)
Gets the expected average speed for a traveler along a path between
the given coordinates.
|
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
ObstacleList |
getObstacles(Id pathId,
Coordinate coordinate,
Distance distance)
Gets an
ObstacleList corresponding to the given
Path and coordinate range. |
SpeedZoneList |
getSpeedZones(Id pathId,
Coordinate coordinate,
Distance distance)
Gets a
SpeedZoneList corresponding to the given
Path and coordinate range. |
SpeedZoneList |
getSpeedZonesAtResolution(Id pathId,
Coordinate coordinate,
Distance distance,
Distance resolution)
Gets a
SpeedZoneList corresponding to the given
Path and coordinate range for a given resolution. |
void |
useComparativePathView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedMapView()
Federates the view for methods in this session.
|
void |
useIsolatedMapView()
Isolates the view for methods in this session.
|
void |
usePlenaryPathView()
A complete view of the
Path returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getMapId()
Map
Id
associated with this
session. Map Id
associated with this sessionmandatory
- This method must be implemented. Map getMap() throws OperationFailedException, PermissionDeniedException
Map
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupPathTravel()
Path
lookups. 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 opt not to offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativePathView()
mandatory
- This method is must be implemented. void usePlenaryPathView()
Path
returns is desired. Methods
will return what is requested or result in an error. This view is used
when greater precision is desired at the expense of interoperability.mandatory
- This method is must be implemented. void useFederatedMapView()
mandatory
- This method is must be implemented. void useIsolatedMapView()
mandatory
- This method is must be implemented. ObstacleList getObstacles(Id pathId, Coordinate coordinate, Distance distance) throws NotFoundException, OperationFailedException, PermissionDeniedException
ObstacleList
corresponding to the given
Path
and coordinate range. In plenary mode, the returned list
contains all of the obstacles as defined. Otherwise, inaccessible
Obstacles
may be omitted from the list or overlapping
obstacles may be reordered.pathId
- Id
of the Path
coordinate
- starting coordinatedistance
- a distance from coordinateInvalidArgumentException
- coordinate not on pathNotFoundException
- pathId
not foundNullArgumentException
- pathId, coordinate
or distance
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. Speed getAverageSpeed(Id pathId, Coordinate coordinate, Distance distance) throws NotFoundException, OperationFailedException, PermissionDeniedException
pathId
- Id
of the Path
coordinate
- starting coordinatedistance
- a distance from coordinateInvalidArgumentException
- coordinate not on pathNotFoundException
- pathId
not foundNullArgumentException
- pathId, coordinate
or distance
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. SpeedZoneList getSpeedZones(Id pathId, Coordinate coordinate, Distance distance) throws NotFoundException, OperationFailedException, PermissionDeniedException
SpeedZoneList
corresponding to the given
Path
and coordinate range. In plenary mode, the returned list
contains all of the speed zones as defined. Otherwise, inaccessible
SpeedZones
may be omitted from the list or overlapping
speed zones may be reordered.pathId
- Id
of the Path
coordinate
- starting coordinatedistance
- a distance from coordinateInvalidArgumentException
- coordinate not on pathNotFoundException
- pathId
not foundNullArgumentException
- pathId, coordinate or
distance is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. SpeedZoneList getSpeedZonesAtResolution(Id pathId, Coordinate coordinate, Distance distance, Distance resolution) throws NotFoundException, OperationFailedException, PermissionDeniedException
SpeedZoneList
corresponding to the given
Path
and coordinate range for a given resolution.pathId
- Id
of the Path
coordinate
- starting coordinatedistance
- a distance from coordinateresolution
- the resolutionInvalidArgumentException
- coordinate not on pathNotFoundException
- pathId
not foundNullArgumentException
- pathId, coordinate,
distance
or resolution
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented.