Class TLcdOracleGeoRasterModelDescriptor

All Implemented Interfaces:
ILcdDatabaseModelDescriptor, ILcdImageModelDescriptor, ILcdDataModelDescriptor, ILcdModelDescriptor, ILcdFeaturedDescriptor, Serializable, Cloneable

public class TLcdOracleGeoRasterModelDescriptor extends TLcdMultilevelRasterModelDescriptor implements ILcdDatabaseModelDescriptor, ILcdImageModelDescriptor
This ILcdDatabaseModelDescriptor describes a spatial georaster database.

For accessing an existing spatial table, the following information is required:

  • a database driver,
  • a database URL,
  • connection properties, including 'user' and 'password',
  • a table name,
  • a column name containing the georaster.

Since:
8.0
See Also:
  • Field Details

  • Constructor Details

    • TLcdOracleGeoRasterModelDescriptor

      public TLcdOracleGeoRasterModelDescriptor(String aDriver, String aURL, Properties aConnectionProperties, String aTableName, String aColumnName, String aSourceFileName, String aDisplayName)
      Creates a new TLcdOracleGeoRasterModelDescriptor with the given properties.
      Parameters:
      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 data
    • TLcdOracleGeoRasterModelDescriptor

      public TLcdOracleGeoRasterModelDescriptor(TLcdOracleGeoRasterModelDescriptor aDescriptor)
      Creates a new TLcdOracleGeoRasterModelDescriptor based on the given descriptor.
      Parameters:
      aDescriptor - the descriptor whose properties are to be copied.
  • Method Details

    • setElevation

      protected void setElevation(boolean aElevation)
      Specifies whether the model contains elevation rasters.
      Overrides:
      setElevation in class TLcdMultilevelRasterModelDescriptor
    • setDriver

      public void setDriver(String aDriver)
      Sets the JDBC driver name.
      Parameters:
      aDriver - a JDBC driver.
    • getDriver

      public String getDriver()
      Returns the JDBC driver name.
      Returns:
      a JDBC driver name.
    • setURL

      public void setURL(String aURL)
      Sets the JDBC connection URL.
      Parameters:
      aURL - aJDBC connection URL.
    • getURL

      public String getURL()
      Returns the JDBC connection URL.
      Returns:
      the JDBC connection URL.
    • setConnectionProperties

      public void setConnectionProperties(Properties aConnectionProperties)
      Sets the connection properties.
      Parameters:
      aConnectionProperties - the connection properties.
    • getConnectionProperties

      public Properties getConnectionProperties()
      Returns the connection properties.
      Returns:
      the connection properties.
    • setTableName

      public void setTableName(String aName)
      Description copied from interface: ILcdDatabaseModelDescriptor
      Sets the name of the database table.
      Specified by:
      setTableName in interface ILcdDatabaseModelDescriptor
      Parameters:
      aName - the name of the database table.
    • getTableName

      public String getTableName()
      Description copied from interface: ILcdDatabaseModelDescriptor
      Returns the name of the database table.
      Specified by:
      getTableName in interface ILcdDatabaseModelDescriptor
      Returns:
      a table name.
    • setBounds

      public void setBounds(ILcdBounds aBounds)
      Description copied from interface: ILcdDatabaseModelDescriptor
      Sets the bounds of the geometry.
      Specified by:
      setBounds in interface ILcdDatabaseModelDescriptor
      Parameters:
      aBounds - the bounds of the geometry.
    • getBounds

      public ILcdBounds getBounds()
      Description copied from interface: ILcdDatabaseModelDescriptor
      returns the bounds of the geometry.
      Specified by:
      getBounds in interface ILcdDatabaseModelDescriptor
      Returns:
      the bounds of the geometry.
    • getTypeName

      public String getTypeName()
      Description copied from interface: ILcdModelDescriptor
      Returns the type/format name of the data source. The data format String is an easy means to identify a format. It is not guaranteed to be unique, so additional checks may be necessary. This can be mif or shape, for instance.
      Specified by:
      getTypeName in interface ILcdModelDescriptor
      Overrides:
      getTypeName in class TLcdModelDescriptor
      Returns:
      the type name of the data source.
    • getConnection

      public Connection getConnection() throws SQLException
      Throws:
      SQLException
    • setSelectionTables

      public void setSelectionTables(String aSelectionTables)
      Description copied from interface: ILcdDatabaseModelDescriptor
      Sets the names of additional tables used in the select query.
      Specified by:
      setSelectionTables in interface ILcdDatabaseModelDescriptor
      Parameters:
      aSelectionTables - a list of additional tables separated by columns.
    • getSelectionTables

      public String getSelectionTables()
      Description copied from interface: ILcdDatabaseModelDescriptor
      Returns the names of the additional tables used in the select query
      Specified by:
      getSelectionTables in interface ILcdDatabaseModelDescriptor
      Returns:
      a list of additional tables, separated by columns.
    • setSelectionFilter

      public void setSelectionFilter(String aSelectionFilter)
      Description copied from interface: ILcdDatabaseModelDescriptor
      A selection filter string , normally appended to the WHERE part of the select query.
      Specified by:
      setSelectionFilter in interface ILcdDatabaseModelDescriptor
      Parameters:
      aSelectionFilter - a selection filter string.
    • getSelectionFilter

      public String getSelectionFilter()
      Description copied from interface: ILcdDatabaseModelDescriptor
      Returns the string representing the selection filter.
      Specified by:
      getSelectionFilter in interface ILcdDatabaseModelDescriptor
      Returns:
      the selection filter.
    • setGeometryColumnName

      public void setGeometryColumnName(String aName)
      Sets the name of the column containing the database raster.
      Specified by:
      setGeometryColumnName in interface ILcdDatabaseModelDescriptor
      Parameters:
      aName - the name of the column containing the database raster.
    • getGeometryColumnName

      public String getGeometryColumnName()
      Returns the name of the column containing the database raster.
      Specified by:
      getGeometryColumnName in interface ILcdDatabaseModelDescriptor
      Returns:
      the name of the column containing the database raster.
    • setFeatureNames

      public void setFeatureNames(String[] aFeatureNames)
      Feature names for a GeoRaster are currently ignored.
      Specified by:
      setFeatureNames in interface ILcdDatabaseModelDescriptor
      Parameters:
      aFeatureNames - a list of feature names.
    • getFeatureName

      public String getFeatureName(int aIndex)
      Feature names for a GeoRaster are currently ignored.
      Specified by:
      getFeatureName in interface ILcdDatabaseModelDescriptor
      Specified by:
      getFeatureName in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - the feature index.
      Returns:
      the name corresponding to the given index.
    • setPrimaryFeatureIndex

      public void setPrimaryFeatureIndex(int aPrimaryFeatureIndex)
      The primary feature index of a GeoRaster is currently ignored.
      Specified by:
      setPrimaryFeatureIndex in interface ILcdDatabaseModelDescriptor
      Parameters:
      aPrimaryFeatureIndex - the primary feature index
    • getPrimaryFeatureIndex

      public int getPrimaryFeatureIndex()
      The primary feature index of a GeoRaster is currently ignored.
      Specified by:
      getPrimaryFeatureIndex in interface ILcdDatabaseModelDescriptor
      Returns:
      the primary feature index.
    • setSRID

      public void setSRID(int aSRID)
      Description copied from interface: ILcdDatabaseModelDescriptor
      Sets the Spatial Reference ID number.
      Specified by:
      setSRID in interface ILcdDatabaseModelDescriptor
      Parameters:
      aSRID - a spatial reference ID.
    • getSRID

      public int getSRID()
      Description copied from interface: ILcdDatabaseModelDescriptor
      Returns the Spatial Reference ID number.
      Specified by:
      getSRID in interface ILcdDatabaseModelDescriptor
      Returns:
      the Spatial reference ID number.
    • setEllipsoid

      public void setEllipsoid(ILcdEllipsoid aEllipsoid)
      Description copied from interface: ILcdDatabaseModelDescriptor
      Sets the ellipsoid of the database object's reference.
      Specified by:
      setEllipsoid in interface ILcdDatabaseModelDescriptor
      Parameters:
      aEllipsoid - the ellipsoid of the database object's reference.
    • getEllipsoid

      public ILcdEllipsoid getEllipsoid()
      Description copied from interface: ILcdDatabaseModelDescriptor
      Returns the ellipsoid of the database object reference.
      Specified by:
      getEllipsoid in interface ILcdDatabaseModelDescriptor
      Returns:
      an ellipsoid
    • setGeometryType

      public void setGeometryType(String aGeometryType)
      The geometry type of a GeoRaster is currently ignored.
      Specified by:
      setGeometryType in interface ILcdDatabaseModelDescriptor
      Parameters:
      aGeometryType - type of the geometry.
    • getGeometryType

      public String getGeometryType()
      The geometry type of a GeoRaster is currently ignored.
      Specified by:
      getGeometryType in interface ILcdDatabaseModelDescriptor
      Returns:
      type of the geometry.
    • setFeatureTypes

      public void setFeatureTypes(String[] aFeatureTypes)
      Feature types for a GeoRaster are currently ignored.
      Specified by:
      setFeatureTypes in interface ILcdDatabaseModelDescriptor
      Parameters:
      aFeatureTypes - the types of the features.
    • getFeatureType

      public String getFeatureType(int aIndex)
      Feature types for a GeoRaster are currently ignored.
      Specified by:
      getFeatureType in interface ILcdDatabaseModelDescriptor
      Parameters:
      aIndex - the feature index.
      Returns:
      the feature type.
    • getColumnNames

      public String getColumnNames()
      Description copied from interface: ILcdDatabaseModelDescriptor
      Concatenates the main column name and the feature column names into a single String of comma-separated column names.
      Specified by:
      getColumnNames in interface ILcdDatabaseModelDescriptor
      Returns:
      a String containing the comma-separated column names.
    • getColumnNamesAndTypes

      public String getColumnNamesAndTypes()
      Description copied from interface: ILcdDatabaseModelDescriptor
      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.
      Specified by:
      getColumnNamesAndTypes in interface ILcdDatabaseModelDescriptor
      Returns:
      a String containing the main column name and type, and the feature column names and types, separated by commas.
    • close

      public void close()
      Description copied from interface: ILcdDatabaseModelDescriptor
      Closes the Connection of this descriptor, if it was opened.
      Specified by:
      close in interface ILcdDatabaseModelDescriptor
    • setAlwaysCloseConnection

      public void setAlwaysCloseConnection(boolean aAlwaysCloseConnection)
    • isAlwaysCloseConnection

      public boolean isAlwaysCloseConnection()
    • clone

      public Object clone()
      Creates a shallow clone of this descriptor.
      Specified by:
      clone in interface ILcdDatabaseModelDescriptor
      Overrides:
      clone in class Object
    • getFeatureCount

      public int getFeatureCount()
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the number of features.
      Specified by:
      getFeatureCount in interface ILcdFeaturedDescriptor
      Returns:
      0.
    • getFeatureIndex

      public int getFeatureIndex(String aName)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the index of the given feature name if it exists, -1 otherwise.
      Specified by:
      getFeatureIndex in interface ILcdFeaturedDescriptor
      Parameters:
      aName - a feature name.
      Returns:
      -1
    • getFeatureClass

      public Class getFeatureClass(int aIndex)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the Class of the feature at the given index.
      Specified by:
      getFeatureClass in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - a valid feature index.
      Returns:
      null.
    • getDataModel

      public TLcdDataModel getDataModel()
      Description copied from interface: 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)).

      Specified by:
      getDataModel in interface ILcdDataModelDescriptor
      Returns:
      the data model that describes the elements of the model
    • getModelElementTypes

      public Set<TLcdDataType> getModelElementTypes()
      Description copied from interface: 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() ).

      Specified by:
      getModelElementTypes in interface ILcdDataModelDescriptor
      Returns:
      a set containing all the data types of which instances can be elements in the model associated with this descriptor
    • getModelTypes

      public Set<TLcdDataType> getModelTypes()
      Description copied from interface: 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.

      Specified by:
      getModelTypes in interface ILcdDataModelDescriptor
      Returns:
      a set containing all the data types of which instances can be used in the model associated with this descriptor