org.deegree_impl.io.shpapi
Class DBaseIndex.Page

java.lang.Object
  extended byorg.deegree_impl.io.shpapi.DBaseIndex.Page
Enclosing class:
DBaseIndex

private class DBaseIndex.Page
extends java.lang.Object

Inner class for the pages


Field Summary
(package private)  DBaseIndex.KeyEntry[] entries
           
(package private)  int lastLower
           
(package private)  int number
           
(package private)  boolean onStoreList
           
(package private)  int validEntries
           
 
Constructor Summary
(package private) DBaseIndex.Page()
          This constructor is only used by newPage(), it creates an empty page
(package private) DBaseIndex.Page(int number)
          This constructor is only used by getPage(), it loads a page from the file
 
Method Summary
(package private)  void addKey(java.lang.Comparable key, int record, java.util.Stack searchStack)
          Add a key to this page, only for leaf nodes
(package private)  void addNode(java.lang.Comparable key, int left, int right, java.util.Stack searchStack)
          Add a node to this page, this method is only called if page is non-leaf page
(package private)  int getDepth()
          Calculate the depth for this page
(package private)  int search(java.lang.Comparable key, java.util.Stack searchStack)
          Search in this page (and lower pages)
(package private)  java.util.ArrayList searchDup(java.lang.Comparable key)
          Search in this page (and lower pages), duplicates allowed
(package private)  int searchDupPos(java.lang.Comparable key, java.util.Stack searchStack)
          Find the insert position for a key
(package private)  void store()
          This method is called if saving is needed
 java.lang.String toString()
          Convert the page to a string (for debugging)
(package private)  void write()
          Write the page to disk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

number

int number

validEntries

int validEntries

lastLower

int lastLower

entries

DBaseIndex.KeyEntry[] entries

onStoreList

boolean onStoreList
Constructor Detail

DBaseIndex.Page

DBaseIndex.Page()
This constructor is only used by newPage(), it creates an empty page


DBaseIndex.Page

DBaseIndex.Page(int number)
          throws java.io.IOException
This constructor is only used by getPage(), it loads a page from the file

Method Detail

write

void write()
     throws java.io.IOException
Write the page to disk

Throws:
java.io.IOException

store

void store()
     throws java.io.IOException
This method is called if saving is needed

Throws:
java.io.IOException

search

int search(java.lang.Comparable key,
           java.util.Stack searchStack)
     throws java.io.IOException
Search in this page (and lower pages)

Throws:
java.io.IOException

searchDup

java.util.ArrayList searchDup(java.lang.Comparable key)
                        throws java.io.IOException
Search in this page (and lower pages), duplicates allowed

Throws:
java.io.IOException

searchDupPos

int searchDupPos(java.lang.Comparable key,
                 java.util.Stack searchStack)
           throws java.io.IOException
Find the insert position for a key

Throws:
java.io.IOException

addNode

void addNode(java.lang.Comparable key,
             int left,
             int right,
             java.util.Stack searchStack)
       throws java.io.IOException
Add a node to this page, this method is only called if page is non-leaf page

Throws:
java.io.IOException

addKey

void addKey(java.lang.Comparable key,
            int record,
            java.util.Stack searchStack)
      throws java.io.IOException
Add a key to this page, only for leaf nodes

Throws:
java.io.IOException

getDepth

int getDepth()
       throws java.io.IOException
Calculate the depth for this page

Throws:
java.io.IOException

toString

public java.lang.String toString()
Convert the page to a string (for debugging)