Package mil.nga.geopackage.db
Class GeoPackageTableCreator
- java.lang.Object
-
- mil.nga.geopackage.db.GeoPackageTableCreator
-
- Direct Known Subclasses:
ContentsIdTableCreator,FeatureTileLinkTableCreator,GeometryIndexTableCreator,PortrayalTableCreator,TileMatrixSetTableCreator,TileScalingTableCreator,VectorTilesTableCreator
public class GeoPackageTableCreator extends Object
Executes database scripts to create GeoPackage tables- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENTSContents propertystatic StringDATA_COLUMN_CONSTRAINTSData Column Constraints propertystatic StringDATA_COLUMNSData Columns propertystatic StringDIRECTORYDirectory propertystatic StringEXTENDED_RELATIONSExtended Relations propertystatic StringEXTENSIONSExtensions propertystatic StringGEOMETRY_COLUMNSGeometry Columns propertystatic StringGRIDDED_COVERAGETiled Gridded Coverage Data Coverage extension propertystatic StringGRIDDED_PATHTiled Gridded Coverage Data path propertystatic StringGRIDDED_TILETiled Gridded Coverage Data Tile extension propertystatic StringMETADATAMetadata propertystatic StringMETADATA_PATHMetadata path propertystatic StringMETADATA_REFERENCEMetadata Reference propertystatic StringRELATED_PATHExtended Relations propertystatic StringRTREERTree propertystatic StringSCHEMA_PATHSchema (Data Columns) path propertystatic StringSPATIAL_REFERENCE_SYSTEMSpatial Reference System propertystatic StringTILE_MATRIXTile Matrix propertystatic StringTILE_MATRIX_SETTile Matrix Set property
-
Constructor Summary
Constructors Constructor Description GeoPackageTableCreator(GeoPackageCoreConnection db)ConstructorGeoPackageTableCreator(GeoPackageCore geoPackage)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcreateContents()Create Contents tableintcreateDataColumnConstraints()Create Data Column Constraints tableintcreateDataColumns()Create Data Columns tableintcreateExtendedRelations()Create the Extended Relations tableintcreateExtensions()Create Extensions tableintcreateGeometryColumns()Create Geometry Columns tableintcreateGriddedCoverage()Create the Tiled Gridded Coverage Data Coverage extension tableintcreateGriddedTile()Create the Tiled Gridded Coverage Data Tile extension tableintcreateMetadata()Create Metadata tableintcreateMetadataReference()Create Metadata Reference tablevoidcreateRequired()Create the minimum required GeoPackage tablesintcreateSpatialReferenceSystem()Create Spatial Reference System table and views<TColumn extends UserColumn>
voidcreateTable(UserTable<TColumn> table)Create the user defined tableintcreateTileMatrix()Create Tile Matrix tableintcreateTileMatrixSet()Create Tile Matrix Set tablevoiddropTable(String table)Drop the table if it existsvoiddropView(String view)Drop the view if it existsintexecScript()Execute the database script nameintexecScript(String property)Execute the database script name for the propertyintexecScript(String propertyPath, String property)Execute the database script name for the propertyintexecSQLScript(String sqlScript)Execute the SQL ScriptintexecSQLScript(String property, String sqlScript)Execute the SQL ScriptStringgetAuthor()Get the table creator authorStringgetName()Get the table creator nameStringgetProperty()Get the table creator property pathstatic StringgetScript(String property)Get the database script name for the propertystatic List<String>readScript(String property)Read the SQL Script and parse the statements for the propertystatic List<String>readScript(String pathProperty, String property)Read the SQL Script and parse the statements for the propertystatic List<String>readSQLScript(String sqlScript)Read the SQL Script and parse the statementsstatic List<String>readSQLScript(String property, String sqlScript)Read the SQL Script and parse the statements
-
-
-
Field Detail
-
DIRECTORY
public static final String DIRECTORY
Directory property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
SPATIAL_REFERENCE_SYSTEM
public static final String SPATIAL_REFERENCE_SYSTEM
Spatial Reference System property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
CONTENTS
public static final String CONTENTS
Contents property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
GEOMETRY_COLUMNS
public static final String GEOMETRY_COLUMNS
Geometry Columns property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
TILE_MATRIX_SET
public static final String TILE_MATRIX_SET
Tile Matrix Set property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
TILE_MATRIX
public static final String TILE_MATRIX
Tile Matrix property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
EXTENSIONS
public static final String EXTENSIONS
Extensions property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
SCHEMA_PATH
public static final String SCHEMA_PATH
Schema (Data Columns) path property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
DATA_COLUMNS
public static final String DATA_COLUMNS
Data Columns property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
DATA_COLUMN_CONSTRAINTS
public static final String DATA_COLUMN_CONSTRAINTS
Data Column Constraints property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
METADATA_PATH
public static final String METADATA_PATH
Metadata path property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
METADATA
public static final String METADATA
Metadata property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
METADATA_REFERENCE
public static final String METADATA_REFERENCE
Metadata Reference property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
GRIDDED_PATH
public static final String GRIDDED_PATH
Tiled Gridded Coverage Data path property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
GRIDDED_COVERAGE
public static final String GRIDDED_COVERAGE
Tiled Gridded Coverage Data Coverage extension property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
GRIDDED_TILE
public static final String GRIDDED_TILE
Tiled Gridded Coverage Data Tile extension property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
RELATED_PATH
public static final String RELATED_PATH
Extended Relations property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
EXTENDED_RELATIONS
public static final String EXTENDED_RELATIONS
Extended Relations property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
RTREE
public static final String RTREE
RTree property- Since:
- 4.0.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GeoPackageTableCreator
public GeoPackageTableCreator(GeoPackageCoreConnection db)
Constructor- Parameters:
db- db connection
-
GeoPackageTableCreator
public GeoPackageTableCreator(GeoPackageCore geoPackage)
Constructor- Parameters:
geoPackage- GeoPackage- Since:
- 4.0.0
-
-
Method Detail
-
getScript
public static String getScript(String property)
Get the database script name for the property- Parameters:
property- property name- Returns:
- script name
- Since:
- 3.3.0
-
readScript
public static List<String> readScript(String property)
Read the SQL Script and parse the statements for the property- Parameters:
property- property name- Returns:
- statements
- Since:
- 4.0.0
-
readScript
public static List<String> readScript(String pathProperty, String property)
Read the SQL Script and parse the statements for the property- Parameters:
pathProperty- path propertyproperty- property name- Returns:
- statements
- Since:
- 4.0.0
-
readSQLScript
public static List<String> readSQLScript(String sqlScript)
Read the SQL Script and parse the statements- Parameters:
sqlScript- SQL script property file name- Returns:
- statements
- Since:
- 3.3.0
-
readSQLScript
public static List<String> readSQLScript(String property, String sqlScript)
Read the SQL Script and parse the statements- Parameters:
property- path propertysqlScript- SQL script property file name- Returns:
- statements
- Since:
- 4.0.0
-
createSpatialReferenceSystem
public int createSpatialReferenceSystem()
Create Spatial Reference System table and views- Returns:
- executed statements
-
createContents
public int createContents()
Create Contents table- Returns:
- executed statements
-
createGeometryColumns
public int createGeometryColumns()
Create Geometry Columns table- Returns:
- executed statements
-
createTileMatrixSet
public int createTileMatrixSet()
Create Tile Matrix Set table- Returns:
- executed statements
-
createTileMatrix
public int createTileMatrix()
Create Tile Matrix table- Returns:
- executed statements
-
createExtensions
public int createExtensions()
Create Extensions table- Returns:
- executed statements
-
createDataColumns
public int createDataColumns()
Create Data Columns table- Returns:
- executed statements
-
createDataColumnConstraints
public int createDataColumnConstraints()
Create Data Column Constraints table- Returns:
- executed statements
-
createMetadata
public int createMetadata()
Create Metadata table- Returns:
- executed statements
-
createMetadataReference
public int createMetadataReference()
Create Metadata Reference table- Returns:
- executed statements
-
createGriddedCoverage
public int createGriddedCoverage()
Create the Tiled Gridded Coverage Data Coverage extension table- Returns:
- executed statements
- Since:
- 1.2.1
-
createGriddedTile
public int createGriddedTile()
Create the Tiled Gridded Coverage Data Tile extension table- Returns:
- executed statements
- Since:
- 1.2.1
-
createExtendedRelations
public int createExtendedRelations()
Create the Extended Relations table- Returns:
- executed statements
- Since:
- 3.0.1
-
execScript
public int execScript()
Execute the database script name- Returns:
- executed statements
- Since:
- 4.0.0
-
execScript
public int execScript(String property)
Execute the database script name for the property- Parameters:
property- property name- Returns:
- executed statements
- Since:
- 4.0.0
-
execScript
public int execScript(String propertyPath, String property)
Execute the database script name for the property- Parameters:
propertyPath- table creator property pathproperty- property name- Returns:
- executed statements
- Since:
- 4.0.0
-
execSQLScript
public int execSQLScript(String sqlScript)
Execute the SQL Script- Parameters:
sqlScript- SQL script property file name- Returns:
- executed statements
- Since:
- 3.3.0
-
execSQLScript
public int execSQLScript(String property, String sqlScript)
Execute the SQL Script- Parameters:
property- table creator property pathsqlScript- SQL script property file name- Returns:
- executed statements
- Since:
- 4.0.0
-
getProperty
public String getProperty()
Get the table creator property path- Returns:
- property path or null
- Since:
- 4.0.0
-
getAuthor
public String getAuthor()
Get the table creator author- Returns:
- author or null
- Since:
- 4.0.0
-
getName
public String getName()
Get the table creator name- Returns:
- name or null
- Since:
- 4.0.0
-
createTable
public <TColumn extends UserColumn> void createTable(UserTable<TColumn> table)
Create the user defined table- Type Parameters:
TColumn- column type- Parameters:
table- user table
-
createRequired
public void createRequired()
Create the minimum required GeoPackage tables
-
dropTable
public void dropTable(String table)
Drop the table if it exists- Parameters:
table- table name- Since:
- 1.1.5
-
dropView
public void dropView(String view)
Drop the view if it exists- Parameters:
view- view name- Since:
- 4.0.0
-
-