OSID Logo
OSID Specifications
topology package
Version 3.0.0
Release Candidate Preview
Interfaceosid.topology.TopologyRoutingSession
Implementsosid.OsidSession
Description

This session defines methods to route between nodes.

MethodgetGraphId
Description

Gets the Graph Id associated with this session.

Returnosid.id.Idthe Graph Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetGraph
Description

Gets the Graph associated with this session.

Returnosid.topology.Graphthe graph
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanTraverseTopology
Description

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.

Returnboolean false if topology methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeNodeView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryNodeView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedGraphView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedGraphView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this graph only.

CompliancemandatoryThis method is must be implemented.
MethodfindShortestPathByHops
Description

Gets all the edges forming shortest path by number of node hops between two nodes.

Parametersosid.id.IdstartNodeIdthe starting node Id
osid.id.IdendNodeIdthe ending node Id
Returnosid.topology.EdgeLista list of edges
ErrorsNOT_FOUND startNodeId or endNodeId is not found or not connected
NULL_ARGUMENT startNodeId or endNodeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodfindShortestPathByDistance
Description

Gets all the edges forming shortest path by total distance between two nodes.

Parametersosid.id.IdstartNodeIdthe starting node Id
osid.id.IdendNodeIdthe ending node Id
Returnosid.topology.EdgeLista list of edges
ErrorsNOT_FOUND startNodeId or endNodeId is not found or not connected
NULL_ARGUMENT startNodeId or endNodeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodfindCheapestPath
Description

Gets all the edges forming lowest cost path between two nodes.

Parametersosid.id.IdstartNodeIdthe starting node Id
osid.id.IdendNodeIdthe ending node Id
Returnosid.topology.EdgeLista list of edges
ErrorsNOT_FOUND startNodeId or endNodeId is not found or not connected
NULL_ARGUMENT startNodeId or endNodeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodareNodesConnected
Description

Tests if there is an active path between the two given nodes.

Parametersosid.id.IdstartNodeIdthe starting node Id
osid.id.IdendNodeIdthe ending node Id
Returnboolean true if a path exists, false otherwise
ErrorsNULL_ARGUMENT startNodeId or endNodeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.