|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.io.rtree.PageFile org.deegree.io.rtree.PersistentPageFile
class PersistentPageFile
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)
Field Summary |
---|
Fields inherited from class org.deegree.io.rtree.PageFile |
---|
capacity, dimension, minimum |
Constructor Summary | |
---|---|
protected |
PersistentPageFile(java.lang.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 |
---|
protected PersistentPageFile(java.lang.String fileName)
fileName
- Method Detail |
---|
protected void initialize(int dimension, int capacity) throws PageFileException
initialize
in class PageFile
dimension
- -
dimension of the datacapacity
- -
capacity of a node
PageFileException
protected Node readNode(int pageFileNumber) throws PageFileException
PageFile
readNode
in class PageFile
pageFileNumber
- -
index of page file number where node is saved
PageFileException
PageFile.readNode(int)
protected int writeNode(Node node) throws PageFileException
PageFile
writeNode
in class PageFile
node
- -
Node to write
PageFileException
PageFile.writeNode(Node)
protected Node deleteNode(int pageNumber) throws PageFileException
PageFile
deleteNode
in class PageFile
pageNumber
- -
page number
PageFileException
PageFile.deleteNode(int)
protected void close() throws PageFileException
PageFile
close
in class PageFile
PageFileException
PageFile.close()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
deegree 2.5 (2011/06/29 09:44 build-8-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