Interface TopologyRoutingSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TopologyRoutingSession extends OsidSession

This session defines methods to route between nodes.

  • 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.
    • canTraverseTopology

      boolean canTraverseTopology()
      Tests if this user can traverse the topology. 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 not offer lookup operations to unauthorized users.
      Returns:
      false if topology methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeNodeView

      void useComparativeNodeView()
      The returns from the traversal 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.
    • usePlenaryNodeView

      void usePlenaryNodeView()
      A complete view of the method 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 edges 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 retrievals to this graph only.
      Compliance:
      mandatory - This method is must be implemented.
    • findShortestPathByHops

      EdgeList findShortestPathByHops(Id startNodeId, Id endNodeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets all the edges forming shortest path by number of node hops between two nodes.
      Parameters:
      startNodeId - the starting node Id
      endNodeId - the ending node Id
      Returns:
      a list of edges
      Throws:
      NotFoundException - startNodeId or endNodeId is not found or not connected
      NullArgumentException - startNodeId or endNodeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • findShortestPathByDistance

      EdgeList findShortestPathByDistance(Id startNodeId, Id endNodeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets all the edges forming shortest path by total distance between two nodes.
      Parameters:
      startNodeId - the starting node Id
      endNodeId - the ending node Id
      Returns:
      a list of edges
      Throws:
      NotFoundException - startNodeId or endNodeId is not found or not connected
      NullArgumentException - startNodeId or endNodeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • findCheapestPath

      EdgeList findCheapestPath(Id startNodeId, Id endNodeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets all the edges forming lowest cost path between two nodes.
      Parameters:
      startNodeId - the starting node Id
      endNodeId - the ending node Id
      Returns:
      a list of edges
      Throws:
      NotFoundException - startNodeId or endNodeId is not found or not connected
      NullArgumentException - startNodeId or endNodeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • areNodesConnected

      boolean areNodesConnected(Id startNodeId, Id endNodeId) throws OperationFailedException, PermissionDeniedException
      Tests if there is an active path between the two given nodes.
      Parameters:
      startNodeId - the starting node Id
      endNodeId - the ending node Id
      Returns:
      true if a path exists, false otherwise
      Throws:
      NullArgumentException - startNodeId or endNodeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.