Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)

B28401-02


oracle.spatial.network.lod
Interface LogicalPath

All Known Subinterfaces:
SpatialPath

public interface LogicalPath

A LogicalPath is defined by an array of link IDs, array of node IDs, and the cost of traversing through this path. The cost of a path is the sum of the costs of the the links and nodes on the path, excluding the start node and the end node.

Since:
11gR1

Method Summary
 LogicalPath append(LogicalPath path, double connectorNodeCost)
          Appends a path to the end this path.
 LogicalPath append(long nextLinkId, double nextLinkCost, long nextNodeId, double connectorNodeCost)
          Append a link to this path.
 double getCost()
          Returns the cost of this path.
 long getEndNodeId()
          Returns the end node ID of this path.
 long getFirstLinkId()
          Returns the ID of the first link on this path.
 long getLastLinkId()
          Returns the ID of the last link on this path.
 long[] getLinkIds()
          Returns the array of link IDs on this path.
 long[] getNodeIds()
          Returns the array of node IDs on this path.
 long getStartNodeId()
          Returns the start node ID of this path.
 java.util.Map<java.lang.String,java.lang.Object> getUserData()
          Returns all the user data name value pairs.
 java.lang.Object getUserData(java.lang.String dataName)
          Returns the user data object for the specified data name.
 int indexOfLink(long linkId)
          Returns the index of the specified link in this path.
 int indexOfNode(long nodeId)
          Returns the index of the specified node in this path.
 boolean isSimple()
          Checks whether this path is simple or not.
 LogicalPath prepend(LogicalPath path, double connectorNodeCost)
          Appends a path to the beginning of this path.
 LogicalPath prepend(long prevLinkId, double prevLinkCost, long prevNodeId, double connectorNodeCost)
          Prepend a link to this path.
 void setCost(double cost)
          Sets the cost of the path.
 void setUserData(java.util.Map<java.lang.String,java.lang.Object> userDataMap)
          Sets the value of the user data.
 void setUserData(java.lang.String dataName, java.lang.Object dataValue)
          Sets the value of the user data.

 

Method Detail

getLinkIds

long[] getLinkIds()
Returns the array of link IDs on this path.
Returns:
array of link IDs

getNodeIds

long[] getNodeIds()
Returns the array of node IDs on this path.
Returns:
array of node IDs

getCost

double getCost()
Returns the cost of this path.
Returns:
cost of the path

getStartNodeId

long getStartNodeId()
Returns the start node ID of this path.
Returns:
start node ID

getEndNodeId

long getEndNodeId()
Returns the end node ID of this path.
Returns:
end node ID

getFirstLinkId

long getFirstLinkId()
Returns the ID of the first link on this path.
Returns:
ID of the first link

getLastLinkId

long getLastLinkId()
Returns the ID of the last link on this path.
Returns:
ID of the last link

isSimple

boolean isSimple()
Checks whether this path is simple or not. A path is simple if no node is visited twice on this path, i.e., no loop exists on this path.
Returns:
true, if the path is simple; false, otherwise.

getUserData

java.lang.Object getUserData(java.lang.String dataName)
Returns the user data object for the specified data name.
Parameters:
dataName - name of the user data
Returns:
value of the user data

setUserData

void setUserData(java.lang.String dataName,
                 java.lang.Object dataValue)
Sets the value of the user data. No verification of the validity of the data name is done inside this method, therefore, the caller must ensure that the input data name is valid.
Parameters:
dataName - name of the user data
dataValue - value of the user data

getUserData

java.util.Map<java.lang.String,java.lang.Object> getUserData()
Returns all the user data name value pairs.
Returns:
user data name value pairs

setUserData

void setUserData(java.util.Map<java.lang.String,java.lang.Object> userDataMap)
Sets the value of the user data. No verification of the validity of the data name is done inside this method, therefore, the caller must ensure that the input data name is valid.
Parameters:
userDataMap - a map of userdata name value pairs

append

LogicalPath append(long nextLinkId,
                   double nextLinkCost,
                   long nextNodeId,
                   double connectorNodeCost)
Append a link to this path.
Parameters:
nextLinkId - ID of the next link
nextLinkCost - cost of the next link
nextNodeId - ID of the next node
connectorNodeCost - cost of the connector node

prepend

LogicalPath prepend(long prevLinkId,
                    double prevLinkCost,
                    long prevNodeId,
                    double connectorNodeCost)
Prepend a link to this path.
Parameters:
prevLinkId - ID of the prev link
prevLinkCost - cost of the prev link
prevNodeId - ID of the prev node
connectorNodeCost - cost of the connector node

append

LogicalPath append(LogicalPath path,
                   double connectorNodeCost)
Appends a path to the end this path.
Parameters:
path - path to append to the end
connectorNodeCost - cost of the connector node
Returns:

prepend

LogicalPath prepend(LogicalPath path,
                    double connectorNodeCost)
Appends a path to the beginning of this path.
Parameters:
path - path to append at the beginning
connectorNodeCost - cost of the connector node
Returns:

setCost

void setCost(double cost)
Sets the cost of the path.
Parameters:
cost - cost of the path

indexOfNode

int indexOfNode(long nodeId)
Returns the index of the specified node in this path.
Parameters:
nodeId - node id
Returns:
the index of the node, if the path contains the node; -1, otherwise.

indexOfLink

int indexOfLink(long linkId)
Returns the index of the specified link in this path.
Parameters:
linkId - link id
Returns:
the index of the link, if the path contains the link; -1, otherwise.

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)

B28401-02


Copyright © 2007, 2008, Oracle. All Rights Reserved.