deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.io.quadtree
Class DBQuadtree

java.lang.Object
  extended by org.deegree.io.quadtree.DBQuadtree
All Implemented Interfaces:
Quadtree

public class DBQuadtree
extends Object
implements Quadtree

Since:
2.0
Version:
$Revision: 6812 $, 1.0. $Revision: 6812 $, $Date: 2007-05-04 15:35:27 +0200 (Fr, 04 Mai 2007) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
DBQuadtree(int id, String indexName, JDBCConnection jdbc)
          initializes a quadtree already existing in a database
DBQuadtree(int id, String indexName, JDBCConnection jdbc, double accuracyX, double accuracyY)
          initializes a quadtree already existing in a database
 
Method Summary
(package private)  void addToCache(Node node)
           
 void deleteItem(Object item)
          deletes a specific item from the tree (not the item itself will be deleted, just its reference will be)
 void deleteRange(Envelope envelope)
          deletes all references of items whose envelope intersects with the passed one (
 int getDepth()
           
(package private)  Node getFromCache(String id)
           
 Envelope getRootBoundingBox()
          returns the bounding box covered by the quadtrees root node
 void insert(Object item, Envelope envelope)
          inserts a new item into the quadtree
 void insert(Object item, Point point)
          inserts a new item into the quadtree
 List<Object> query(Envelope envelope)
          returns a List containing all items whose envelope intersects with the passed one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBQuadtree

public DBQuadtree(int id,
                  String indexName,
                  JDBCConnection jdbc)
           throws IndexException
initializes a quadtree already existing in a database

Parameters:
id -
indexName - this name will be used to create the table that stores the nodes of a specific quadtree
jdbc - description of database connection
Throws:
IndexException

DBQuadtree

public DBQuadtree(int id,
                  String indexName,
                  JDBCConnection jdbc,
                  double accuracyX,
                  double accuracyY)
           throws IndexException
initializes a quadtree already existing in a database

Parameters:
id -
indexName - this name will be used to create the table that stores the nodes of a specific quadtree
jdbc - description of database connection
accuracyX -
accuracyY -
Throws:
IndexException
Method Detail

getFromCache

Node getFromCache(String id)
Parameters:
id -
Returns:
node

addToCache

void addToCache(Node node)
Parameters:
node -

insert

public void insert(Object item,
                   Envelope envelope)
            throws IndexException
Description copied from interface: Quadtree
inserts a new item into the quadtree

Specified by:
insert in interface Quadtree
Throws:
IndexException

insert

public void insert(Object item,
                   Point point)
            throws IndexException
Description copied from interface: Quadtree
inserts a new item into the quadtree

Specified by:
insert in interface Quadtree
Parameters:
item -
point -
Throws:
IndexException

query

public List<Object> query(Envelope envelope)
                   throws IndexException
Description copied from interface: Quadtree
returns a List containing all items whose envelope intersects with the passed one

Specified by:
query in interface Quadtree
Returns:
a List containing all items whose envelope intersects with the passed one
Throws:
IndexException

deleteItem

public void deleteItem(Object item)
Description copied from interface: Quadtree
deletes a specific item from the tree (not the item itself will be deleted, just its reference will be)

Specified by:
deleteItem in interface Quadtree

deleteRange

public void deleteRange(Envelope envelope)
Description copied from interface: Quadtree
deletes all references of items whose envelope intersects with the passed one (

Specified by:
deleteRange in interface Quadtree
See Also:
)

getDepth

public int getDepth()
Specified by:
getDepth in interface Quadtree
Returns:

getRootBoundingBox

public Envelope getRootBoundingBox()
                            throws IndexException
Description copied from interface: Quadtree
returns the bounding box covered by the quadtrees root node

Specified by:
getRootBoundingBox in interface Quadtree
Returns:
the bounding box covered by the quadtrees root node
Throws:
IndexException

deegree 2.1 (2007/11/08 09:57 build-328-official)

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