public abstract class RTreeIndexCoreExtension extends BaseExtension
| Modifier and Type | Field and Description |
|---|---|
static String |
COLUMN_ID
ID column name
|
static String |
COLUMN_MAX_X
Max X column name
|
static String |
COLUMN_MAX_Y
Max Y column name
|
static String |
COLUMN_MIN_X
Min X column name
|
static String |
COLUMN_MIN_Y
Min Y column name
|
protected GeoPackageCoreConnection |
connection
Connection
|
static String |
CREATE_PROPERTY
Create SQL property
|
static String |
DEFINITION
Extension definition URL
|
static String |
DROP_FORCE_PROPERTY
Drop Force SQL property
|
static String |
DROP_PROPERTY
Drop SQL property
|
static String |
EXTENSION_NAME
Extension name
|
static String |
GEOMETRY_COLUMN_SUBSTITUTE
Geometry Column substitute value
|
static String |
IS_EMPTY_FUNCTION
Is Empty Function name
|
static String |
LOAD_PROPERTY
Load SQL property
|
static String |
MAX_X_FUNCTION
Max X Function name
|
static String |
MAX_Y_FUNCTION
Max Y Function name
|
static String |
MIN_X_FUNCTION
Min X Function name
|
static String |
MIN_Y_FUNCTION
Min Y Function name
|
static String |
NAME
Name
|
static String |
PK_COLUMN_SUBSTITUTE
Primary Key Column substitute value
|
static String |
RTREE_PREFIX
RTree table and trigger name prefix
|
static String |
SQL_DIRECTORY
SQL resource directory
|
static String |
TABLE_PROPERTY
Table SQL property
|
static String |
TABLE_SUBSTITUTE
Table substitute value
|
static String |
TRIGGER_DELETE_NAME
Trigger delete name
|
static String |
TRIGGER_DROP_PROPERTY
Trigger drop name
|
static String |
TRIGGER_INSERT_NAME
Trigger Insert name
|
static String |
TRIGGER_SUBSTITUTE
Trigger substitute value
|
static String |
TRIGGER_UPDATE1_NAME
Trigger update 1 name
|
static String |
TRIGGER_UPDATE2_NAME
Trigger update 2 name
|
static String |
TRIGGER_UPDATE3_NAME
Trigger update 3 name
|
static String |
TRIGGER_UPDATE4_NAME
Trigger update 4 name
|
extensionsDao, geoPackage| Modifier | Constructor and Description |
|---|---|
protected |
RTreeIndexCoreExtension(GeoPackageCore geoPackage)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Extensions |
create(FeatureTable featureTable)
Create the RTree Index extension for the feature table.
|
Extensions |
create(String tableName,
String geometryColumnName,
String idColumnName)
Create the RTree Index extension for the feature table, geometry column,
and id column.
|
void |
createAllFunctions()
Create all connection SQL Functions for min x, max x, min y, max y, and
is empty
|
void |
createAllTriggers(FeatureTable featureTable)
Create Triggers to Maintain Spatial Index Values
|
void |
createAllTriggers(String tableName,
String geometryColumnName,
String idColumnName)
Create Triggers to Maintain Spatial Index Values
|
void |
createDeleteTrigger(String tableName,
String geometryColumnName,
String idColumnName)
Create delete trigger
|
boolean |
createFunctions()
Check if the GeoPackage has the RTree extension and create the functions
if needed
|
boolean |
createFunctions(FeatureTable featureTable)
Check if the feature table has the RTree extension and create the
functions if needed
|
boolean |
createFunctions(String tableName,
String columnName)
Check if the table and column has the RTree extension and create the
functions if needed
|
void |
createInsertTrigger(String tableName,
String geometryColumnName,
String idColumnName)
Create insert trigger
|
abstract void |
createIsEmptyFunction()
Create the is empty SQL function
|
abstract void |
createMaxXFunction()
Create the max x SQL function
|
abstract void |
createMaxYFunction()
Create the max y SQL function
|
abstract void |
createMinXFunction()
Create the min x SQL function
|
abstract void |
createMinYFunction()
Create the min y SQL function
|
void |
createRTreeIndex(FeatureTable featureTable)
Create the RTree Index Virtual Table
|
void |
createRTreeIndex(String tableName,
String geometryColumnName)
Create the RTree Index Virtual Table
|
void |
createUpdate1Trigger(String tableName,
String geometryColumnName,
String idColumnName)
Create update 1 trigger
|
void |
createUpdate2Trigger(String tableName,
String geometryColumnName,
String idColumnName)
Create update 2 trigger
|
void |
createUpdate3Trigger(String tableName,
String geometryColumnName,
String idColumnName)
Create update 3 trigger
|
void |
createUpdate4Trigger(String tableName,
String geometryColumnName,
String idColumnName)
Create update 4 trigger
|
void |
delete(FeatureTable featureTable)
Delete the RTree Index extension for the feature table.
|
void |
delete(String tableName)
Delete all RTree Index extensions for the table.
|
void |
delete(String tableName,
String geometryColumnName)
Delete the RTree Index extension for the table and geometry column.
|
void |
deleteAll()
Delete all RTree Index extensions.
|
void |
drop(FeatureTable featureTable)
Drop the the triggers and RTree table for the feature table
|
void |
drop(String tableName,
String geometryColumnName)
Drop the the triggers and RTree table for the table and geometry column
|
void |
dropAllTriggers(FeatureTable featureTable)
Drop Triggers that Maintain Spatial Index Values
|
void |
dropAllTriggers(String tableName,
String geometryColumnName)
Drop Triggers that Maintain Spatial Index Values
|
void |
dropDeleteTrigger(String tableName,
String geometryColumnName)
Drop delete trigger
|
void |
dropInsertTrigger(String tableName,
String geometryColumnName)
Drop insert trigger
|
void |
dropRTreeIndex(FeatureTable featureTable)
Drop the RTree Index Virtual Table
|
void |
dropRTreeIndex(String tableName,
String geometryColumnName)
Drop the RTree Index Virtual Table
|
void |
dropTrigger(String tableName,
String geometryColumnName,
String triggerName)
Drop the trigger for the table, geometry column, and trigger name
|
void |
dropTriggers(FeatureTable featureTable)
Check if the feature table has the RTree extension and if found, drop the
triggers
|
boolean |
dropTriggers(String tableName,
String columnName)
Check if the table and column has the RTree extension and if found, drop
the triggers
|
void |
dropUpdate1Trigger(String tableName,
String geometryColumnName)
Drop update 1 trigger
|
void |
dropUpdate2Trigger(String tableName,
String geometryColumnName)
Drop update 2 trigger
|
void |
dropUpdate3Trigger(String tableName,
String geometryColumnName)
Drop update 3 trigger
|
void |
dropUpdate4Trigger(String tableName,
String geometryColumnName)
Drop update 4 trigger
|
protected void |
executeSQL(String sql,
boolean trigger)
Execute the SQL statement
|
protected GeometryEnvelope |
getEnvelope(GeoPackageGeometryData data)
Get or build a geometry envelope from the Geometry Data
|
Extensions |
getOrCreate(FeatureTable featureTable)
Get or create the extension
|
Extensions |
getOrCreate(String tableName,
String columnName)
Get or create the extension
|
protected UserCustomTable |
getRTreeTable(FeatureTable featureTable)
Get the RTree Table
|
boolean |
has()
Determine if the GeoPackage has the extension for any table
|
boolean |
has(FeatureTable featureTable)
Determine if the GeoPackage feature table has the extension
|
boolean |
has(String tableName)
Determine if the GeoPackage table has the extension
|
boolean |
has(String tableName,
String columnName)
Determine if the GeoPackage table and column has the extension
|
void |
loadRTreeIndex(FeatureTable featureTable)
Load the RTree Spatial Index Values
|
void |
loadRTreeIndex(String tableName,
String geometryColumnName,
String idColumnName)
Load the RTree Spatial Index Values
|
get, getExtensions, getExtensions, getExtensionsDao, getGeoPackage, getOrCreate, haspublic static final String NAME
public static final String RTREE_PREFIX
public static final String MIN_X_FUNCTION
public static final String MAX_X_FUNCTION
public static final String MIN_Y_FUNCTION
public static final String MAX_Y_FUNCTION
public static final String IS_EMPTY_FUNCTION
public static final String CREATE_PROPERTY
public static final String TABLE_PROPERTY
public static final String LOAD_PROPERTY
public static final String DROP_PROPERTY
public static final String DROP_FORCE_PROPERTY
public static final String TRIGGER_INSERT_NAME
public static final String TRIGGER_UPDATE1_NAME
public static final String TRIGGER_UPDATE2_NAME
public static final String TRIGGER_UPDATE3_NAME
public static final String TRIGGER_UPDATE4_NAME
public static final String TRIGGER_DELETE_NAME
public static final String TRIGGER_DROP_PROPERTY
public static final String COLUMN_ID
public static final String COLUMN_MIN_X
public static final String COLUMN_MAX_X
public static final String COLUMN_MIN_Y
public static final String COLUMN_MAX_Y
public static final String EXTENSION_NAME
public static final String DEFINITION
public static final String TABLE_SUBSTITUTE
public static final String GEOMETRY_COLUMN_SUBSTITUTE
public static final String PK_COLUMN_SUBSTITUTE
public static final String TRIGGER_SUBSTITUTE
public static final String SQL_DIRECTORY
protected GeoPackageCoreConnection connection
protected RTreeIndexCoreExtension(GeoPackageCore geoPackage)
geoPackage - GeoPackagepublic Extensions getOrCreate(FeatureTable featureTable)
featureTable - feature tablepublic Extensions getOrCreate(String tableName, String columnName)
tableName - table namecolumnName - column namepublic boolean has(FeatureTable featureTable)
featureTable - feature tablepublic boolean has(String tableName, String columnName)
has in class BaseExtensiontableName - table namecolumnName - column namepublic boolean has(String tableName)
has in class BaseExtensiontableName - table namepublic boolean has()
public boolean createFunctions(FeatureTable featureTable)
featureTable - feature tablepublic boolean createFunctions(String tableName, String columnName)
tableName - table namecolumnName - column namepublic boolean createFunctions()
public Extensions create(FeatureTable featureTable)
featureTable - feature tablepublic Extensions create(String tableName, String geometryColumnName, String idColumnName)
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createRTreeIndex(FeatureTable featureTable)
featureTable - feature tablepublic void createRTreeIndex(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void createAllFunctions()
public abstract void createMinXFunction()
public abstract void createMaxXFunction()
public abstract void createMinYFunction()
public abstract void createMaxYFunction()
public abstract void createIsEmptyFunction()
public void loadRTreeIndex(FeatureTable featureTable)
featureTable - feature tablepublic void loadRTreeIndex(String tableName, String geometryColumnName, String idColumnName)
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createAllTriggers(FeatureTable featureTable)
featureTable - feature tablepublic void createAllTriggers(String tableName, String geometryColumnName, String idColumnName)
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createInsertTrigger(String tableName, String geometryColumnName, String idColumnName)
Conditions: Insertion of non-empty geometry Actions : Insert record into rtree
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createUpdate1Trigger(String tableName, String geometryColumnName, String idColumnName)
Conditions: Update of geometry column to non-empty geometry
No row ID change
Actions : Update record in rtree
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createUpdate2Trigger(String tableName, String geometryColumnName, String idColumnName)
Conditions: Update of geometry column to empty geometry
No row ID change
Actions : Remove record from rtree
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createUpdate3Trigger(String tableName, String geometryColumnName, String idColumnName)
Conditions: Update of any column
Row ID change
Non-empty geometry
Actions : Remove record from rtree for old <i>
Insert record into rtree for new <i>
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createUpdate4Trigger(String tableName, String geometryColumnName, String idColumnName)
Conditions: Update of any column
Row ID change
Empty geometry
Actions : Remove record from rtree for old and new <i>
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void createDeleteTrigger(String tableName, String geometryColumnName, String idColumnName)
Conditions: Row deleted Actions : Remove record from rtree for old <i>
tableName - table namegeometryColumnName - geometry column nameidColumnName - id column namepublic void delete(FeatureTable featureTable)
featureTable - feature tablepublic void delete(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void delete(String tableName)
tableName - table namepublic void deleteAll()
public void drop(FeatureTable featureTable)
featureTable - feature tablepublic void drop(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropRTreeIndex(FeatureTable featureTable)
featureTable - feature tablepublic void dropRTreeIndex(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropTriggers(FeatureTable featureTable)
featureTable - feature tablepublic boolean dropTriggers(String tableName, String columnName)
tableName - table namecolumnName - column namepublic void dropAllTriggers(FeatureTable featureTable)
featureTable - feature tablepublic void dropAllTriggers(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropInsertTrigger(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropUpdate1Trigger(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropUpdate2Trigger(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropUpdate3Trigger(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropUpdate4Trigger(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropDeleteTrigger(String tableName, String geometryColumnName)
tableName - table namegeometryColumnName - geometry column namepublic void dropTrigger(String tableName, String geometryColumnName, String triggerName)
tableName - table namegeometryColumnName - geometry column nametriggerName - trigger nameprotected void executeSQL(String sql, boolean trigger)
sql - SQL statementtrigger - true if a trigger statementprotected GeometryEnvelope getEnvelope(GeoPackageGeometryData data)
data - geometry dataprotected UserCustomTable getRTreeTable(FeatureTable featureTable)
featureTable - feature tableCopyright © 2020 National Geospatial-Intelligence Agency. All rights reserved.