OSID Logo
OSID Specifications
topology path package
Version 3.0.0
Release Candidate Preview
Interfaceosid.topology.path.Path
Implementsosid.OsidRelationship
osid.Aggregateable
Description

A Path represents a means between two nodes.

MethodgetStartingNodeId
Description

Gets the Id of the starting node of this path.

Returnosid.id.Idthe starting node Id
CompliancemandatoryThis method must be implemented.
MethodgetStartingNode
Description

Gets the starting node of this path.

Returnosid.topology.Nodethe starting node
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetEndingNodeId
Description

Gets the Id of the ending node of this path.

Returnosid.id.Idthe ending node Id
CompliancemandatoryThis method must be implemented.
MethodgetEndingNode
Description

Gets the ending node of this path.

Returnosid.topology.Nodethe ending node
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodisComplete
Description

Tests if all edges exist between the start and end nodes. A path may be complete and inactive.

Returnboolean true if the path is complete, false otherwise
CompliancemandatoryThis method must be implemented.
MethodisClosed
Description

Test if the starting node and ending node are equal.

Returnboolean true if the path is closed, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetHops
Description

Gets the total number of nodes of this path.

Returncardinalthe total path hops
CompliancemandatoryThis method must be implemented.
MethodgetDistance
Description

Gets the total distance of this path.

Returndecimalthe total path distance
CompliancemandatoryThis method must be implemented.
MethodgetCost
Description

Gets the total cost of this path.

Returndecimalthe total path cost
CompliancemandatoryThis method must be implemented.
MethodgetEdgeIds
Description

Gets the edge Ids of this path.

Returnosid.id.IdListthe edge Ids
CompliancemandatoryThis method must be implemented.
MethodgetEdges
Description

Gets the edges of this path.

Returnosid.topology.EdgeListthe edges
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetPathRecord
Description

Gets the path record corresponding to the given Path record Type. This method is used to retrieve an object implementing the requested record. The pathRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(pathRecordType) is true .

Parametersosid.type.TypepathRecordTypethe type of path record to retrieve
Returnosid.topology.path.records.PathRecordthe path record
ErrorsNULL_ARGUMENT pathRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(pathRecordType) is false
CompliancemandatoryThis method must be implemented.