Interface PathLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Path objects. The
Path represents a fixed connection between two Locations .
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 path methods in this session operate,
retrieve and pertain to paths defined explicitly in the current map.
Using an isolated view is useful for managing
Pathswith thePathAdminSession. - federated map view: All path methods in this session operate, retrieve and pertain to all paths defined in this map and any other paths implicitly available in this map through map inheritence.
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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performPathlookups.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.Gets thePathspecified by itsId.getPaths()Gets allPaths.getPathsAlongLocations(IdList locationIds) Gets aPathListconnected to all the givenLocations.getPathsByGenusType(Type pathGenusType) Gets aPathListcorresponding to the given path genusTypewhich does not include paths of genus types derived from the specifiedType.getPathsByIds(IdList pathIds) Gets aPathListcorresponding to the givenIdList.getPathsByParentGenusType(Type pathGenusType) Gets aPathListcorresponding to the given path genusTypeand include any additional paths with genus types derived from the specifiedType.getPathsByRecordType(Type pathRecordType) Gets aPathListcontaining the given path recordType.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of thePathreturns 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.
-
canLookupPaths
boolean canLookupPaths()Tests if this user can performPathlookups. 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.
-
useComparativePathView
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. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryPathView
void usePlenaryPathView()A complete view of thePathreturns 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 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 lookups to this map only.- Compliance:
mandatory- This method is must be implemented.
-
getPath
Path getPath(Id pathId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets thePathspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedPathmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aPathand retained for compatibility.- Parameters:
pathId-Idof thePath- Returns:
- the path
- Throws:
NotFoundException-pathIdnot foundNullArgumentException-pathIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getPathsByIds
PathList getPathsByIds(IdList pathIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aPathListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the paths 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, inaccessiblePathsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
pathIds- the list ofIdsto retrieve- Returns:
- the returned
Pathlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-pathIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusType
PathList getPathsByGenusType(Type pathGenusType) throws OperationFailedException, PermissionDeniedException Gets aPathListcorresponding to the given path genusTypewhich does not include paths of genus types derived from the specifiedType. In plenary mode, the returned list contains all known paths or an error results. Otherwise, the returned list may contain only those paths that are accessible through this session.- Parameters:
pathGenusType- a path genus type- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-pathGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByParentGenusType
PathList getPathsByParentGenusType(Type pathGenusType) throws OperationFailedException, PermissionDeniedException Gets aPathListcorresponding to the given path genusTypeand include any additional paths with genus types derived from the specifiedType. In plenary mode, the returned list contains all known paths or an error results. Otherwise, the returned list may contain only those paths that are accessible through this session.- Parameters:
pathGenusType- a path genus type- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-pathGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByRecordType
PathList getPathsByRecordType(Type pathRecordType) throws OperationFailedException, PermissionDeniedException Gets aPathListcontaining the given path recordType. In plenary mode, the returned list contains all known paths or an error results. Otherwise, the returned list may contain only those paths that are accessible through this session.- Parameters:
pathRecordType- a path record type- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-pathRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsAlongLocations
PathList getPathsAlongLocations(IdList locationIds) throws OperationFailedException, PermissionDeniedException Gets aPathListconnected to all the givenLocations. In plenary mode, the returned list contains all of the paths along the locations, or an error results if a path connected to the location is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list.- Parameters:
locationIds- the list ofIdsto retrieve- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-locationIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPaths
Gets allPaths. In plenary mode, the returned list contains all known paths or an error results. Otherwise, the returned list may contain only those paths that are accessible through this session.- Returns:
- a list of
Paths - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-