Package mil.nga.geopackage.features.user
Class FeatureColumn
- java.lang.Object
-
- mil.nga.geopackage.user.UserColumn
-
- mil.nga.geopackage.features.user.FeatureColumn
-
- All Implemented Interfaces:
Comparable<UserColumn>
public class FeatureColumn extends UserColumn
Feature column- Author:
- osbornb
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.user.UserColumn
AUTOINCREMENT_CONSTRAINT_ORDER, DEFAULT_VALUE_CONSTRAINT_ORDER, NO_INDEX, NOT_NULL_CONSTRAINT_ORDER, PRIMARY_KEY_CONSTRAINT_ORDER, UNIQUE_CONSTRAINT_ORDER
-
-
Constructor Summary
Constructors Constructor Description FeatureColumn(FeatureColumn featureColumn)
Copy Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureColumn
copy()
Copy the columnstatic FeatureColumn
createColumn(int index, String name, GeoPackageDataType type)
Create a new columnstatic FeatureColumn
createColumn(int index, String name, GeoPackageDataType type, boolean notNull)
Create a new columnstatic FeatureColumn
createColumn(int index, String name, GeoPackageDataType type, boolean notNull, Object defaultValue)
Create a new columnstatic FeatureColumn
createColumn(int index, String name, GeoPackageDataType type, Long max)
Create a new columnstatic FeatureColumn
createColumn(int index, String name, GeoPackageDataType type, Long max, boolean notNull, Object defaultValue)
Create a new columnstatic FeatureColumn
createColumn(String name, GeoPackageDataType type)
Create a new columnstatic FeatureColumn
createColumn(String name, GeoPackageDataType type, boolean notNull)
Create a new columnstatic FeatureColumn
createColumn(String name, GeoPackageDataType type, boolean notNull, Object defaultValue)
Create a new columnstatic FeatureColumn
createColumn(String name, GeoPackageDataType type, Long max)
Create a new columnstatic FeatureColumn
createColumn(String name, GeoPackageDataType type, Long max, boolean notNull, Object defaultValue)
Create a new columnstatic FeatureColumn
createColumn(TableColumn tableColumn)
Create a new columnstatic FeatureColumn
createGeometryColumn(int index, String name, GeometryType type)
Create a new geometry columnstatic FeatureColumn
createGeometryColumn(int index, String name, GeometryType type, boolean notNull, Object defaultValue)
Create a new geometry columnstatic FeatureColumn
createGeometryColumn(String name, GeometryType type)
Create a new geometry columnstatic FeatureColumn
createGeometryColumn(String name, GeometryType type, boolean notNull, Object defaultValue)
Create a new geometry columnstatic FeatureColumn
createPrimaryKeyColumn(int index, String name)
Create a new primary key columnstatic FeatureColumn
createPrimaryKeyColumn(int index, String name, boolean autoincrement)
Create a new primary key columnstatic FeatureColumn
createPrimaryKeyColumn(String name)
Create a new primary key columnstatic FeatureColumn
createPrimaryKeyColumn(String name, boolean autoincrement)
Create a new primary key columnGeometryType
getGeometryType()
When a geometry column, gets the geometry typeprotected static String
getTypeName(String name, GeoPackageDataType dataType, GeometryType geometryType)
Get the type name from the data and geometry typeboolean
isGeometry()
Determine if this column is a geometryprotected void
setGeometryType(GeometryType geometryType)
Set the geometry type-
Methods inherited from class mil.nga.geopackage.user.UserColumn
addAutoincrementConstraint, addConstraint, addConstraint, addConstraint, addConstraint, addConstraints, addConstraints, addConstraints, addDefaultConstraints, addDefaultValueConstraint, addNotNullConstraint, addPrimaryKeyConstraint, addUniqueConstraint, buildConstraintSql, clearConstraints, clearConstraints, clearConstraints, compareTo, getConstraints, getConstraints, getDataType, getDefaultValue, getIndex, getMax, getName, getSchema, getType, getTypeName, hasConstraints, hasConstraints, hasDefaultValue, hasIndex, hasMax, hasSchema, isAutoincrement, isNamed, isNotNull, isPrimaryKey, isUnique, removeAutoincrementConstraint, removeDefaultValueConstraint, removeNotNullConstraint, removePrimaryKeyConstraint, removeUniqueConstraint, resetIndex, setAutoincrement, setConstraintOrder, setDataType, setDefaultValue, setIndex, setMax, setName, setNotNull, setPrimaryKey, setSchema, setType, setUnique, validateDataType
-
-
-
-
Constructor Detail
-
FeatureColumn
public FeatureColumn(FeatureColumn featureColumn)
Copy Constructor- Parameters:
featureColumn
- feature column- Since:
- 3.3.0
-
-
Method Detail
-
createPrimaryKeyColumn
public static FeatureColumn createPrimaryKeyColumn(String name)
Create a new primary key column- Parameters:
name
- name- Returns:
- feature column
- Since:
- 3.3.0
-
createPrimaryKeyColumn
public static FeatureColumn createPrimaryKeyColumn(String name, boolean autoincrement)
Create a new primary key column- Parameters:
name
- nameautoincrement
- autoincrement flag- Returns:
- feature column
- Since:
- 4.0.0
-
createPrimaryKeyColumn
public static FeatureColumn createPrimaryKeyColumn(int index, String name)
Create a new primary key column- Parameters:
index
- indexname
- name- Returns:
- feature column
-
createPrimaryKeyColumn
public static FeatureColumn createPrimaryKeyColumn(int index, String name, boolean autoincrement)
Create a new primary key column- Parameters:
index
- indexname
- nameautoincrement
- autoincrement flag- Returns:
- feature column
- Since:
- 4.0.0
-
createGeometryColumn
public static FeatureColumn createGeometryColumn(String name, GeometryType type)
Create a new geometry column- Parameters:
name
- nametype
- geometry type- Returns:
- feature column
- Since:
- 3.3.0
-
createGeometryColumn
public static FeatureColumn createGeometryColumn(int index, String name, GeometryType type)
Create a new geometry column- Parameters:
index
- indexname
- nametype
- geometry type- Returns:
- feature column
- Since:
- 3.3.0
-
createGeometryColumn
public static FeatureColumn createGeometryColumn(String name, GeometryType type, boolean notNull, Object defaultValue)
Create a new geometry column- Parameters:
name
- nametype
- geometry typenotNull
- not null flagdefaultValue
- default value- Returns:
- feature column
- Since:
- 3.3.0
-
createGeometryColumn
public static FeatureColumn createGeometryColumn(int index, String name, GeometryType type, boolean notNull, Object defaultValue)
Create a new geometry column- Parameters:
index
- indexname
- nametype
- geometry typenotNull
- not null flagdefaultValue
- default value- Returns:
- feature column
-
createColumn
public static FeatureColumn createColumn(String name, GeoPackageDataType type)
Create a new column- Parameters:
name
- nametype
- data type- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(int index, String name, GeoPackageDataType type)
Create a new column- Parameters:
index
- indexname
- nametype
- data type- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(String name, GeoPackageDataType type, boolean notNull)
Create a new column- Parameters:
name
- nametype
- data typenotNull
- not null flag- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(int index, String name, GeoPackageDataType type, boolean notNull)
Create a new column- Parameters:
index
- indexname
- nametype
- data typenotNull
- not null flag- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(String name, GeoPackageDataType type, boolean notNull, Object defaultValue)
Create a new column- Parameters:
name
- nametype
- data typenotNull
- not null flagdefaultValue
- default value- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(int index, String name, GeoPackageDataType type, boolean notNull, Object defaultValue)
Create a new column- Parameters:
index
- indexname
- nametype
- data typenotNull
- not null flagdefaultValue
- default value- Returns:
- feature column
-
createColumn
public static FeatureColumn createColumn(String name, GeoPackageDataType type, Long max)
Create a new column- Parameters:
name
- nametype
- data typemax
- max value- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(int index, String name, GeoPackageDataType type, Long max)
Create a new column- Parameters:
index
- indexname
- nametype
- data typemax
- max value- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(String name, GeoPackageDataType type, Long max, boolean notNull, Object defaultValue)
Create a new column- Parameters:
name
- nametype
- data typemax
- max valuenotNull
- not null flagdefaultValue
- default value- Returns:
- feature column
- Since:
- 3.3.0
-
createColumn
public static FeatureColumn createColumn(int index, String name, GeoPackageDataType type, Long max, boolean notNull, Object defaultValue)
Create a new column- Parameters:
index
- indexname
- nametype
- data typemax
- max valuenotNull
- not null flagdefaultValue
- default value- Returns:
- feature column
-
createColumn
public static FeatureColumn createColumn(TableColumn tableColumn)
Create a new column- Parameters:
tableColumn
- table column- Returns:
- feature column
- Since:
- 3.3.0
-
getTypeName
protected static String getTypeName(String name, GeoPackageDataType dataType, GeometryType geometryType)
Get the type name from the data and geometry type- Parameters:
name
- column namedataType
- data typegeometryType
- geometry type- Returns:
- type name
- Since:
- 3.3.0
-
setGeometryType
protected void setGeometryType(GeometryType geometryType)
Set the geometry type- Parameters:
geometryType
- geometry type
-
copy
public FeatureColumn copy()
Copy the column- Specified by:
copy
in classUserColumn
- Returns:
- copied column
- Since:
- 3.3.0
-
isGeometry
public boolean isGeometry()
Determine if this column is a geometry- Returns:
- true if a geometry column
-
getGeometryType
public GeometryType getGeometryType()
When a geometry column, gets the geometry type- Returns:
- geometry type
-
-