public interface TopologyTraversalSession extends OsidSession
This session defines methods to traverse through a graph.
Modifier and Type | Method and Description |
---|---|
boolean |
canTraverseTopology()
Tests if this user can traverse the topology.
|
EdgeList |
getConnectedEdges(Id nodeId,
long hops)
Gets all the edges for a given node.
|
NodeList |
getDisconnectedNodes()
Gets the nodes with no edges.
|
Graph |
getGraph()
Gets the
Graph associated with this session. |
Id |
getGraphId()
Gets the
Graph Id associated with this
session. |
EdgeList |
getInboundEdges(Id nodeId,
long hops)
Gets a list of directional edges into the given node.
|
NodeList |
getNeighboringNodes(Id nodeId,
long hops)
Gets the neighboring nodes of the given node.
|
EdgeList |
getOutboundEdges(Id nodeId,
long hops)
Gets a list of directional edges out of the given node.
|
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.
|
void |
useFederatedGraphView()
Federates the view for methods in this session.
|
void |
useIsolatedGraphView()
Isolates the view for methods in this session.
|
void |
usePlenaryNodeView()
A complete view of the method returns is desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getGraphId()
Graph
Id
associated with this
session. Graph Id
associated with this sessionmandatory
- This method must be implemented. Graph getGraph() throws OperationFailedException, PermissionDeniedException
Graph
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canTraverseTopology()
PERMISSION_DENIED.
This is intended as a hint to an
application that may not offer lookup operations to unauthorized
users. false
if topology methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeNodeView()
mandatory
- This method is must be implemented. void usePlenaryNodeView()
mandatory
- This method is must be implemented. void useFederatedGraphView()
mandatory
- This method is must be implemented. void useIsolatedGraphView()
mandatory
- This method is must be implemented. EdgeList getConnectedEdges(Id nodeId, long hops) throws NotFoundException, OperationFailedException, PermissionDeniedException
nodeId
- the given node Id
hops
- the number of hops to include. 0 returns an empty list. 1
returns the immediate connected edges.NotFoundException
- nodeId
is not foundNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. NodeList getNeighboringNodes(Id nodeId, long hops) throws NotFoundException, OperationFailedException, PermissionDeniedException
nodeId
- the given node Id
hops
- the number of hops to include. 0 returns the given node.
1 returns the immediate neighbors.NotFoundException
- nodeId
is not foundNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. EdgeList getInboundEdges(Id nodeId, long hops) throws NotFoundException, OperationFailedException, PermissionDeniedException
nodeId
- the given node Id
hops
- the number of hops to include. 0 returns an empty list. 1
returns the immediate connected edges.NotFoundException
- nodeId
is not foundNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. EdgeList getOutboundEdges(Id nodeId, long hops) throws NotFoundException, OperationFailedException, PermissionDeniedException
nodeId
- the given node Id
hops
- the number of hops to include. 0 returns an empty list. 1
returns the immediate connected edges.NotFoundException
- nodeId
is not foundNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. NodeList getDisconnectedNodes() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.