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

org.deegree.io.rtree
Class PageFile

java.lang.Object
  extended by org.deegree.io.rtree.PageFile
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MemoryPageFile, PersistentPageFile

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

Abstract class implementing general methods of a PageFile.

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 capacity
          capacity of a node (= MaxLoad + 1)
protected  int dimension
          dimension of saved data
protected  int minimum
          minimum load of a node
 
Constructor Summary
PageFile()
           
 
Method Summary
protected abstract  void close()
          Closes the pagefile.
protected abstract  Node deleteNode(int pageFileNumber)
          Marks the node at given page number as deleted.
protected  int getCapacity()
          Returns the capacity of a node in the PageFile.
protected  int getDimension()
          Returns the dimension of the PageFile
protected  int getMinimum()
          Returns the minimum load of a node
protected  void initialize(int dimension, int capacity)
          Initializes the PageFile.
protected abstract  Node readNode(int pageFileNumber)
          Reads a node from the PageFile for given index
protected abstract  int writeNode(Node node)
          Writes a node into the PageFile Method tests if node has already a PageNumber, otherwise a new page number is assigned and returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dimension

protected int dimension
dimension of saved data


capacity

protected int capacity
capacity of a node (= MaxLoad + 1)


minimum

protected int minimum
minimum load of a node

Constructor Detail

PageFile

PageFile()
Method Detail

getDimension

protected int getDimension()
Returns the dimension of the PageFile

Returns:
int

getMinimum

protected int getMinimum()
Returns the minimum load of a node

Returns:
int

getCapacity

protected int getCapacity()
Returns the capacity of a node in the PageFile. Capacity is defined a maximum load of a node plus 1 for overflow

Returns:
int

readNode

protected abstract Node readNode(int pageFileNumber)
                          throws PageFileException
Reads a node from the PageFile for given index

Parameters:
pageFileNumber - - index of page file number where node is saved
Returns:
Node
Throws:
PageFileException

writeNode

protected abstract int writeNode(Node node)
                          throws PageFileException
Writes a node into the PageFile Method tests if node has already a PageNumber, otherwise a new page number is assigned and returned.

Parameters:
node - - Node to write
Returns:
int - page number
Throws:
PageFileException

deleteNode

protected abstract Node deleteNode(int pageFileNumber)
                            throws PageFileException
Marks the node at given page number as deleted.

Parameters:
pageFileNumber - - page number
Returns:
Node - deleted node
Throws:
PageFileException

initialize

protected void initialize(int dimension,
                          int capacity)
                   throws PageFileException
Initializes the PageFile.

Parameters:
dimension - - dimension of the data
capacity - - capacity of a node
Throws:
PageFileException

close

protected abstract void close()
                       throws PageFileException
Closes the pagefile.

Throws:
PageFileException

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