org.geotools.index.quadtree
Class Node

Object
  extended by Node
Direct Known Subclasses:
FileSystemNode

public class Node
extends Object

DOCUMENT ME!

Author:
Tommaso Nolli
Module:
trunk/gt/modules   (gt-modules.jar) (Maven report) (SVN head)

Field Summary
protected  int id
           
protected  int numShapesId
           
protected  Node parent
           
protected  int[] shapesId
           
protected  List subNodes
           
 
Constructor Summary
Node(Envelope bounds, int id, Node parent)
           
 
Method Summary
 void addShapeId(int id)
          Add a shape id
 void addSubNode(Node node)
          DOCUMENT ME!
 void clearSubNodes()
           
 Node copy()
           
 Envelope getBounds()
          DOCUMENT ME!
 int getNumShapeIds()
          DOCUMENT ME!
 int getNumSubNodes()
          DOCUMENT ME!
 Node getParent()
           
 int getShapeId(int pos)
          Gets a shape id
 int[] getShapesId()
          DOCUMENT ME!
 Node getSibling()
           
 Node getSubNode(int pos)
          Gets the Node at the requested position
 boolean isChildrenVisited()
           
 boolean isVisited()
           
 boolean removeSubNode(Node node)
          Removes a subnode
 void setBounds(Envelope bounds)
          DOCUMENT ME!
 void setChildrenVisited(boolean childrenVisited)
           
 void setParent(Node parent)
           
 void setShapesId(int[] ids)
          Sets the shape ids
 void setVisited(boolean visited)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numShapesId

protected int numShapesId

shapesId

protected int[] shapesId

subNodes

protected List subNodes

parent

protected Node parent

id

protected int id
Constructor Detail

Node

public Node(Envelope bounds,
            int id,
            Node parent)
Method Detail

getBounds

public Envelope getBounds()
DOCUMENT ME!

Returns:
Returns the bounds.

setBounds

public void setBounds(Envelope bounds)
DOCUMENT ME!

Parameters:
bounds - The bounds to set.

getNumSubNodes

public int getNumSubNodes()
DOCUMENT ME!

Returns:
Returns the numSubNodes.

getNumShapeIds

public int getNumShapeIds()
DOCUMENT ME!

Returns:
Returns the number of records stored.

addSubNode

public void addSubNode(Node node)
DOCUMENT ME!

Parameters:
node -
Throws:
NullPointerException - DOCUMENT ME!

removeSubNode

public boolean removeSubNode(Node node)
Removes a subnode

Parameters:
node - The subnode to remove
Returns:
true if the subnode has been removed

clearSubNodes

public void clearSubNodes()

getSubNode

public Node getSubNode(int pos)
                throws StoreException
Gets the Node at the requested position

Parameters:
pos - The position
Returns:
A Node
Throws:
StoreException - DOCUMENT ME!

addShapeId

public void addShapeId(int id)
Add a shape id

Parameters:
id -

getShapeId

public int getShapeId(int pos)
Gets a shape id

Parameters:
pos - The position
Returns:
The shape id (or recno) at the requested position
Throws:
ArrayIndexOutOfBoundsException - DOCUMENT ME!

setShapesId

public void setShapesId(int[] ids)
Sets the shape ids

Parameters:
ids -

getShapesId

public int[] getShapesId()
DOCUMENT ME!

Returns:
Returns the shapesId.

getParent

public Node getParent()

setParent

public void setParent(Node parent)

isVisited

public boolean isVisited()

setVisited

public void setVisited(boolean visited)

getSibling

public Node getSibling()
                throws StoreException
Throws:
StoreException

isChildrenVisited

public boolean isChildrenVisited()

setChildrenVisited

public void setChildrenVisited(boolean childrenVisited)

copy

public Node copy()
          throws IOException
Throws:
IOException


Copyright © 1996-2009 Geotools. All Rights Reserved.