Skip navigation links

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


oracle.spatial.network
Interface Tree

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

public interface Tree
extends java.lang.Cloneable, java.io.Serializable

This interface defines a tree for trace-out. The nodes of the tree can either be network nodes or virtual nodes on network links.


Method Summary
 TreeNode[] bestFirstSearch()
          Best First Search based on cost
 TreeNode[] breadthFirstSearch()
          Breadth First Search
 void clear()
          Clears the tree structure
 boolean containsPartialLinks()
          Does the tree contain particial links?
 TreeNode[] depthFirstSearch()
          Depth First Search
 TreeNode get(Node node)
          Returns the tree node that contains the given network node
 TreeNode[] getLeafNodeArray()
          Returns leaf nodes in an array
 TreeNode getRootNode()
          Returns the root node
 SubPath getSubPath(TreeNode treeNode)
          Returns the subpath between the given tree node and the root node
 boolean isForward()
          Returns the traverse direction
 boolean isLogical()
          Checks if the tree is logical
 int size()
          Returns number of tree nodes

 

Method Detail

getRootNode

TreeNode getRootNode()
Returns the root node

containsPartialLinks

boolean containsPartialLinks()
Does the tree contain particial links?

clear

void clear()
Clears the tree structure

depthFirstSearch

TreeNode[] depthFirstSearch()
Depth First Search

breadthFirstSearch

TreeNode[] breadthFirstSearch()
Breadth First Search

bestFirstSearch

TreeNode[] bestFirstSearch()
Best First Search based on cost

getLeafNodeArray

TreeNode[] getLeafNodeArray()
Returns leaf nodes in an array

isLogical

boolean isLogical()
Checks if the tree is logical
Returns:
true if logical tree, false if it is a spatial tree

get

TreeNode get(Node node)
Returns the tree node that contains the given network node
Parameters:
node - given network node
Returns:
tree node that contains the given network node, null if node not in the tree

size

int size()
Returns number of tree nodes
Returns:
no of tree nodes

isForward

boolean isForward()
Returns the traverse direction
Returns:
true if the traverse direction is forward (starting from rott), false otherwise

getSubPath

SubPath getSubPath(TreeNode treeNode)
                   throws NetworkDataException
Returns the subpath between the given tree node and the root node
Parameters:
treeNode - the given tree node in the tree
Returns:
subpath between the tree node and the root node
Throws:
NetworkDataException

Skip navigation links

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


Copyright © 2007, Oracle. All Rights Reserved.