Package mil.nga.geopackage.extension
Class Extensions
- java.lang.Object
-
- mil.nga.geopackage.extension.Extensions
-
public class Extensions extends Object
Indicates that a particular extension applies to a GeoPackage, a table in a GeoPackage or a column of a table in a GeoPackage. An application that access a GeoPackage can query the gpkg_extensions table instead of the contents of all the user data tables to determine if it has the required capabilities to read or write to tables with extensions, and to “fail fast” and return an error message if it does not.- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLUMN_COLUMN_NAMEcolumnName field namestatic StringCOLUMN_DEFINITIONdefinition field namestatic StringCOLUMN_EXTENSION_NAMEextensionName field namestatic StringCOLUMN_SCOPEscope field namestatic StringCOLUMN_TABLE_NAMEtableName field namestatic StringEXTENSION_NAME_DIVIDERDivider between extension name partsstatic StringTABLE_NAMETable name
-
Constructor Summary
Constructors Constructor Description Extensions()Default ConstructorExtensions(Extensions extensions)Copy Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringbuildExtensionName(String author, String extensionName)Build the extension name by combining the required partsStringgetAuthor()Get the author from the beginning of the extension namestatic StringgetAuthor(String extensionName)Get the author from the beginning of the extension nameStringgetColumnName()Get the column nameStringgetDefinition()Get the definitionStringgetExtensionName()Get the extension nameStringgetExtensionNameNoAuthor()Get the extension name with the author prefix removedstatic StringgetExtensionNameNoAuthor(String extensionName)Get the extension name with the author prefix removedExtensionScopeTypegetScope()Get the extension scope typeStringgetTableName()Get the table namevoidsetColumnName(String columnName)Set the column namevoidsetDefinition(String definition)Set the definitionvoidsetExtensionName(String extensionName)Set the extension namevoidsetExtensionName(String author, String extensionName)Set the extension name by combining the required partsvoidsetScope(ExtensionScopeType scope)Set the extension scope typevoidsetTableName(String tableName)Set the table name
-
-
-
Field Detail
-
EXTENSION_NAME_DIVIDER
public static final String EXTENSION_NAME_DIVIDER
Divider between extension name parts- See Also:
- Constant Field Values
-
TABLE_NAME
public static final String TABLE_NAME
Table name- See Also:
- Constant Field Values
-
COLUMN_TABLE_NAME
public static final String COLUMN_TABLE_NAME
tableName field name- See Also:
- Constant Field Values
-
COLUMN_COLUMN_NAME
public static final String COLUMN_COLUMN_NAME
columnName field name- See Also:
- Constant Field Values
-
COLUMN_EXTENSION_NAME
public static final String COLUMN_EXTENSION_NAME
extensionName field name- See Also:
- Constant Field Values
-
COLUMN_DEFINITION
public static final String COLUMN_DEFINITION
definition field name- See Also:
- Constant Field Values
-
COLUMN_SCOPE
public static final String COLUMN_SCOPE
scope field name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Extensions
public Extensions()
Default Constructor
-
Extensions
public Extensions(Extensions extensions)
Copy Constructor- Parameters:
extensions- extensions to copy- Since:
- 1.3.0
-
-
Method Detail
-
getTableName
public String getTableName()
Get the table name- Returns:
- table name
-
setTableName
public void setTableName(String tableName)
Set the table name- Parameters:
tableName- table name
-
getColumnName
public String getColumnName()
Get the column name- Returns:
- column name
-
setColumnName
public void setColumnName(String columnName)
Set the column name- Parameters:
columnName- column name
-
getExtensionName
public String getExtensionName()
Get the extension name- Returns:
- extension name
-
setExtensionName
public void setExtensionName(String extensionName)
Set the extension name- Parameters:
extensionName- extension name
-
setExtensionName
public void setExtensionName(String author, String extensionName)
Set the extension name by combining the required parts- Parameters:
author- authorextensionName- extension name
-
getAuthor
public String getAuthor()
Get the author from the beginning of the extension name- Returns:
- author
-
getExtensionNameNoAuthor
public String getExtensionNameNoAuthor()
Get the extension name with the author prefix removed- Returns:
- extension name without the author
-
getDefinition
public String getDefinition()
Get the definition- Returns:
- definition
-
setDefinition
public void setDefinition(String definition)
Set the definition- Parameters:
definition- definition
-
getScope
public ExtensionScopeType getScope()
Get the extension scope type- Returns:
- extension scope type
-
setScope
public void setScope(ExtensionScopeType scope)
Set the extension scope type- Parameters:
scope- extension scope type
-
buildExtensionName
public static String buildExtensionName(String author, String extensionName)
Build the extension name by combining the required parts- Parameters:
author- extension authorextensionName- extension name- Returns:
- extension name
- Since:
- 1.1.0
-
getAuthor
public static String getAuthor(String extensionName)
Get the author from the beginning of the extension name- Parameters:
extensionName- extension name- Returns:
- author extension author
- Since:
- 1.1.0
-
-