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 String
CONTENTS
Contents propertystatic String
DATA_COLUMN_CONSTRAINTS
Data Column Constraints propertystatic String
DATA_COLUMNS
Data Columns propertystatic String
DIRECTORY
Directory propertystatic String
EXTENDED_RELATIONS
Extended Relations propertystatic String
EXTENSIONS
Extensions propertystatic String
GEOMETRY_COLUMNS
Geometry Columns propertystatic String
GRIDDED_COVERAGE
Tiled Gridded Coverage Data Coverage extension propertystatic String
GRIDDED_PATH
Tiled Gridded Coverage Data path propertystatic String
GRIDDED_TILE
Tiled Gridded Coverage Data Tile extension propertystatic String
METADATA
Metadata propertystatic String
METADATA_PATH
Metadata path propertystatic String
METADATA_REFERENCE
Metadata Reference propertystatic String
RELATED_PATH
Extended Relations propertystatic String
RTREE
RTree propertystatic String
SCHEMA_PATH
Schema (Data Columns) path propertystatic String
SPATIAL_REFERENCE_SYSTEM
Spatial Reference System propertystatic String
TILE_MATRIX
Tile Matrix propertystatic String
TILE_MATRIX_SET
Tile 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 int
createContents()
Create Contents tableint
createDataColumnConstraints()
Create Data Column Constraints tableint
createDataColumns()
Create Data Columns tableint
createExtendedRelations()
Create the Extended Relations tableint
createExtensions()
Create Extensions tableint
createGeometryColumns()
Create Geometry Columns tableint
createGriddedCoverage()
Create the Tiled Gridded Coverage Data Coverage extension tableint
createGriddedTile()
Create the Tiled Gridded Coverage Data Tile extension tableint
createMetadata()
Create Metadata tableint
createMetadataReference()
Create Metadata Reference tablevoid
createRequired()
Create the minimum required GeoPackage tablesint
createSpatialReferenceSystem()
Create Spatial Reference System table and views<TColumn extends UserColumn>
voidcreateTable(UserTable<TColumn> table)
Create the user defined tableint
createTileMatrix()
Create Tile Matrix tableint
createTileMatrixSet()
Create Tile Matrix Set tablevoid
dropTable(String table)
Drop the table if it existsvoid
dropView(String view)
Drop the view if it existsint
execScript()
Execute the database script nameint
execScript(String property)
Execute the database script name for the propertyint
execScript(String propertyPath, String property)
Execute the database script name for the propertyint
execSQLScript(String sqlScript)
Execute the SQL Scriptint
execSQLScript(String property, String sqlScript)
Execute the SQL ScriptString
getAuthor()
Get the table creator authorString
getName()
Get the table creator nameString
getProperty()
Get the table creator property pathstatic String
getScript(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
-
-