org.geotools.index.rtree
Class Node

Object
  extended by Node
All Implemented Interfaces:
EntryBoundsChangeListener
Direct Known Subclasses:
DatabaseNode, FileSystemNode, FileSystemNode, MemoryNode

public abstract class Node
extends Object
implements EntryBoundsChangeListener

DOCUMENT ME!

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

Field Summary
protected  Envelope bounds
           
protected  Entry[] entries
           
protected  int entriesCount
           
protected  boolean isChanged
           
protected  int maxNodeEntries
           
 
Constructor Summary
Node(int maxNodeEntries)
           
 
Method Summary
 void addEntry(Entry entry)
          Adds an Entry to this Node
 void boundsChanged(Entry e)
           
 void clear()
          Removes all Entrys from this Node
protected abstract  void doSave()
          Saves this Node; called from save()
 Envelope getBounds()
          The bounds of this node.
 Collection getEntries()
           
 int getEntriesCount()
          DOCUMENT ME!
 Entry getEntry(int n)
          Gets the nth Element
protected abstract  Entry getEntry(Node node)
          Returns the Entry pointing the specified Node
abstract  Node getParent()
          DOCUMENT ME!
 boolean isLeaf()
          DOCUMENT ME!
 void removeEntry(Entry entry)
          Removes an Entry from this Node
 void save()
          Saves this Node; this method calls doSave()
 void setLeaf(boolean b)
          DOCUMENT ME!
abstract  void setParent(Node node)
          Sets the parent of this Node
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entriesCount

protected int entriesCount

maxNodeEntries

protected int maxNodeEntries

bounds

protected Envelope bounds

entries

protected Entry[] entries

isChanged

protected boolean isChanged
Constructor Detail

Node

public Node(int maxNodeEntries)
Method Detail

addEntry

public final void addEntry(Entry entry)
Adds an Entry to this Node

Parameters:
entry -

removeEntry

public final void removeEntry(Entry entry)
Removes an Entry from this Node

Parameters:
entry - The Entry to remove

clear

public void clear()
Removes all Entrys from this Node


isLeaf

public boolean isLeaf()
DOCUMENT ME!


setLeaf

public void setLeaf(boolean b)
DOCUMENT ME!

Parameters:
b -

getEntriesCount

public int getEntriesCount()
DOCUMENT ME!


getEntry

public Entry getEntry(int n)
Gets the nth Element

Parameters:
n -

getEntries

public Collection getEntries()

getBounds

public Envelope getBounds()
The bounds of this node.

You will need to look at the prj to produce a referneced envelope for wider use.

Returns:
The bounds

boundsChanged

public void boundsChanged(Entry e)
Specified by:
boundsChanged in interface EntryBoundsChangeListener
See Also:
EntryBoundsChangeListener.boundsChanged(org.geotools.index.rtree.Entry)

save

public final void save()
                throws TreeException
Saves this Node; this method calls doSave()

Throws:
TreeException

getParent

public abstract Node getParent()
                        throws TreeException
DOCUMENT ME!

Throws:
TreeException - DOCUMENT ME!

setParent

public abstract void setParent(Node node)
Sets the parent of this Node

Parameters:
node - The parent Node

getEntry

protected abstract Entry getEntry(Node node)
Returns the Entry pointing the specified Node

Parameters:
node - The Node
Returns:
The Entry

doSave

protected abstract void doSave()
                        throws TreeException
Saves this Node; called from save()

Throws:
TreeException


Copyright © 1996-2009 Geotools. All Rights Reserved.