Interface PathLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Path objects.
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 graph view: All path methods in this session operate,
retrieve and pertain to paths defined explicitly in the current graph.
Using an isolated view is useful for managing
Pathswith thePathAdminSession. - federated graph view: All path methods in this session operate, retrieve and pertain to all paths defined in this graph and any other paths implicitly available in this graph through graph inheritence.
- effective path view: All path lookup methods return paths where the current dates falls in between the effective dates inclusive.
- any effective path view: Paths of any effective date are returned.
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 useFederatedGraphView() and useIsolatedGraphView()
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.getGraph()Gets theGraphassociated with this session.Gets theGraphIdassociated with this session.Gets thePathspecified by itsId.getPaths()Gets allPaths.getPathsAlongNodes(IdList nodeIds) Gets aPathListconnected to all the givenNodes.getPathsAlongNodesOnDate(IdList nodeIds, DateTime from, DateTime to) Gets aPathListconnected to all the givenNodesand and effective during the entire given date range inclusive but not confined to the date range.getPathsByGenusType(Type pathGenusType) Gets aPathListcorresponding to the given path genusTypewhich does not include paths of genus types derived from the specifiedType.getPathsByGenusTypeForEndingNode(Id nodeId, Type pathGenusType) Gets aPathListending at the givenNodeand path genusType includingany genusTypesderived from the given genusType.getPathsByGenusTypeForEndingNodeOnDate(Id nodeId, Type pathGenusType, DateTime from, DateTime to) Gets aPathListof the given genus type and effective during the entire given date range inclusive but not confined to the date range.getPathsByGenusTypeForNodes(Id startingNodeId, Id endingNodeId, Type pathGenusType) Gets aPathListof the given genus type between the givenNodes.getPathsByGenusTypeForNodesOnDate(Id startingNodeId, Id endingNodeId, Type pathGenusType, DateTime from, DateTime to) Gets aPathListof the given genus type and effective during the entire given date range inclusive but not confined to the date range.getPathsByGenusTypeForStartingNode(Id nodeId, Type pathGenusType) Gets aPathListstarting from the givenNodeand path genusType includingany genusTypesderived from the given genusType.getPathsByGenusTypeForStartingNodeOnDate(Id nodeId, Type pathGenusType, DateTime from, DateTime to) Gets aPathListof the given genus type and effective during the entire given date range inclusive but not confined to the date range.getPathsByGenusTypeOnDate(Type pathGenusType, DateTime from, DateTime to) Gets aPathListof a genus type and effective during the entire given date range inclusive but not confined to the date range.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.getPathsForEndingNode(Id nodeId) Gets aPathListending at the givenNode.getPathsForEndingNodeOnDate(Id nodeId, DateTime from, DateTime to) Gets aPathListeffective during the entire given date range inclusive but not confined to the date range.getPathsForNodes(Id startingNodeId, Id endingNodeId) Gets aPathListbetween to the two givenNodes.getPathsForNodesOnDate(Id startingNodeId, Id endingNodeId, DateTime from, DateTime to) Gets aPathListeffective during the entire given date range inclusive but not confined to the date range.getPathsForStartingNode(Id nodeId) Gets aPathListstarting from the givenNode.getPathsForStartingNodeOnDate(Id nodeId, DateTime from, DateTime to) Gets aPathListeffective during the entire given date range inclusive but not confined to the date range.getPathsOnDate(DateTime from, DateTime to) Gets aPathListeffective during the entire given date range inclusive but not confined to the date range.voidAll paths of any effective dates are returned by all 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 paths 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 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
-
getGraphId
Id getGraphId()Gets theGraphIdassociated with this session.- Returns:
- the
Graph Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getGraph
Gets theGraphassociated with this session.- Returns:
- the graph
- 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.
-
useFederatedGraphView
void useFederatedGraphView()Federates the view for methods in this session. A federated view will include paths in graphs which are children of this graph in the graph hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedGraphView
void useIsolatedGraphView()Isolates the view for methods in this session. An isolated view restricts lookups to this graph only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectivePathView
void useEffectivePathView()Only paths whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectivePathView
void useAnyEffectivePathView()All paths of any effective dates are returned by all methods in this session.- 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- 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.
-
getPathsOnDate
PathList getPathsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListeffective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
from- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromIs greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusTypeOnDate
PathList getPathsByGenusTypeOnDate(Type pathGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListof a genus type and effective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
pathGenusType- a path genus typefrom- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-edgeGenusType, fromIs greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsForStartingNode
PathList getPathsForStartingNode(Id nodeId) throws OperationFailedException, PermissionDeniedException Gets aPathListstarting from the givenNode. In plenary mode, the returned list contains all of the paths, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeId- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-nodeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsForStartingNodeOnDate
PathList getPathsForStartingNodeOnDate(Id nodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListeffective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeIdfrom- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromIs greater thantoNullArgumentException-nodeId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusTypeForStartingNode
PathList getPathsByGenusTypeForStartingNode(Id nodeId, Type pathGenusType) throws OperationFailedException, PermissionDeniedException Gets aPathListstarting from the givenNodeand path genusType includingany genusTypesderived from the given genusType. In plenary mode, the returned list contains all of the paths, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeIdpathGenusType- a path genus type- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-nodeIdis orpathGenusTypenullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusTypeForStartingNodeOnDate
PathList getPathsByGenusTypeForStartingNodeOnDate(Id nodeId, Type pathGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListof the given genus type and effective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeIdpathGenusType- a path genus typefrom- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromIs greater thantoNullArgumentException-nodeId, pathGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsForEndingNode
PathList getPathsForEndingNode(Id nodeId) throws OperationFailedException, PermissionDeniedException Gets aPathListending at the givenNode. In plenary mode, the returned list contains all of the paths, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeId- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-nodeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsForEndingNodeOnDate
PathList getPathsForEndingNodeOnDate(Id nodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListeffective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeIdfrom- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromIs greater thantoNullArgumentException-nodeId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusTypeForEndingNode
PathList getPathsByGenusTypeForEndingNode(Id nodeId, Type pathGenusType) throws OperationFailedException, PermissionDeniedException Gets aPathListending at the givenNodeand path genusType includingany genusTypesderived from the given genusType. In plenary mode, the returned list contains all of the paths, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeIdpathGenusType- a path genus type- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-nodeIdorpathGenusTypenullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusTypeForEndingNodeOnDate
PathList getPathsByGenusTypeForEndingNodeOnDate(Id nodeId, Type pathGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListof the given genus type and effective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeId- a nodeIdpathGenusType- a path genus typefrom- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromIs greater thantoNullArgumentException-nodeId, pathGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsForNodes
PathList getPathsForNodes(Id startingNodeId, Id endingNodeId) throws OperationFailedException, PermissionDeniedException Gets aPathListbetween to the two givenNodes. In plenary mode, the returned list contains all of the paths, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
startingNodeId- starting nodeIdendingNodeId- ending nodeId- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-startingNodeIdorendingNodeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsForNodesOnDate
PathList getPathsForNodesOnDate(Id startingNodeId, Id endingNodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListeffective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
startingNodeId- starting nodeIdendingNodeId- ending nodeIdfrom- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromIs greater thantoNullArgumentException-startingNodeId, endingNodeId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusTypeForNodes
PathList getPathsByGenusTypeForNodes(Id startingNodeId, Id endingNodeId, Type pathGenusType) throws OperationFailedException, PermissionDeniedException Gets aPathListof the given genus type between the givenNodes. In plenary mode, the returned list contains all of the paths, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
startingNodeId- starting nodeIdendingNodeId- ending nodeIdpathGenusType- a path genus type- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-startingNodeId, endingNodeIdorpathGenusTypenullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsByGenusTypeForNodesOnDate
PathList getPathsByGenusTypeForNodesOnDate(Id startingNodeId, Id endingNodeId, Type pathGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListof the given genus type and effective during the entire given date range inclusive but not confined to the date range. 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
startingNodeId- starting nodeIdendingNodeId- ending nodeIdpathGenusType- a path genus typefrom- starting dateto- ending date- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromIs greater thantoNullArgumentException-startingNodeId, endingNodeId, pathGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsAlongNodes
PathList getPathsAlongNodes(IdList nodeIds) throws OperationFailedException, PermissionDeniedException Gets aPathListconnected to all the givenNodes. In plenary mode, the returned list contains all of the paths through the nodes, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeIds- the list ofIdsto retrieve- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-nodeIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPathsAlongNodesOnDate
PathList getPathsAlongNodesOnDate(IdList nodeIds, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aPathListconnected to all the givenNodesand and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all of the paths through the nodes, or an error results if a path connected to the node is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Parameters:
nodeIds- the list ofIdsto retrievefrom- start of date rangeto- end of date range- Returns:
- the returned
Pathlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-nodeIds, from, ortoisnullOperationFailedException- 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. In effective mode, paths are returned that are currently effective. In any effective mode, effective paths and those currently expired are returned.- Returns:
- a list of
Paths - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-