Interface Path
- All Superinterfaces:
Aggregateable, Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal
A Path represents a means between two nodes.
-
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, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.Methods inherited from interface OsidRelationship
getEndReason, getEndReasonId, hasEndReasonModifier and TypeMethodDescriptionGets a state indicating why this relationship has ended.Gets a stateIdindicating why this relationship has ended.booleanTests if a reason this relationship came to an end is known.Methods inherited from interface Temporal
getEndDate, getStartDate, isEffectiveModifier and TypeMethodDescriptionGets the end date.Gets the start date.booleanTests if the current date is within the start end end dates inclusive.
-
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.
-