deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.io.rtree
Class Node

java.lang.Object
  extended by org.deegree.io.rtree.Node
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LeafNode, NoneLeafNode

abstract class Node
extends java.lang.Object
implements java.io.Serializable

Abstract class for common implementation and definition of abstract methods for both concrete classes LeafNode and NoneLeafNode.

Version:
$Revision: 12519 $, $Date: 2008-06-25 11:37:30 +0200 (Mi, 25 Jun 2008) $
Author:
Wolfgang Baer - WBaer@gmx.de, last edited by: $Author: aschmitz $

Field Summary
protected  int counter
           
protected  PageFile file
           
protected  HyperBoundingBox[] hyperBBs
           
protected  int pageNumber
           
protected  int parentNode
           
protected  int place
           
protected  HyperBoundingBox unionMinBB
           
 
Constructor Summary
protected Node(int pageNumber, PageFile pageFile)
          Constructor.
 
Method Summary
protected abstract  java.lang.Object clone()
          Deep copy without data entries (only HyperBoundingBox objects)
protected abstract  void deleteData(int index)
          Deletes a the entry with given index from node
protected abstract  java.lang.Object getData(int index)
          Fetches the data for given index from node
protected  HyperBoundingBox getHyperBoundingBox(int index)
          Returns the HyperBoundingBox for entrie with given index.
protected  HyperBoundingBox[] getHyperBoundingBoxes()
          Returns an array of HyperBoundingBox objects of the entries of the node.
protected  int getPageNumber()
          Returns the page number of this.
protected  Node getParent()
          Returns the parent node of this.
protected  HyperBoundingBox getUnionMinBB()
          Returns the HyperBoundingBox over all Entries currently in the node
protected  int getUsedSpace()
          Currently used space in the node
protected abstract  void insertData(java.lang.Object obj, HyperBoundingBox box)
          Inserts the given data into the node
protected  boolean isRoot()
          Tests if this is the root node.
protected  void setPageNumber(int number)
          Sets the page number of this to given number
 java.lang.String toString()
          String-Representation of Node
protected  void updateNodeBoundingBox()
          Updates the HyperBoundingBox over all Entries currently in the node
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

file

protected transient PageFile file

parentNode

protected int parentNode

pageNumber

protected int pageNumber

counter

protected int counter

unionMinBB

protected HyperBoundingBox unionMinBB

hyperBBs

protected HyperBoundingBox[] hyperBBs

place

protected int place
Constructor Detail

Node

protected Node(int pageNumber,
               PageFile pageFile)
Constructor.

Parameters:
pageNumber - - number of this node in page file
pageFile - - the PageFile of this node
Method Detail

insertData

protected abstract void insertData(java.lang.Object obj,
                                   HyperBoundingBox box)
Inserts the given data into the node

Parameters:
obj - - object to insert (Typ Integer oder AbstractNode)
box - - the associated HyperBoundingBox

deleteData

protected abstract void deleteData(int index)
Deletes a the entry with given index from node

Parameters:
index - - index of entry

getData

protected abstract java.lang.Object getData(int index)
Fetches the data for given index from node

Parameters:
index - - index of data

getParent

protected Node getParent()
Returns the parent node of this.

Returns:
Node

getPageNumber

protected int getPageNumber()
Returns the page number of this.

Returns:
int

setPageNumber

protected void setPageNumber(int number)
Sets the page number of this to given number

Parameters:
number - - int

getUsedSpace

protected int getUsedSpace()
Currently used space in the node

Returns:
int

getUnionMinBB

protected HyperBoundingBox getUnionMinBB()
Returns the HyperBoundingBox over all Entries currently in the node

Returns:
HyperBoundingBox

updateNodeBoundingBox

protected void updateNodeBoundingBox()
Updates the HyperBoundingBox over all Entries currently in the node


getHyperBoundingBoxes

protected HyperBoundingBox[] getHyperBoundingBoxes()
Returns an array of HyperBoundingBox objects of the entries of the node. The array may be empty - for used place in the node see getUsedSpace.

Returns:
HyperBoundingBox[] - boxes of the entries
See Also:
getUsedSpace()

getHyperBoundingBox

protected HyperBoundingBox getHyperBoundingBox(int index)
Returns the HyperBoundingBox for entrie with given index.

Parameters:
index - - index of entry
Returns:
HyperBoundingBox

isRoot

protected boolean isRoot()
Tests if this is the root node.

Returns:
boolean

clone

protected abstract java.lang.Object clone()
Deep copy without data entries (only HyperBoundingBox objects)

Overrides:
clone in class java.lang.Object
See Also:
Object.clone()

toString

public java.lang.String toString()
String-Representation of Node

Overrides:
toString in class java.lang.Object

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org