OSID Logo
OSID Specifications
topology package
Version 3.0.0
Release Candidate Preview
Interfaceosid.topology.Edge
Implementsosid.OsidRelationship
Description

A Edge represents relationship between two nodes.

MethodisDirectional
Description

Tests if this is a directional edge.

Returnboolean true if this edge is directional, false otherwise
CompliancemandatoryThis method must be implemented.
MethodisBiDirectional
Description

Tests if this directional edge is bi-directional.

Returnboolean true if this edge is directional and bi-directional, false otherwise
ErrorsILLEGAL_STATE isDirectional() is false
CompliancemandatoryThis method must be implemented.
MethodgetCost
Description

Gets the cost of this edge.

Returndecimala number representing the cost of this edge
CompliancemandatoryThis method must be implemented.
MethodgetDistance
Description

Gets the distance of this edge.

Returndecimala number representing the distance of this edge
CompliancemandatoryThis method must be implemented.
MethodgetSourceNodeId
Description

Gets the source node of this edge. If the edge is uni-directional, the source node is the node at the beginning of the edge, otherwise it may be relative to the means of traversal of the graph.

Returnosid.id.Idthe source node Id
CompliancemandatoryThis method must be implemented.
MethodgetSourceNode
Description

Gets the Id of the source node of this edge. If the edge is uni-directional, the source node is the node at the beginning of the edge, otherwise it may be relative to the means of traversal of the graph.

Returnosid.topology.Nodethe source node
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetDestinationNodeId
Description

Gets the Id of the destination node of this edge. If the edge is uni-directional, the destination node is the node at the end of the edge, otherwise it may be relative to the means of traversal of the graph.

Returnosid.id.Idthe detsination node Id
CompliancemandatoryThis method must be implemented.
MethodgetDestinationNode
Description

Gets the destination node of this edge. If the edge is uni-directional, the destination node is the node at the end of the edge, otherwise it may be relative to the means of traversal of the graph.

Returnosid.topology.Nodethe detsination node
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetEdgeRecord
Description

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

Parametersosid.type.TypeedgeRecordTypethe type of edge record to retrieve
Returnosid.topology.records.EdgeRecordthe edge record
ErrorsNULL_ARGUMENT edgeRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(edgeRecordType) is false
CompliancemandatoryThis method must be implemented.