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 String
COLUMN_COLUMN_NAME
columnName field namestatic String
COLUMN_DEFINITION
definition field namestatic String
COLUMN_EXTENSION_NAME
extensionName field namestatic String
COLUMN_SCOPE
scope field namestatic String
COLUMN_TABLE_NAME
tableName field namestatic String
EXTENSION_NAME_DIVIDER
Divider between extension name partsstatic String
TABLE_NAME
Table 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 String
buildExtensionName(String author, String extensionName)
Build the extension name by combining the required partsString
getAuthor()
Get the author from the beginning of the extension namestatic String
getAuthor(String extensionName)
Get the author from the beginning of the extension nameString
getColumnName()
Get the column nameString
getDefinition()
Get the definitionString
getExtensionName()
Get the extension nameString
getExtensionNameNoAuthor()
Get the extension name with the author prefix removedstatic String
getExtensionNameNoAuthor(String extensionName)
Get the extension name with the author prefix removedExtensionScopeType
getScope()
Get the extension scope typeString
getTableName()
Get the table namevoid
setColumnName(String columnName)
Set the column namevoid
setDefinition(String definition)
Set the definitionvoid
setExtensionName(String extensionName)
Set the extension namevoid
setExtensionName(String author, String extensionName)
Set the extension name by combining the required partsvoid
setScope(ExtensionScopeType scope)
Set the extension scope typevoid
setTableName(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
-
-