Interface Path
- All Superinterfaces:
Aggregateable, Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal
A Path represents a means between two nodes.
Like all OsidObjects, Path is managed by its
OsidSessions and may not be accessed by concurrent processing threads.
-
Method Summary
Modifier and TypeMethodDescriptiongetCost()Gets the total cost of this path.Gets the total distance of this path.Gets the edgeIdsof this path.getEdges()Gets the edges of this path.Gets the ending node of this path.Gets theIdof the ending node of this path.longgetHops()Gets the total number of nodes of this path.getPathRecord(Type pathRecordType) Gets the path record corresponding to the givenPathrecordType.This method is used to retrieve an object implementing the requested record.Gets the starting node of this path.Gets theIdof the starting node of this path.booleanisClosed()Test if the starting node and ending node are equal.booleanTests if all edges exist between the start and end nodes.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeMethods inherited from interface Extensible
getRecordTypes, hasRecordTypeMethods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeMethods inherited from interface OsidRelationship
getEndReason, getEndReasonId, hasEndReasonMethods inherited from interface Temporal
getEndDate, getStartDate, isEffective
-
Method Details
-
getStartingNodeId
Id getStartingNodeId()Gets theIdof the starting node of this path.- Returns:
- the starting node
Id - Compliance:
mandatory- This method must be implemented.
-
getStartingNode
Gets the starting node of this path.- Returns:
- the starting node
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getEndingNodeId
Id getEndingNodeId()Gets theIdof the ending node of this path.- Returns:
- the ending node
Id - Compliance:
mandatory- This method must be implemented.
-
getEndingNode
Gets the ending node of this path.- Returns:
- the ending node
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
isComplete
boolean isComplete()Tests if all edges exist between the start and end nodes. A path may be complete and inactive.- Returns:
trueif the path is complete,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
isClosed
boolean isClosed()Test if the starting node and ending node are equal.- Returns:
trueif the path is closed,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getHops
long getHops()Gets the total number of nodes of this path.- Returns:
- the total path hops
- Compliance:
mandatory- This method must be implemented.
-
getDistance
BigDecimal getDistance()Gets the total distance of this path.- Returns:
- the total path distance
- Compliance:
mandatory- This method must be implemented.
-
getCost
BigDecimal getCost()Gets the total cost of this path.- Returns:
- the total path cost
- Compliance:
mandatory- This method must be implemented.
-
getEdgeIds
IdList getEdgeIds()Gets the edgeIdsof this path.- Returns:
- the edge
Ids - Compliance:
mandatory- This method must be implemented.
-
getEdges
Gets the edges of this path.- Returns:
- the edges
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getPathRecord
Gets the path record corresponding to the givenPathrecordType.This method is used to retrieve an object implementing the requested record. ThepathRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(pathRecordType)istrue.- Parameters:
pathRecordType- the type of path record to retrieve- Returns:
- the path record
- Throws:
NullArgumentException-pathRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(pathRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-