Class MediaTable
- java.lang.Object
-
- mil.nga.geopackage.user.UserTable<UserCustomColumn>
-
- mil.nga.geopackage.user.custom.UserCustomTable
-
- mil.nga.geopackage.extension.related.UserRelatedTable
-
- mil.nga.geopackage.extension.related.media.MediaTable
-
- Direct Known Subclasses:
IconTable
public class MediaTable extends UserRelatedTable
Media Requirements Class User-Defined Related Data Table- Since:
- 3.0.1
- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLUMN_CONTENT_TYPE
Mime-type of data column namestatic String
COLUMN_DATA
Multimedia content column namestatic RelationType
RELATION_TYPE
User-Defined Media Table relation name-
Fields inherited from class mil.nga.geopackage.user.UserTable
DEFAULT_AUTOINCREMENT, DEFAULT_PK_NOT_NULL
-
-
Constructor Summary
Constructors Constructor Description MediaTable(String tableName, List<UserCustomColumn> columns)
ConstructorMediaTable(String tableName, List<UserCustomColumn> columns, String idColumnName)
ConstructorMediaTable(UserCustomTable table)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediaTable
create(MediaTableMetadata metadata)
Create a media table with the metadatastatic UserCustomColumn
createContentTypeColumn()
Create a content type columnstatic UserCustomColumn
createContentTypeColumn(int index)
Create a content type columnstatic UserCustomColumn
createDataColumn()
Create a data columnstatic UserCustomColumn
createDataColumn(int index)
Create a data columnstatic UserCustomColumn
createIdColumn(int index, String idColumnName)
Create the primary key id columnstatic UserCustomColumn
createIdColumn(int index, String idColumnName, boolean autoincrement)
Create the primary key id columnstatic UserCustomColumn
createIdColumn(String idColumnName)
Create the primary key id columnstatic UserCustomColumn
createIdColumn(String idColumnName, boolean autoincrement)
Create the primary key id columnstatic List<UserCustomColumn>
createRequiredColumns()
Create the required table columnsstatic List<UserCustomColumn>
createRequiredColumns(boolean autoincrement)
Create the required table columnsstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex)
Create the required table columns, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex, boolean autoincrement)
Create the required table columns, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex, String idColumnName)
Create the required table columns with id column name, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex, String idColumnName, boolean autoincrement)
Create the required table columns with id column name, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(String idColumnName)
Create the required table columns with the id column namestatic List<UserCustomColumn>
createRequiredColumns(String idColumnName, boolean autoincrement)
Create the required table columns with the id column nameUserCustomColumn
getContentTypeColumn()
Get the content type columnint
getContentTypeColumnIndex()
Get the content type column indexUserCustomColumn
getDataColumn()
Get the data columnint
getDataColumnIndex()
Get the data column indexUserCustomColumn
getIdColumn()
Get the id columnint
getIdColumnIndex()
Get the id column indexstatic int
numRequiredColumns()
Get the number of required columnsstatic List<String>
requiredColumns()
Get the required columnsstatic List<String>
requiredColumns(String idColumnName)
Get the required columns-
Methods inherited from class mil.nga.geopackage.extension.related.UserRelatedTable
getDataType, getRelationName, validateContents
-
Methods inherited from class mil.nga.geopackage.user.custom.UserCustomTable
copy, createUserColumns, getRequiredColumns, getUserColumns
-
Methods inherited from class mil.nga.geopackage.user.UserTable
addColumn, addConstraint, addConstraints, addConstraints, alterColumn, clearConstraints, clearConstraints, columnCount, columnsOfType, createUserColumns, dropColumn, dropColumn, dropColumn, getColumn, getColumn, getColumnIndex, getColumnName, getColumnNames, getColumns, getColumns, getConstraints, getConstraints, getContents, getDataType, getPkColumn, getPkColumnIndex, getPkColumnName, getTableName, hasColumn, hasConstraints, hasConstraints, hasPkColumn, hasSchema, isPkModifiable, isValueValidation, renameColumn, renameColumn, renameColumn, setContents, setPkModifiable, setTableName, setValueValidation
-
-
-
-
Field Detail
-
RELATION_TYPE
public static final RelationType RELATION_TYPE
User-Defined Media Table relation name
-
COLUMN_DATA
public static final String COLUMN_DATA
Multimedia content column name- See Also:
- Constant Field Values
-
COLUMN_CONTENT_TYPE
public static final String COLUMN_CONTENT_TYPE
Mime-type of data column name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MediaTable
public MediaTable(String tableName, List<UserCustomColumn> columns)
Constructor- Parameters:
tableName
- table namecolumns
- list of columns
-
MediaTable
public MediaTable(String tableName, List<UserCustomColumn> columns, String idColumnName)
Constructor- Parameters:
tableName
- table namecolumns
- list of columnsidColumnName
- id column name
-
MediaTable
public MediaTable(UserCustomTable table)
Constructor- Parameters:
table
- user custom table
-
-
Method Detail
-
create
public static MediaTable create(MediaTableMetadata metadata)
Create a media table with the metadata- Parameters:
metadata
- media table metadata- Returns:
- media table
- Since:
- 4.0.0
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns()
Create the required table columns- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(boolean autoincrement)
Create the required table columns- Parameters:
autoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(String idColumnName)
Create the required table columns with the id column name- Parameters:
idColumnName
- id column name- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(String idColumnName, boolean autoincrement)
Create the required table columns with the id column name- Parameters:
idColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex)
Create the required table columns, starting at the provided index- Parameters:
startingIndex
- starting index- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex, boolean autoincrement)
Create the required table columns, starting at the provided index- Parameters:
startingIndex
- starting indexautoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex, String idColumnName)
Create the required table columns with id column name, starting at the provided index- Parameters:
startingIndex
- starting indexidColumnName
- id column name- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex, String idColumnName, boolean autoincrement)
Create the required table columns with id column name, starting at the provided index- Parameters:
startingIndex
- starting indexidColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
createIdColumn
public static UserCustomColumn createIdColumn(String idColumnName)
Create the primary key id column- Parameters:
idColumnName
- id column name- Returns:
- id column
- Since:
- 3.3.0
-
createIdColumn
public static UserCustomColumn createIdColumn(String idColumnName, boolean autoincrement)
Create the primary key id column- Parameters:
idColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- id column
- Since:
- 4.0.0
-
createIdColumn
public static UserCustomColumn createIdColumn(int index, String idColumnName)
Create the primary key id column- Parameters:
index
- column indexidColumnName
- id column name- Returns:
- id column
-
createIdColumn
public static UserCustomColumn createIdColumn(int index, String idColumnName, boolean autoincrement)
Create the primary key id column- Parameters:
index
- column indexidColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- id column
- Since:
- 4.0.0
-
createDataColumn
public static UserCustomColumn createDataColumn()
Create a data column- Returns:
- data column
- Since:
- 3.3.0
-
createDataColumn
public static UserCustomColumn createDataColumn(int index)
Create a data column- Parameters:
index
- column index- Returns:
- data column
-
createContentTypeColumn
public static UserCustomColumn createContentTypeColumn()
Create a content type column- Returns:
- content type column
- Since:
- 3.3.0
-
createContentTypeColumn
public static UserCustomColumn createContentTypeColumn(int index)
Create a content type column- Parameters:
index
- column index- Returns:
- content type column
-
numRequiredColumns
public static int numRequiredColumns()
Get the number of required columns- Returns:
- required columns count
-
requiredColumns
public static List<String> requiredColumns()
Get the required columns- Returns:
- required columns
-
requiredColumns
public static List<String> requiredColumns(String idColumnName)
Get the required columns- Parameters:
idColumnName
- id column name- Returns:
- required columns
-
getIdColumnIndex
public int getIdColumnIndex()
Get the id column index- Returns:
- id column index
-
getIdColumn
public UserCustomColumn getIdColumn()
Get the id column- Returns:
- id column
-
getDataColumnIndex
public int getDataColumnIndex()
Get the data column index- Returns:
- data column index
-
getDataColumn
public UserCustomColumn getDataColumn()
Get the data column- Returns:
- data column
-
getContentTypeColumnIndex
public int getContentTypeColumnIndex()
Get the content type column index- Returns:
- content type column index
-
getContentTypeColumn
public UserCustomColumn getContentTypeColumn()
Get the content type column- Returns:
- content type column
-
-