Interface RouteLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving premade Routes .
The Route represents a set of paths.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated map view: All route methods in this session operate,
retrieve and pertain to routes defined explicitly in the current map.
Using an isolated view is useful for managing
Routeswith theRouteAdminSession. - federated map view: All route methods in this session operate, retrieve and pertain to all routes defined in this map and any other routes implicitly available in this map through map inheritence.
- effective route view: All route lookup methods return routes where the current date falls in between the effective dates inclusive.
- any effective route view: Routes of any effective date are returned from methods.
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 the
methods in this session.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performRoutelookups.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.Gets theRoutespecified by itsId.Gets allRoutes.getRoutesAlongLocations(IdList locationIds) Gets aRouteListconnected to all the givenLocations.getRoutesByGenusType(Type routeGenusType) Gets aRouteListcorresponding to the given route genusTypewhich does not include routes of genus types derived from the specifiedType.getRoutesByIds(IdList routeIds) Gets aRouteListcorresponding to the givenIdList.getRoutesByParentGenusType(Type routeGenusType) Gets aRouteListcorresponding to the given route genusTypeand include any additional routes with genus types derived from the specifiedType.getRoutesByRecordType(Type routeRecordType) Gets aRouteListcontaining the given route recordType.getRoutesForEndingLocation(Id locationId) Gets aRouteListfor the given endingLocation.getRoutesForEndingLocationOnDate(Id locationId, DateTime from, DateTime to) Gets aRouteListfor the given ending location effective during the entire given date range inclusive but not confined to the date range.getRoutesForStartingAndEndingLocation(Id startingLocationId, Id endingLocationId) Gets aRouteListfor the given starting and endingLocations.getRoutesForStartingAndEndingLocationOnDate(Id startingLocationId, Id endingLocationId, DateTime from, DateTime to) Gets aRouteListfor the given starting and ending location effective during the entire given date range inclusive but not confined to the date range.getRoutesForStartingLocation(Id locationId) Gets aRouteListfor the given startingLocation.getRoutesForStartingLocationOnDate(Id locationId, DateTime from, DateTime to) Gets aRouteListfor the given starting location effective during the entire given date range inclusive but not confined to the date range.getRoutesOnDate(DateTime from, DateTime to) Gets aRouteListeffective during the entire given date range inclusive but not confined to the date range.voidAll routes of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly routes whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theRoutereturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getMapId
Id getMapId()Gets theMapIdassociated with this session.- Returns:
- the
Map Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMap
Gets theMapassociated with this session.- Returns:
- the map
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupRoutes
boolean canLookupRoutes()Tests if this user can performRoutelookups. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeRouteView
void useComparativeRouteView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryRouteView
void usePlenaryRouteView()A complete view of theRoutereturns 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.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedMapView
void useFederatedMapView()Federates the view for methods in this session. A federated view will include routes 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 lookups to this map only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveRouteView
void useEffectiveRouteView()Only routes whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveRouteView
void useAnyEffectiveRouteView()All routes of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getRoute
Route getRoute(Id routeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theRoutespecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedRoutemay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aRouteand retained for compatibility. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
routeId-Idof theRoute- Returns:
- the route
- Throws:
NotFoundException-routeIdnot foundNullArgumentException-routeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRoutesByIds
RouteList getRoutesByIds(IdList routeIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aRouteListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the routes specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleRoutesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
routeIds- the list ofIdsto retrieve- Returns:
- the returned
Routelist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-routeIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesByGenusType
RouteList getRoutesByGenusType(Type routeGenusType) throws OperationFailedException, PermissionDeniedException Gets aRouteListcorresponding to the given route genusTypewhich does not include routes of genus types derived from the specifiedType. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
routeGenusType- a route genus type- Returns:
- the returned
Routelist - Throws:
NullArgumentException-routeGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesByParentGenusType
RouteList getRoutesByParentGenusType(Type routeGenusType) throws OperationFailedException, PermissionDeniedException Gets aRouteListcorresponding to the given route genusTypeand include any additional routes with genus types derived from the specifiedType. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
routeGenusType- a route genus type- Returns:
- the returned
Routelist - Throws:
NullArgumentException-routeGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesByRecordType
RouteList getRoutesByRecordType(Type routeRecordType) throws OperationFailedException, PermissionDeniedException Gets aRouteListcontaining the given route recordType. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
routeRecordType- a route record type- Returns:
- the returned
Routelist - Throws:
NullArgumentException-routeRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesOnDate
RouteList getRoutesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aRouteListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Routelist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-from or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesForStartingLocation
RouteList getRoutesForStartingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException Gets aRouteListfor the given startingLocation. In plenary mode, the returned list contains all of the routes, or an error results if a route connected to the location is not found or inaccessible. Otherwise, inaccessibleRoutesmay be omitted from the list. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
locationId- a locationId- Returns:
- the returned
Routelist - Throws:
NullArgumentException-locationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesForStartingLocationOnDate
RouteList getRoutesForStartingLocationOnDate(Id locationId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aRouteListfor the given starting location effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
locationId- a locationIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Routelist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-locationId, from, or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesForEndingLocation
RouteList getRoutesForEndingLocation(Id locationId) throws OperationFailedException, PermissionDeniedException Gets aRouteListfor the given endingLocation. In plenary mode, the returned list contains all of the routes, or an error results if a route connected to the location is not found or inaccessible. Otherwise, inaccessibleRoutesmay be omitted from the list. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
locationId- a locationId- Returns:
- the returned
Routelist - Throws:
NullArgumentException-locationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesForEndingLocationOnDate
RouteList getRoutesForEndingLocationOnDate(Id locationId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aRouteListfor the given ending location effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
locationId- a locationIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Routelist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-locationId, from, or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesForStartingAndEndingLocation
RouteList getRoutesForStartingAndEndingLocation(Id startingLocationId, Id endingLocationId) throws OperationFailedException, PermissionDeniedException Gets aRouteListfor the given starting and endingLocations. In plenary mode, the returned list contains all of the routes, or an error results if a route connected to the location is not found or inaccessible. Otherwise, inaccessibleRoutesmay be omitted from the list. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
startingLocationId- a locationIdendingLocationId- a locationId- Returns:
- the returned
Routelist - Throws:
NullArgumentException-startingLocationIdorendingLocationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesForStartingAndEndingLocationOnDate
RouteList getRoutesForStartingAndEndingLocationOnDate(Id startingLocationId, Id endingLocationId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aRouteListfor the given starting and ending location effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
startingLocationId- a locationIdendingLocationId- a locationIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Routelist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-startingLocationId, endingLocationId, from, or toisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutesAlongLocations
RouteList getRoutesAlongLocations(IdList locationIds) throws OperationFailedException, PermissionDeniedException Gets aRouteListconnected to all the givenLocations. In plenary mode, the returned list contains all of the routes along the locations, or an error results if a route connected to the location is not found or inaccessible. Otherwise, inaccessibleRoutesmay be omitted from the list. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Parameters:
locationIds- the list ofIdsto retrieve- Returns:
- the returned
Routelist - Throws:
NullArgumentException-locationIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoutes
Gets allRoutes. In plenary mode, the returned list contains all known routes or an error results. Otherwise, the returned list may contain only those routes that are accessible through this session. In effective mode, routes are returned that are currently effective. In any effective mode, effective routes and those currently expired are returned.- Returns:
- a list of
Routes - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-