public class TLcdOracleGeoRasterModelDescriptor extends TLcdMultilevelRasterModelDescriptor implements ILcdDatabaseModelDescriptor, ILcdImageModelDescriptor
ILcdDatabaseModelDescriptor
describes a spatial georaster
database.
For accessing an existing spatial table, the following information is
required:
Constructor and Description |
---|
TLcdOracleGeoRasterModelDescriptor(String aDriver,
String aURL,
Properties aConnectionProperties,
String aTableName,
String aColumnName,
String aSourceFileName,
String aDisplayName)
Creates a new TLcdOracleGeoRasterModelDescriptor with the given properties.
|
TLcdOracleGeoRasterModelDescriptor(TLcdOracleGeoRasterModelDescriptor aDescriptor)
Creates a new TLcdOracleGeoRasterModelDescriptor based on the given
descriptor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a shallow clone of this descriptor.
|
void |
close()
Closes the
Connection of this descriptor, if it was opened. |
ILcdBounds |
getBounds()
returns the bounds of the geometry.
|
String |
getColumnNames()
Concatenates the main column name and the feature column names into
a single
String of comma-separated column names. |
String |
getColumnNamesAndTypes()
Concatenates the main column name and type, and the feature column names
and types into a single
String of comma-separated column names
and types. |
Connection |
getConnection() |
Properties |
getConnectionProperties()
Returns the connection properties.
|
TLcdDataModel |
getDataModel()
Returns the data model that describes the elements of the model.
|
String |
getDriver()
Returns the JDBC driver name.
|
ILcdEllipsoid |
getEllipsoid()
Returns the ellipsoid of the database object reference.
|
Class |
getFeatureClass(int aIndex)
Returns the
Class of the feature at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
int |
getFeatureIndex(String aName)
Returns the index of the given feature name if it exists, -1 otherwise.
|
String |
getFeatureName(int aIndex)
Feature names for a GeoRaster are currently ignored.
|
String |
getFeatureType(int aIndex)
Feature types for a GeoRaster are currently ignored.
|
String |
getGeometryColumnName()
Returns the name of the column containing the database raster.
|
String |
getGeometryType()
The geometry type of a GeoRaster is currently ignored.
|
Set<TLcdDataType> |
getModelElementTypes()
Returns a set containing all the data types of which instances can be elements in the model
associated with this descriptor.
|
Set<TLcdDataType> |
getModelTypes()
Returns a set containing all the types of which instances can be used (including both
top-level elements and child objects) in the model associated with this descriptor.
|
int |
getPrimaryFeatureIndex()
The primary feature index of a GeoRaster is currently ignored.
|
String |
getSelectionFilter()
Returns the string representing the selection filter.
|
String |
getSelectionTables()
Returns the names of the additional tables used in the select query
|
int |
getSRID()
Returns the Spatial Reference ID number.
|
String |
getTableName()
Returns the name of the database table.
|
String |
getTypeName()
Returns the type/format name of the data source.
|
String |
getURL()
Returns the JDBC connection URL.
|
boolean |
isAlwaysCloseConnection() |
void |
setAlwaysCloseConnection(boolean aAlwaysCloseConnection) |
void |
setBounds(ILcdBounds aBounds)
Sets the bounds of the geometry.
|
void |
setConnectionProperties(Properties aConnectionProperties)
Sets the connection properties.
|
void |
setDriver(String aDriver)
Sets the JDBC driver name.
|
protected void |
setElevation(boolean aElevation)
Specifies whether the model contains elevation rasters.
|
void |
setEllipsoid(ILcdEllipsoid aEllipsoid)
Sets the ellipsoid of the database object's reference.
|
void |
setFeatureNames(String[] aFeatureNames)
Feature names for a GeoRaster are currently ignored.
|
void |
setFeatureTypes(String[] aFeatureTypes)
Feature types for a GeoRaster are currently ignored.
|
void |
setGeometryColumnName(String aName)
Sets the name of the column containing the database raster.
|
void |
setGeometryType(String aGeometryType)
The geometry type of a GeoRaster is currently ignored.
|
void |
setPrimaryFeatureIndex(int aPrimaryFeatureIndex)
The primary feature index of a GeoRaster is currently ignored.
|
void |
setSelectionFilter(String aSelectionFilter)
A selection filter string , normally appended to the WHERE part of the
select query.
|
void |
setSelectionTables(String aSelectionTables)
Sets the names of additional tables used in the select query.
|
void |
setSRID(int aSRID)
Sets the Spatial Reference ID number.
|
void |
setTableName(String aName)
Sets the name of the database table.
|
void |
setURL(String aURL)
Sets the JDBC connection URL.
|
isElevation
getDisplayName, getSourceName, setDisplayName, setSourceName, setTypeName, sourceNameToDisplayName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName, getSourceName
getFeatureUnitOfMeasure
public static final String TYPE_NAME
public TLcdOracleGeoRasterModelDescriptor(String aDriver, String aURL, Properties aConnectionProperties, String aTableName, String aColumnName, String aSourceFileName, String aDisplayName)
aDriver
- the JDBC driver name.aURL
- the JDBC connection URL.aConnectionProperties
- the connection properties, including 'user'
and 'password'.aTableName
- the database table name.aColumnName
- the column containing the georaster datapublic TLcdOracleGeoRasterModelDescriptor(TLcdOracleGeoRasterModelDescriptor aDescriptor)
aDescriptor
- the descriptor whose properties are to be copied.protected void setElevation(boolean aElevation)
setElevation
in class TLcdMultilevelRasterModelDescriptor
public void setDriver(String aDriver)
aDriver
- a JDBC driver.public String getDriver()
public void setURL(String aURL)
aURL
- aJDBC connection URL.public String getURL()
public void setConnectionProperties(Properties aConnectionProperties)
aConnectionProperties
- the connection properties.public Properties getConnectionProperties()
public void setTableName(String aName)
ILcdDatabaseModelDescriptor
setTableName
in interface ILcdDatabaseModelDescriptor
aName
- the name of the database table.public String getTableName()
ILcdDatabaseModelDescriptor
getTableName
in interface ILcdDatabaseModelDescriptor
public void setBounds(ILcdBounds aBounds)
ILcdDatabaseModelDescriptor
setBounds
in interface ILcdDatabaseModelDescriptor
aBounds
- the bounds of the geometry.public ILcdBounds getBounds()
ILcdDatabaseModelDescriptor
getBounds
in interface ILcdDatabaseModelDescriptor
public String getTypeName()
ILcdModelDescriptor
getTypeName
in interface ILcdModelDescriptor
getTypeName
in class TLcdModelDescriptor
public Connection getConnection() throws SQLException
SQLException
public void setSelectionTables(String aSelectionTables)
ILcdDatabaseModelDescriptor
setSelectionTables
in interface ILcdDatabaseModelDescriptor
aSelectionTables
- a list of additional tables separated by columns.public String getSelectionTables()
ILcdDatabaseModelDescriptor
getSelectionTables
in interface ILcdDatabaseModelDescriptor
public void setSelectionFilter(String aSelectionFilter)
ILcdDatabaseModelDescriptor
setSelectionFilter
in interface ILcdDatabaseModelDescriptor
aSelectionFilter
- a selection filter string.public String getSelectionFilter()
ILcdDatabaseModelDescriptor
getSelectionFilter
in interface ILcdDatabaseModelDescriptor
public void setGeometryColumnName(String aName)
setGeometryColumnName
in interface ILcdDatabaseModelDescriptor
aName
- the name of the column containing the database raster.public String getGeometryColumnName()
getGeometryColumnName
in interface ILcdDatabaseModelDescriptor
public void setFeatureNames(String[] aFeatureNames)
setFeatureNames
in interface ILcdDatabaseModelDescriptor
aFeatureNames
- a list of feature names.public String getFeatureName(int aIndex)
getFeatureName
in interface ILcdDatabaseModelDescriptor
getFeatureName
in interface ILcdFeaturedDescriptor
aIndex
- the feature index.public void setPrimaryFeatureIndex(int aPrimaryFeatureIndex)
setPrimaryFeatureIndex
in interface ILcdDatabaseModelDescriptor
aPrimaryFeatureIndex
- the primary feature indexpublic int getPrimaryFeatureIndex()
getPrimaryFeatureIndex
in interface ILcdDatabaseModelDescriptor
public void setSRID(int aSRID)
ILcdDatabaseModelDescriptor
setSRID
in interface ILcdDatabaseModelDescriptor
aSRID
- a spatial reference ID.public int getSRID()
ILcdDatabaseModelDescriptor
getSRID
in interface ILcdDatabaseModelDescriptor
public void setEllipsoid(ILcdEllipsoid aEllipsoid)
ILcdDatabaseModelDescriptor
setEllipsoid
in interface ILcdDatabaseModelDescriptor
aEllipsoid
- the ellipsoid of the database object's reference.public ILcdEllipsoid getEllipsoid()
ILcdDatabaseModelDescriptor
getEllipsoid
in interface ILcdDatabaseModelDescriptor
public void setGeometryType(String aGeometryType)
setGeometryType
in interface ILcdDatabaseModelDescriptor
aGeometryType
- type of the geometry.public String getGeometryType()
getGeometryType
in interface ILcdDatabaseModelDescriptor
public void setFeatureTypes(String[] aFeatureTypes)
setFeatureTypes
in interface ILcdDatabaseModelDescriptor
aFeatureTypes
- the types of the features.public String getFeatureType(int aIndex)
getFeatureType
in interface ILcdDatabaseModelDescriptor
aIndex
- the feature index.public String getColumnNames()
ILcdDatabaseModelDescriptor
String
of comma-separated column names.getColumnNames
in interface ILcdDatabaseModelDescriptor
public String getColumnNamesAndTypes()
ILcdDatabaseModelDescriptor
String
of comma-separated column names
and types.getColumnNamesAndTypes
in interface ILcdDatabaseModelDescriptor
public void close()
ILcdDatabaseModelDescriptor
Connection
of this descriptor, if it was opened.close
in interface ILcdDatabaseModelDescriptor
public void setAlwaysCloseConnection(boolean aAlwaysCloseConnection)
public boolean isAlwaysCloseConnection()
public Object clone()
clone
in interface ILcdDatabaseModelDescriptor
clone
in class Object
public int getFeatureCount()
ILcdFeaturedDescriptor
getFeatureCount
in interface ILcdFeaturedDescriptor
public int getFeatureIndex(String aName)
ILcdFeaturedDescriptor
getFeatureIndex
in interface ILcdFeaturedDescriptor
aName
- a feature name.public Class getFeatureClass(int aIndex)
ILcdFeaturedDescriptor
Class
of the feature at the given index.getFeatureClass
in interface ILcdFeaturedDescriptor
aIndex
- a valid feature index.public TLcdDataModel getDataModel()
ILcdDataModelDescriptor
Returns the data model that describes the elements of the model. Note that not necessarily all data in the model will be of a type of this data model. Very likely, types from the dependencies of the returned data model are used as well.
In case the model accepts objects from multiple data models, an anonymous
data model that depends on all these data models should be returned
(see TLcdDataModelBuilder.createAnonymousDataModel(java.util.Collection)
).
getDataModel
in interface ILcdDataModelDescriptor
public Set<TLcdDataType> getModelElementTypes()
ILcdDataModelDescriptor
Returns a set containing all the data types of which instances can be elements in the model associated with this descriptor. Implementations are free to limit the result to only include the types of which there are actually elements in the model; but they are not required to do so.
Implementations should return null
in case they don't know
which element types are present in the model.
For each element of the model associated with this model descriptor, the following holds true :
getModelElementTypes().contains( element.getDataType() )
.
getModelElementTypes
in interface ILcdDataModelDescriptor
public Set<TLcdDataType> getModelTypes()
ILcdDataModelDescriptor
Returns a set containing all the types of which instances can be used (including both top-level elements and child objects) in the model associated with this descriptor. Implementations are free to limit the result to only include the types of which there are actually instances in the model; but they are not required to do so.
A simple and correct implementation would be to return
getDataModel().getTypes()
. Implementations are encouraged to return a subset of
this set if they can do so without spending an unreasonable amount of resources.
Implementations should return null
in case they don't know
which types are present in the model.
getModelTypes
in interface ILcdDataModelDescriptor