Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.io.rtree
Class PersistentPageFile

    java.lang.Object
      org.deegree.io.rtree.PageFile
          org.deegree.io.rtree.PersistentPageFile

All Implemented Interfaces:
  Serializable

     class PersistentPageFile

extends PageFile

A persistent implementation of a PageFile implemented based on a RandomAccesFile.

Structure of the File
-- Header --
int pageFileVersion
int dimension
int capacity = maxLoad + 1 for Overflow
int minimum
-- Body --
a sequence of page one after another with:
int typ - 1 LeafNode 2 NoneLeafNode
int place - index of entry of this node in father node
int counter - current used space in the node
int parentNode - page number of father node
int pageNumber - own page number
- for(i = 0; i < capacity; i++)
int data Entry i - page number of childnode or object ID of data entry
- always dependend on dimension = x
double pMin x.Dimension - pMin of the common HyperBoundingBox
double pMax x.Dimension - pMax of the common HyperBoundingBox
- for(i = 0; i < capacity; i++)
double pMin x.Dimension - pMin HyperBoundingBox for Entry i
double pMax x.Dimension - pMax HyperBoundingBox for Entry i
int entspr. 4 Bytes - double entspr. 8 Bytes
PageSize = (4 * (5 + capacity)) + (capacity + 1) * (dimension * 16)

Author:
  Wolfgang Baer - WBaer@gmx.de

Field Summary

Fields inherited from class org.deegree.io.rtree.PageFile
`capacity, dimension, minimum`

Constructor Summary
`protected` | `PersistentPageFile(String fileName)` Constructor

Method Summary
`protected void` | `close()` Closes the pagefile.
`protected Node` | `deleteNode(int pageNumber)` Marks the node at given page number as deleted.
`protected void` | `finalize()`
`protected void` | `initialize(int dimension, int capacity)` Initializes the PersistentPageFile.
`protected Node` | `readNode(int pageFileNumber)` Reads a node from the PageFile for given index
`protected 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 org.deegree.io.rtree.PageFile
`getCapacity, getDimension, getMinimum`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PersistentPageFile

    protected PersistentPageFile(String fileName)

  Constructor

  Parameters:
    `fileName` -

Method Detail

### initialize

    protected void initialize(int dimension,
                              int capacity)
                       throws PageFileException

  Initializes the PersistentPageFile. Overrides initialize in PageFile.

  Overrides:
    `initialize` in class `PageFile`
  Parameters:
    `dimension` - - dimension of the data
    `capacity` - - capacity of a node
  Throws:
    `PageFileException`

### readNode

    protected Node readNode(int pageFileNumber)
                     throws PageFileException

  Description copied from class: `PageFile`
  Reads a node from the PageFile for given index

  Specified by:
    `readNode` in class `PageFile`
  Parameters:
    `pageFileNumber` - - index of page file number where node is saved
  Returns:
    Node
  Throws:
    `PageFileException`
  See Also:
    `PageFile.readNode(int)`

### writeNode

    protected int writeNode(Node node)
                     throws PageFileException

  Description copied from class: `PageFile`
  Writes a node into the PageFile Method tests if node has already a PageNumber, otherwise a new page number is assigned and returned.

  Specified by:
    `writeNode` in class `PageFile`
  Parameters:
    `node` - - Node to write
  Returns:
    int - page number
  Throws:
    `PageFileException`
  See Also:
    `PageFile.writeNode(Node)`

### deleteNode

    protected Node deleteNode(int pageNumber)
                       throws PageFileException

  Description copied from class: `PageFile`
  Marks the node at given page number as deleted.

  Specified by:
    `deleteNode` in class `PageFile`
  Parameters:
    `pageNumber` - - page number
  Returns:
    Node - deleted node
  Throws:
    `PageFileException`
  See Also:
    `PageFile.deleteNode(int)`

### close

    protected void close()
                  throws PageFileException

  Description copied from class: `PageFile`
  Closes the pagefile.

  Specified by:
    `close` in class `PageFile`
  Throws:
    `PageFileException`
  See Also:
    `PageFile.close()`

### finalize

    protected void finalize()
                     throws Throwable

  Overrides:
    `finalize` in class `Object`
  Throws:
    `Throwable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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