org.geotools.index.rtree
Class Node

java.lang.Object
  extended byorg.geotools.index.rtree.Node
All Implemented Interfaces:
EntryBoundsChangeListener
Direct Known Subclasses:
DatabaseNode, FileSystemNode, FileSystemNode, MemoryNode

public abstract class Node
extends java.lang.Object
implements EntryBoundsChangeListener

DOCUMENT ME!

Author:
Tommaso Nolli

Field Summary
protected  com.vividsolutions.jts.geom.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()
 com.vividsolutions.jts.geom.Envelope getBounds()
          DOCUMENT ME!
 java.util.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entriesCount

protected int entriesCount

maxNodeEntries

protected int maxNodeEntries

bounds

protected com.vividsolutions.jts.geom.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!

Returns:

setLeaf

public void setLeaf(boolean b)
DOCUMENT ME!

Parameters:
b -

getEntriesCount

public int getEntriesCount()
DOCUMENT ME!

Returns:

getEntry

public Entry getEntry(int n)
Gets the nth Element

Parameters:
n -
Returns:

getEntries

public java.util.Collection getEntries()

getBounds

public com.vividsolutions.jts.geom.Envelope getBounds()
DOCUMENT ME!

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!

Returns:
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 © GeoTools. All Rights Reserved.