Interface Path

All Superinterfaces:
Aggregateable, Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Path extends OsidRelationship, Aggregateable

A Path represents a means between two nodes.

  • Method Details

    • getStartingNodeId

      Id getStartingNodeId()
      Gets the Id of the starting node of this path.
      Returns:
      the starting node Id
      Compliance:
      mandatory - This method must be implemented.
    • getStartingNode

      Node getStartingNode() throws OperationFailedException
      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 the Id of the ending node of this path.
      Returns:
      the ending node Id
      Compliance:
      mandatory - This method must be implemented.
    • getEndingNode

      Node getEndingNode() throws OperationFailedException
      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:
      true if the path is complete, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • isClosed

      boolean isClosed()
      Test if the starting node and ending node are equal.
      Returns:
      true if the path is closed, false otherwise
      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 edge Ids of 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

      PathRecord getPathRecord(Type pathRecordType) throws OperationFailedException
      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 .
      Parameters:
      pathRecordType - the type of path record to retrieve
      Returns:
      the path record
      Throws:
      NullArgumentException - pathRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(pathRecordType) is false
      Compliance:
      mandatory - This method must be implemented.