| java.lang.Object org.geotools.data.mysql.MysqlGeomColumn
MysqlGeomColumn | public class MysqlGeomColumn (Code) | | 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.
author: Chris Holmes, Vision for New York version: $Id: MysqlGeomColumn.java 27862 2007-11-12 19:51:19Z desruisseaux $ |
GEOMETRY_META_NAME | final public static String GEOMETRY_META_NAME(Code) | | From the SFS for SQL spec, always has the meta data
|
NORMALIZED_STORAGE_TYPE | final public static int NORMALIZED_STORAGE_TYPE(Code) | | For get and set Storage type, see SFS for SQL spec
|
WKB_STORAGE_TYPE | final public static int WKB_STORAGE_TYPE(Code) | | For get and set Storage type, see SFS for SQL spec, the Well Known
Binary
|
MysqlGeomColumn | public MysqlGeomColumn()(Code) | | Default constructor
|
MysqlGeomColumn | public MysqlGeomColumn(String feaTabName, String feaGeomColumn, String geomTabName)(Code) | | Convenience constructor with the minimum meta information needed to do
anything useful.
Parameters: feaTabName - The name of the feature table for this geometry. Parameters: feaGeomColumn - The name of the column in the feature table thatrefers to the MysqlGeomColumn. Parameters: geomTabName - The name of the table holding the geometry data. |
MysqlGeomColumn | public MysqlGeomColumn(Connection dbConnection, String feaTableName) throws SQLException, SchemaException(Code) | | A convenience constructor, when you there is an open connection, and
only using flat features. This constructor will not work with feature
tables that contain multiple geometries as the query on the feature
table will return multiple rows, which will be discarded. For multiple
geometries an array of MysqlGeomColumns must be created, each
initialized with the default constructor, filling in the values through
the accesssor functions.
Parameters: dbConnection - An open connection to the database. Parameters: feaTableName - The feature table that references this Geometry Col. throws: SQLException - if there were problems accessing the database. throws: SchemaException - if there were problems creating the schema. |
getFeaTableCat | public String getFeaTableCat()(Code) | | Getter method for Feature Catalog.
the name of the catalog. |
getFeaTableName | public String getFeaTableName()(Code) | | Getter method for feature table name.
the name of the feature table. |
getFeaTableSchema | public String getFeaTableSchema()(Code) | | Getter method for feature schema.
the name of the schema. |
getGeomColName | public String getGeomColName()(Code) | | Getter method for geometry column.
the name of the column. |
getGeomTableCat | public String getGeomTableCat()(Code) | | Getter method for Geometry Catalog.
the name of the catalog. |
getGeomTableName | public String getGeomTableName()(Code) | | Getter method for geometry table name.
the name of the catalog. |
getGeomTableSchema | public String getGeomTableSchema()(Code) | | Getter method for geometry schema
the name of the schema. |
getGeomType | public int getGeomType()(Code) | | Gets the Geometry type of the geometry column.
the int representation of the GeometryType |
getGeometry | public Geometry getGeometry(int geomID) throws DataSourceException(Code) | | Returns a jts Geometry when queried with a geometry ID.
Parameters: geomID - the ID of the feature geometry. a jts geometry represention of the stored data, returns null isit is not found. throws: DataSourceException - if there is trouble with the Database. |
getSchema | public FeatureType getSchema()(Code) | | Gets the schema for this geometry column.
the schema corresponding to this geometry column. |
getStorageType | public int getStorageType()(Code) | | Gets the type used for storage in the geometry column.
0 for NORMALIZED_STORAGE_TYPE, 1 for WKB_STORAGE_TYPE |
makeSchema | public static FeatureType makeSchema(ResultSetMetaData metaData, String geoColumn) throws SQLException, SchemaException(Code) | | Creates the schema, a FeatureType of the attributes.
Parameters: metaData - from the query of the feature table. Parameters: geoColumn - the name of the geometry column in the feature table. a FeatureType of the attributes. throws: SQLException - if there was database connectivity issues. throws: SchemaException - if there was problems creating the FeatureType. |
populateData | public void populateData(int geomID, String wellKnownText)(Code) | | Stores the geometry information by geometry ID, so that it can be
queried later. Currently only takes Well Known Text. This should
eventually change to Well Known Binary, possible stored as a bit
stream? And in time an overloaded populateData that allows for
normalized SQL 92 storage.
Parameters: geomID - the primary key for a row in the Geometry Table; Parameters: wellKnownText - the WKT representation of the geometry; tasks:TODO: Well Known Binary, and normalized SQL 92 (see SFS for forSQL spec 2.2.5) |
removeData | public void removeData(int geomID)(Code) | | Takes out a geometry according to its ID.
Parameters: geomID - the primary key for a rwo in the Geometry Table |
setFeaTableCat | public void setFeaTableCat(String catalog)(Code) | | Setter method for feature catalog.
Parameters: catalog - the name of the catalog. |
setFeaTableName | public void setFeaTableName(String name)(Code) | | Setter method for feature table name.
Parameters: name - the name of the feature table. |
setFeaTableSchema | public void setFeaTableSchema(String schema)(Code) | | Setter method for feature schema.
Parameters: schema - the name of the schema. |
setGeomColName | public void setGeomColName(String name)(Code) | | Setter method for geometry column.
Parameters: name - the name of the column. |
setGeomTableCat | public void setGeomTableCat(String catalog)(Code) | | Setter method for geometry catalog.
Parameters: catalog - the name of the catalog. |
setGeomTableName | public void setGeomTableName(String name)(Code) | | Setter method for geometry table name.
Parameters: name - the name of the geometry table. |
setGeomTableSchema | public void setGeomTableSchema(String schema)(Code) | | Setter method for geometry schema.
Parameters: schema - the name of the catalog. |
setGeomType | public void setGeomType(int gType)(Code) | | Sets the Geometry type of the geometry column.
Parameters: gType - the geometery type |
setSchema | public void setSchema(FeatureType schema)(Code) | | sets the schema for this geometry column.
Parameters: schema - for this geometry column. |
setStorageType | public void setStorageType(int sType)(Code) | | Sets the type used for storage in the geometry column.
Parameters: sType - 0 for NORMALIZED_STORAGE_TYPE 1, for WKB_STORAGE_TYPE |
|
|