org.geotools.index.rtree.cachefs
Class FileSystemNode

java.lang.Object
  extended byorg.geotools.index.rtree.Node
      extended byorg.geotools.index.rtree.cachefs.FileSystemNode
All Implemented Interfaces:
EntryBoundsChangeListener

public class FileSystemNode
extends Node

DOCUMENT ME!

Author:
Tommaso Nolli

Field Summary
 
Fields inherited from class org.geotools.index.rtree.Node
bounds, entries, entriesCount, isChanged, maxNodeEntries
 
Constructor Summary
FileSystemNode(Parameters params)
          DOCUMENT ME!
FileSystemNode(Parameters params, long offset)
          DOCUMENT ME!
 
Method Summary
protected  void doSave()
          Saves this Node; called from save()
 boolean equals(java.lang.Object obj)
           
protected  void finalize()
          Force this node flush
 void flush()
          Flushes this node to disk Node page structure: 1 * byte --> 1 = leaf, 2 = non leaf 1 * long --> parent offset entries len * 40 --> the entries each entry is as follow 4 * double --> the bounding box (x1, x2, y1, y2) 1 * long --> the pointer (-1 if leaf) Data pages are immediatly after leaf Node pages.
protected  Entry getEntry(Node node)
          Returns the Entry pointing the specified Node
 Node getParent()
          DOCUMENT ME!
 void setParent(Node node)
          Sets the parent of this Node
 
Methods inherited from class org.geotools.index.rtree.Node
addEntry, boundsChanged, clear, getBounds, getEntries, getEntriesCount, getEntry, isLeaf, removeEntry, save, setLeaf
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemNode

public FileSystemNode(Parameters params)
DOCUMENT ME!

Parameters:
params -

FileSystemNode

public FileSystemNode(Parameters params,
                      long offset)
               throws java.io.IOException,
                      TreeException
DOCUMENT ME!

Parameters:
params -
offset - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
TreeException - DOCUMENT ME!
Method Detail

getParent

public Node getParent()
               throws TreeException
Description copied from class: Node
DOCUMENT ME!

Specified by:
getParent in class Node
Returns:
Throws:
TreeException - DOCUMENT ME!
See Also:
org.geotools.rtree.Node#getParent()

flush

public void flush()
           throws TreeException
Flushes this node to disk
 Node page structure:
 1 * byte         --> 1 = leaf, 2 = non leaf
 1 * long         --> parent offset
 entries len * 40 --> the entries
 
 each entry is as follow
 4 * double --> the bounding box (x1, x2, y1, y2)
 1 * long   --> the pointer (-1 if leaf)
 
 Data pages are immediatly after leaf Node pages.
 
 

Throws:
TreeException - DOCUMENT ME!

doSave

protected void doSave()
               throws TreeException
Description copied from class: Node
Saves this Node; called from save()

Specified by:
doSave in class Node
Throws:
TreeException
See Also:
org.geotools.rtree.Node#save()

finalize

protected void finalize()
                 throws java.lang.Throwable
Force this node flush

Throws:
java.lang.Throwable - DOCUMENT ME!

getEntry

protected Entry getEntry(Node node)
Description copied from class: Node
Returns the Entry pointing the specified Node

Specified by:
getEntry in class Node
Parameters:
node - The Node
Returns:
The Entry
See Also:
org.geotools.rtree.Node#getEntry(org.geotools.rtree.Node)

setParent

public void setParent(Node node)
Description copied from class: Node
Sets the parent of this Node

Specified by:
setParent in class Node
Parameters:
node - The parent Node
See Also:
org.geotools.rtree.Node#setParent(org.geotools.rtree.Node)

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)


Copyright © GeoTools. All Rights Reserved.