|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.geometryless.MysqlGeomColumn
MysqlGeoColumn is used by MysqlDataSource to query its specific geometric information. There should be one created for each geometry column of each feature table. It encapsulates information about the column, such as the name of the corresponding geometric table, the storage type used by that table, the type of geometry contained, and various other useful information culled from the GEOMETRY_COLUMNS table. It also generates the geometries of the column when queried with the ID from the feature table.
Field Summary | |
static java.lang.String |
GEOMETRY_META_NAME
From the SFS for SQL spec, always has the meta data |
static int |
NORMALIZED_STORAGE_TYPE
For get and set Storage type, see SFS for SQL spec |
static int |
WKB_STORAGE_TYPE
For get and set Storage type, see SFS for SQL spec, the Well Known Binary |
Constructor Summary | |
MysqlGeomColumn()
Default constructor |
|
MysqlGeomColumn(java.sql.Connection dbConnection,
java.lang.String feaTableName)
A convenience constructor, when you there is an open connection, and only using flat features. |
|
MysqlGeomColumn(java.lang.String feaTabName,
java.lang.String feaGeomColumn,
java.lang.String geomTabName)
Convenience constructor with the minimum meta information needed to do anything useful. |
Method Summary | |
java.lang.String |
getFeaTableCat()
Getter method for Feature Catalog. |
java.lang.String |
getFeaTableName()
Getter method for feature table name. |
java.lang.String |
getFeaTableSchema()
Getter method for feature schema. |
java.lang.String |
getGeomColName()
Getter method for geometry column. |
com.vividsolutions.jts.geom.Geometry |
getGeometry(int geomID)
Returns a jts Geometry when queried with a geometry ID. |
java.lang.String |
getGeomTableCat()
Getter method for Geometry Catalog. |
java.lang.String |
getGeomTableName()
Getter method for geometry table name. |
java.lang.String |
getGeomTableSchema()
Getter method for geometry schema |
int |
getGeomType()
Gets the Geometry type of the geometry column. |
FeatureType |
getSchema()
Gets the schema for this geometry column. |
int |
getStorageType()
Gets the type used for storage in the geometry column. |
static FeatureType |
makeSchema(java.sql.ResultSetMetaData metaData,
java.lang.String geoColumn)
Creates the schema, a FeatureType of the attributes. |
void |
populateData(int geomID,
java.lang.String wellKnownText)
Stores the geometry information by geometry ID, so that it can be queried later. |
void |
removeData(int geomID)
Takes out a geometry according to its ID. |
void |
setFeaTableCat(java.lang.String catalog)
Setter method for feature catalog. |
void |
setFeaTableName(java.lang.String name)
Setter method for feature table name. |
void |
setFeaTableSchema(java.lang.String schema)
Setter method for feature schema. |
void |
setGeomColName(java.lang.String name)
Setter method for geometry column. |
void |
setGeomTableCat(java.lang.String catalog)
Setter method for geometry catalog. |
void |
setGeomTableName(java.lang.String name)
Setter method for geometry table name. |
void |
setGeomTableSchema(java.lang.String schema)
Setter method for geometry schema. |
void |
setGeomType(int gType)
Sets the Geometry type of the geometry column. |
void |
setSchema(FeatureType schema)
sets the schema for this geometry column. |
void |
setStorageType(int sType)
Sets the type used for storage in the geometry column. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NORMALIZED_STORAGE_TYPE
public static final int WKB_STORAGE_TYPE
public static final java.lang.String GEOMETRY_META_NAME
Constructor Detail |
public MysqlGeomColumn()
public MysqlGeomColumn(java.lang.String feaTabName, java.lang.String feaGeomColumn, java.lang.String geomTabName)
feaTabName
- The name of the feature table for this geometry.feaGeomColumn
- The name of the column in the feature table that
refers to the MysqlGeomColumn.geomTabName
- The name of the table holding the geometry data.public MysqlGeomColumn(java.sql.Connection dbConnection, java.lang.String feaTableName) throws java.sql.SQLException, SchemaException
dbConnection
- An open connection to the database.feaTableName
- The feature table that references this Geometry Col.
java.sql.SQLException
- if there were problems accessing the database.
SchemaException
- if there were problems creating the schema.Method Detail |
public void populateData(int geomID, java.lang.String wellKnownText)
geomID
- the primary key for a row in the Geometry Table;wellKnownText
- the WKT representation of the geometry; tasks:
TODO: Well Known Binary, and normalized SQL 92 (see SFS for for
SQL spec 2.2.5)public void removeData(int geomID)
geomID
- the primary key for a rwo in the Geometry Tablepublic com.vividsolutions.jts.geom.Geometry getGeometry(int geomID) throws DataSourceException
geomID
- the ID of the feature geometry.
DataSourceException
- if there is trouble with the Database.public void setFeaTableCat(java.lang.String catalog)
catalog
- the name of the catalog.public java.lang.String getFeaTableCat()
public void setFeaTableSchema(java.lang.String schema)
schema
- the name of the schema.public java.lang.String getFeaTableSchema()
public void setFeaTableName(java.lang.String name)
name
- the name of the feature table.public java.lang.String getFeaTableName()
public void setGeomColName(java.lang.String name)
name
- the name of the column.public java.lang.String getGeomColName()
public void setGeomTableCat(java.lang.String catalog)
catalog
- the name of the catalog.public java.lang.String getGeomTableCat()
public void setGeomTableSchema(java.lang.String schema)
schema
- the name of the catalog.public java.lang.String getGeomTableSchema()
public void setGeomTableName(java.lang.String name)
name
- the name of the geometry table.public java.lang.String getGeomTableName()
public void setStorageType(int sType)
sType
- 0 for NORMALIZED_STORAGE_TYPE 1, for WKB_STORAGE_TYPEpublic int getStorageType()
public void setGeomType(int gType)
gType
- the geometery typepublic int getGeomType()
public FeatureType getSchema()
public void setSchema(FeatureType schema)
schema
- for this geometry column.public static FeatureType makeSchema(java.sql.ResultSetMetaData metaData, java.lang.String geoColumn) throws java.sql.SQLException, SchemaException
metaData
- from the query of the feature table.geoColumn
- the name of the geometry column in the feature table.
java.sql.SQLException
- if there was database connectivity issues.
SchemaException
- if there was problems creating the FeatureType.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |