org.geotools.data.shapefile.index.quadtree
Class Node

Object
  extended by Node
Direct Known Subclasses:
FileSystemNode

public class Node
extends Object

DOCUMENT ME!

Author:
Tommaso Nolli

Field Summary
protected  int numShapesId
           
protected  int[] shapesId
           
protected  List subNodes
           
 
Constructor Summary
Node(Envelope bounds)
           
 
Method Summary
 void addShapeId(int id)
          Add a shape id
 void addSubNode(Node node)
          DOCUMENT ME!
 void clean()
          To be used only against in memory nodes, allows to start over on rebuilding this node
 void clearSubNodes()
           
 void close()
          Clears up whatever resources the node is hanging onto
 Node copy()
           
 Envelope getBounds()
          DOCUMENT ME!
 int getNumShapeIds()
          DOCUMENT ME!
 int getNumSubNodes()
          DOCUMENT ME!
 int getShapeId(int pos)
          Gets a shape id
 int[] getShapesId()
          DOCUMENT ME!
 Node getSubNode(int pos)
          Gets the Node at the requested position
 boolean isChildrenVisited()
           
 boolean isVisited()
           
 void pack()
           
 boolean removeSubNode(Node node)
          Removes a subnode
 void setBounds(Envelope bounds)
          DOCUMENT ME!
 void setChildrenVisited(boolean childrenVisited)
           
 void setShapesId(int[] ids)
          Sets the shape ids
 void setShapesId(Node other)
           
 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
Constructor Detail

Node

public Node(Envelope bounds)
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 -

setShapesId

public void setShapesId(Node other)

getShapesId

public int[] getShapesId()
DOCUMENT ME!

Returns:
Returns the shapesId.

isVisited

public boolean isVisited()

setVisited

public void setVisited(boolean visited)

isChildrenVisited

public boolean isChildrenVisited()

setChildrenVisited

public void setChildrenVisited(boolean childrenVisited)

copy

public Node copy()
          throws IOException
Throws:
IOException

close

public void close()
Clears up whatever resources the node is hanging onto


clean

public void clean()
To be used only against in memory nodes, allows to start over on rebuilding this node


pack

public void pack()


Copyright © 1996-2014 Geotools. All Rights Reserved.