Interface PathLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PathLookupSession extends 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 Paths with the PathAdminSession .
  • 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 Details

    • getGraphId

      Id getGraphId()
      Gets the Graph Id associated with this session.
      Returns:
      the Graph Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getGraph

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

      boolean canLookupPaths()
      Tests if this user can perform 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.
      Returns:
      false if lookup methods are not authorized, true otherwise
      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 the 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.
      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

      Gets the Path specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Path may have a different Id than requested, such as the case where a duplicate Id was assigned to a Path and 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 - Id of the Path
      Returns:
      the path
      Throws:
      NotFoundException - pathId not found
      NullArgumentException - pathId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getPathsByIds

      Gets a PathList corresponding to the given IdList . In plenary mode, the returned list contains all of the paths specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Paths may 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 of Ids to retrieve
      Returns:
      the returned Path list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - pathIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByGenusType

      PathList getPathsByGenusType(Type pathGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a PathList corresponding to the given path genus Type which does not include paths of genus types derived from the specified Type . 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 Path list
      Throws:
      NullArgumentException - pathGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByParentGenusType

      PathList getPathsByParentGenusType(Type pathGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a PathList corresponding to the given path genus Type and include any additional paths with genus types derived from the specified Type . 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 Path list
      Throws:
      NullArgumentException - pathGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByRecordType

      PathList getPathsByRecordType(Type pathRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a PathList containing the given path record Type . 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 Path list
      Throws:
      NullArgumentException - pathRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsOnDate

      Gets a PathList 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:
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from Is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByGenusTypeOnDate

      PathList getPathsByGenusTypeOnDate(Type pathGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a PathList of 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 type
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - edgeGenusType, from Is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsForStartingNode

      PathList getPathsForStartingNode(Id nodeId) throws OperationFailedException, PermissionDeniedException
      Gets a PathList starting from the given Node . 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, inaccessible Paths may 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 node Id
      Returns:
      the returned Path list
      Throws:
      NullArgumentException - nodeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsForStartingNodeOnDate

      PathList getPathsForStartingNodeOnDate(Id nodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a PathList 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 node Id
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from Is greater than to
      NullArgumentException - nodeId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByGenusTypeForStartingNode

      PathList getPathsByGenusTypeForStartingNode(Id nodeId, Type pathGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a PathList starting from the given Node and path genus Type including any genus Types derived from the given genus Type . 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, inaccessible Paths may 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 node Id
      pathGenusType - a path genus type
      Returns:
      the returned Path list
      Throws:
      NullArgumentException - nodeId is or pathGenusType null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByGenusTypeForStartingNodeOnDate

      PathList getPathsByGenusTypeForStartingNodeOnDate(Id nodeId, Type pathGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a PathList of 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 node Id
      pathGenusType - a path genus type
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from Is greater than to
      NullArgumentException - nodeId, pathGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsForEndingNode

      PathList getPathsForEndingNode(Id nodeId) throws OperationFailedException, PermissionDeniedException
      Gets a PathList ending at the given Node . 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, inaccessible Paths may 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 node Id
      Returns:
      the returned Path list
      Throws:
      NullArgumentException - nodeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsForEndingNodeOnDate

      PathList getPathsForEndingNodeOnDate(Id nodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a PathList 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 node Id
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from Is greater than to
      NullArgumentException - nodeId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByGenusTypeForEndingNode

      PathList getPathsByGenusTypeForEndingNode(Id nodeId, Type pathGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a PathList ending at the given Node and path genus Type including any genus Types derived from the given genus Type . 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, inaccessible Paths may 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 node Id
      pathGenusType - a path genus type
      Returns:
      the returned Path list
      Throws:
      NullArgumentException - nodeId or pathGenusType null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByGenusTypeForEndingNodeOnDate

      PathList getPathsByGenusTypeForEndingNodeOnDate(Id nodeId, Type pathGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a PathList of 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 node Id
      pathGenusType - a path genus type
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from Is greater than to
      NullArgumentException - nodeId, pathGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsForNodes

      PathList getPathsForNodes(Id startingNodeId, Id endingNodeId) throws OperationFailedException, PermissionDeniedException
      Gets a PathList between to the two given Nodes . 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, inaccessible Paths may 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 node Id
      endingNodeId - ending node Id
      Returns:
      the returned Path list
      Throws:
      NullArgumentException - startingNodeId or endingNodeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsForNodesOnDate

      PathList getPathsForNodesOnDate(Id startingNodeId, Id endingNodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a PathList 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 node Id
      endingNodeId - ending node Id
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from Is greater than to
      NullArgumentException - startingNodeId, endingNodeId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsByGenusTypeForNodes

      PathList getPathsByGenusTypeForNodes(Id startingNodeId, Id endingNodeId, Type pathGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a PathList of the given genus type between the given Nodes . 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, inaccessible Paths may 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 node Id
      endingNodeId - ending node Id
      pathGenusType - a path genus type
      Returns:
      the returned Path list
      Throws:
      NullArgumentException - startingNodeId, endingNodeId or pathGenusType null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 a PathList of 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 node Id
      endingNodeId - ending node Id
      pathGenusType - a path genus type
      from - starting date
      to - ending date
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from Is greater than to
      NullArgumentException - startingNodeId, endingNodeId, pathGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsAlongNodes

      Gets a PathList connected to all the given Nodes . 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, inaccessible Paths may 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 of Ids to retrieve
      Returns:
      the returned Path list
      Throws:
      NullArgumentException - nodeIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPathsAlongNodesOnDate

      PathList getPathsAlongNodesOnDate(IdList nodeIds, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a PathList connected to all the given Nodes and 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, inaccessible Paths may 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 of Ids to retrieve
      from - start of date range
      to - end of date range
      Returns:
      the returned Path list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - nodeIds, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPaths

      Gets all Paths . 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 request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.