com.hardcode.gdbms.engine.data
Class SpatialDataSourceImpl

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.SpatialDataSourceImpl

public class SpatialDataSourceImpl
extends java.lang.Object


Constructor Summary
SpatialDataSourceImpl(SpatialDataSource t, SpatialDriver driver)
           
 
Method Summary
 void buildIndex()
           
 void clearIndex()
          Performs the pending deletions and removes the spatial index
 void deleteRow(long rowIndex, Value v)
          Deletes the geometry at the specified index.
 java.awt.geom.Rectangle2D getFullExtent()
           
 java.awt.geom.Rectangle2D getGeometryBounds(long rowIndex)
           
 int getGeometryType()
           
 void insertEmptyRow(int i)
          Inserts an empty row in the spatial index
 void insertFilledRow(Value v, int rowCountBeforeInsertion)
          Inserts a geometry at the end of the theme
 boolean isIndexed()
           
 java.util.List queryIndex(java.awt.geom.Rectangle2D rect)
          Gets a list of the indexes in the theme of those geometries affected by the rect argument
 void restoreStatus()
           
 void saveStatus()
           
 void setFieldValue(long rowIndex, Value oldGeometry, Value newGeometry)
          Changes the geometry at the specified index
 void setRecalculateExtent(boolean recalculateExtent)
           
 void undoDeletion(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpatialDataSourceImpl

public SpatialDataSourceImpl(SpatialDataSource t,
                             SpatialDriver driver)
Method Detail

getGeometryType

public int getGeometryType()
                    throws DriverException
Throws:
DriverException

getFullExtent

public java.awt.geom.Rectangle2D getFullExtent()
                                        throws DriverException
Throws:
DriverException

buildIndex

public void buildIndex()
                throws DriverException
Throws:
DriverException

saveStatus

public void saveStatus()

restoreStatus

public void restoreStatus()

clearIndex

public void clearIndex()
                throws DriverException
Performs the pending deletions and removes the spatial index

Throws:
DriverException - If a deletion fails

isIndexed

public boolean isIndexed()

insertFilledRow

public void insertFilledRow(Value v,
                            int rowCountBeforeInsertion)
                     throws DriverException
Inserts a geometry at the end of the theme

Parameters:
g - Geometry to insert
rowCountBeforeInsertion - Position of the geometry
Throws:
DriverException

deleteRow

public void deleteRow(long rowIndex,
                      Value v)
               throws DriverException
Deletes the geometry at the specified index. Geometry indexes can't change so the theme must set the geometry to null and not delete it.

Parameters:
rowIndex - index of the geometry
g - geometry to delete
Throws:
DriverException

setFieldValue

public void setFieldValue(long rowIndex,
                          Value oldGeometry,
                          Value newGeometry)
                   throws DriverException
Changes the geometry at the specified index

Parameters:
rowIndex - Index of the geometry
oldGeometry - Geometry to be replaced
newGeometry - new geometry
Throws:
DriverException

queryIndex

public java.util.List queryIndex(java.awt.geom.Rectangle2D rect)
Gets a list of the indexes in the theme of those geometries affected by the rect argument

Parameters:
rect - Query rectangle
Returns:
List Of Integer

insertEmptyRow

public void insertEmptyRow(int i)
                    throws DriverException
Inserts an empty row in the spatial index

Parameters:
i -
Throws:
DriverException

undoDeletion

public void undoDeletion(int index)

setRecalculateExtent

public void setRecalculateExtent(boolean recalculateExtent)

getGeometryBounds

public java.awt.geom.Rectangle2D getGeometryBounds(long rowIndex)
                                            throws DriverException
Throws:
DriverException


Copyright © 2005-2006 . All Rights Reserved.