Oracle® Spatial Java API Reference
10g Release 2 (10.2)

B14373-01


oracle.spatial.network
Interface Path

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public interface Path
extends java.lang.Cloneable, java.io.Serializable, java.lang.Comparable

This interface defines a network path.


Method Summary
 java.lang.Object clone()
          Clones the path.
 void computeGeometry(double tolerance)
          Computes the path geometry from its link geometries.
 boolean contains(Link l)
          Checks if the path contains the specified link.
 boolean contains(Node n)
          Checks if the path contains the specified node.
 boolean contains(Path path)
          Checks if the path contains the specified path.
 double getCost()
          Returns the path cost.
 double getDuration()
          Gets path duration information
 Node getEndNode()
          Returns the end node of the path.
 JGeometry getGeometry()
          Returns the path geometry (JGeometry).
 int getID()
          Returns the path ID.
 Link[] getLinkArray()
          Returns the path links as an array.
 Link getLinkAt(int index)
           
 java.util.Iterator getLinks()
          Returns the path links as an Iterator.
 java.lang.String getName()
          Returns the path name.
 Network getNetwork()
          Returns the network that contains the path.
 Node[] getNodeArray()
          Returns the path nodes as an array.
 Node getNodeAt(int index)
          Returns the specified node of the path.
 java.util.Iterator getNodes()
          Returns the path nodes as an Iterator.
 int getNoOfLinks()
          Returns the number of links in the path.
 Node getStartNode()
          Returns the start node of the path.
 boolean getState()
          Gets the path state.
 java.lang.String getType()
          Returns the path type.
 java.lang.Object getUserData()
          Gets user defined data.
 java.lang.Object getUserData(java.lang.String name)
          Gets user data
 boolean isActive()
          Checks if the path is active.
 boolean isClosed()
          Checks if the path is closed.
 boolean isConnected(Path path)
          Checks if the path is connected.
 boolean isLogical()
          Chceks if the path is logical.
 boolean isSimple()
          Checks if the path is simple (no self-crossing).
 boolean isTemporary()
          Checks if the path is temporary.
 void setGeometry(JGeometry geom)
          Sets the path geometry (JGeometry).
 void setID(int id)
          Sets the path ID.
 void setName(java.lang.String name)
          Sets the path name.
 void setType(java.lang.String type)
          Sets the path type.
 void setUserData(java.lang.Object userData)
          Sets user defined data.
 void setUserData(java.lang.String name, java.lang.Object data)
          Sets user data
 int size()
          Returns the number of links in the path

 

Methods inherited from interface java.lang.Comparable
compareTo

 

Method Detail

getID

public int getID()
Returns the path ID.

setID

public void setID(int id)
           throws NetworkDataException
Sets the path ID.
Parameters:
id - the path ID to be set
Throws:
NetworkDataException

getName

public java.lang.String getName()
Returns the path name.

setName

public void setName(java.lang.String name)
Sets the path name.
Parameters:
name - the path name to be set

getType

public java.lang.String getType()
Returns the path type.

setType

public void setType(java.lang.String type)
Sets the path type.
Parameters:
type - the path type to be set

getLinkAt

public Link getLinkAt(int index)

getNodeAt

public Node getNodeAt(int index)
Returns the specified node of the path.
Parameters:
index - the specified node position

isClosed

public boolean isClosed()
Checks if the path is closed.

getStartNode

public Node getStartNode()
Returns the start node of the path.

getEndNode

public Node getEndNode()
Returns the end node of the path.

getNetwork

public Network getNetwork()
Returns the network that contains the path.

getLinkArray

public Link[] getLinkArray()
Returns the path links as an array.

getLinks

public java.util.Iterator getLinks()
Returns the path links as an Iterator.

getNodeArray

public Node[] getNodeArray()
Returns the path nodes as an array.

getNodes

public java.util.Iterator getNodes()
Returns the path nodes as an Iterator.

getNoOfLinks

public int getNoOfLinks()
Returns the number of links in the path.

size

public int size()
Returns the number of links in the path

getCost

public double getCost()
Returns the path cost.

isConnected

public boolean isConnected(Path path)
Checks if the path is connected.

isSimple

public boolean isSimple()
Checks if the path is simple (no self-crossing).

isTemporary

public boolean isTemporary()
Checks if the path is temporary.

contains

public boolean contains(Node n)
Checks if the path contains the specified node.
Parameters:
n - the specified node

contains

public boolean contains(Link l)
Checks if the path contains the specified link.
Parameters:
l - the specified link

contains

public boolean contains(Path path)
Checks if the path contains the specified path.
Parameters:
path - the specified path

clone

public java.lang.Object clone()
Clones the path.

getGeometry

public JGeometry getGeometry()
Returns the path geometry (JGeometry).

setGeometry

public void setGeometry(JGeometry geom)
Sets the path geometry (JGeometry).

isLogical

public boolean isLogical()
Chceks if the path is logical.

isActive

public boolean isActive()
Checks if the path is active.

getUserData

public java.lang.Object getUserData()
Gets user defined data.
Returns:
userData the user data.

setUserData

public void setUserData(java.lang.Object userData)
Sets user defined data.
Parameters:
userData - the user data.

getState

public boolean getState()
Gets the path state.

computeGeometry

public void computeGeometry(double tolerance)
Computes the path geometry from its link geometries.
Parameters:
tolerance - the tolerance for testing if two points are the same.

getDuration

public double getDuration()
Gets path duration information

setUserData

public void setUserData(java.lang.String name,
                        java.lang.Object data)
Sets user data
Parameters:
name - name for the user data
data - user data

getUserData

public java.lang.Object getUserData(java.lang.String name)
Gets user data
Parameters:
name - name for the user data
Returns:
user data as an Java Object

Oracle® Spatial Java API Reference
10g Release 2 (10.2)

B14373-01


Copyright © 2005, Oracle. All Rights Reserved.