ilog.views.maps.format.oracle
Class IlvDefaultSDOTileLoader

java.lang.Object
  extended by ilog.views.maps.format.oracle.IlvSDOTileLoader
      extended by ilog.views.maps.format.oracle.IlvDefaultSDOTileLoader
All Implemented Interfaces:
IlvPersistentObject, IlvTileLoader

public class IlvDefaultSDOTileLoader
extends IlvSDOTileLoader

This tile loader loads a complete SDO layer with tiles that are equivalent to the SDO tiles.


Constructor Summary
IlvDefaultSDOTileLoader(IlvInputStream stream)
          Reads the tile loader from an IlvInputStream.
IlvDefaultSDOTileLoader(IlvSDOConnection connection, String layerName)
          Initializes an instance of IlvDefaultSDOTileLoader, which loads tiles from the specified layer of an SDO database.
 
Method Summary
 void connectionRestored()
          This method is called by the IlvSDOLayer when it is read from an .ivl file, and after the connection to an SDO database has been restored.
 IlvCoordinateSystem getDefaultCoordinateSystem()
          Returns the default IlvCoordinateSystem used to render map features when they do not have a specified one.
protected  IlvSDOFeatureIterator getFeatureIterator(ResultSet rset)
          Returns the instance of IlvSDOFeatureIterator that is used by the tile loader.
 String getLayerName()
          Returns the name of the SDO layer read by this tile loader.
 ResultSet getResultSet(IlvTile tile)
          Returns a ResultSet containing all the geometries that intersect the tile.
 String getSDOCode(IlvTile tile)
          Returns the SDO code associated with the tile.
 int getSDOTilingLevel()
          Returns the SDO tiling level of the SDO layer.
 IlvRect getSize()
          Returns the size of the tile loader.
 short getTileGroupingCount()
          Returns the number of tiles to be loaded in one unique request.
 IlvRect getTileOrigin()
          Returns the bounding box of the upper-left SDO tile.
 void load(IlvTile tile)
          Loads a tile from the Oracle database and adds the graphic objects to the layer of the tile.
 void setDefaultCoordinateSystem(IlvCoordinateSystem defaultCoordinateSystem)
          Sets the default IlvCoordinateSystem used to render map features when they do not have a specified one.
 void setTileGroupingCount(short nb)
          Sets the number of tiles to be loaded in one unique request.
 void write(IlvOutputStream stream)
          Writes the tile loader to a ILOG JViews file.
 
Methods inherited from class ilog.views.maps.format.oracle.IlvSDOTileLoader
executeQuery, getConnection, isPersistent, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvDefaultSDOTileLoader

public IlvDefaultSDOTileLoader(IlvSDOConnection connection,
                               String layerName)
                        throws SQLException
Initializes an instance of IlvDefaultSDOTileLoader, which loads tiles from the specified layer of an SDO database.

Parameters:
connection - The connection to the database.
layerName - The name of the layer.
Throws:
SQLException - if an error occurs during the initialization.

IlvDefaultSDOTileLoader

public IlvDefaultSDOTileLoader(IlvInputStream stream)
                        throws IlvReadFileException
Reads the tile loader from an IlvInputStream.

Parameters:
stream - The input stream.
Throws:
IlvReadFileException - if an error occurs while reading.
Method Detail

getLayerName

public String getLayerName()
Returns the name of the SDO layer read by this tile loader.


setTileGroupingCount

public void setTileGroupingCount(short nb)
                          throws SQLException
Sets the number of tiles to be loaded in one unique request. This is particularly useful for the load-on-demand where you can group a given number of tiles to be loaded together (when for instance the zoom factor is important so that you are visualizing a certain number of tiles at the same time).

Throws:
SQLException

getTileGroupingCount

public short getTileGroupingCount()
Returns the number of tiles to be loaded in one unique request.

See Also:
setTileGroupingCount(short)

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the tile loader to a ILOG JViews file.

Specified by:
write in interface IlvPersistentObject
Specified by:
write in interface IlvTileLoader
Overrides:
write in class IlvSDOTileLoader
Parameters:
stream - The output stream.
Throws:
IOException - if a write exception occurs.

getSDOCode

public String getSDOCode(IlvTile tile)
Returns the SDO code associated with the tile.

Parameters:
tile - The tile for the load-on-demand mechanism.

getTileOrigin

public IlvRect getTileOrigin()
                      throws SQLException
Returns the bounding box of the upper-left SDO tile.

Specified by:
getTileOrigin in class IlvSDOTileLoader
Throws:
SQLException

getResultSet

public ResultSet getResultSet(IlvTile tile)
                       throws SQLException
Returns a ResultSet containing all the geometries that intersect the tile. This method is called by the load(IlvTile tile) method to define the list of geometries that have to be loaded in a tile. The implementation of this class returns all the geometries that have the same SDO_CODE as the specified tile.

Specified by:
getResultSet in class IlvSDOTileLoader
Parameters:
tile - The tile.
Throws:
SQLException - if an error occurs while retrieving the geometries.
See Also:
getSDOCode(ilog.views.tiling.IlvTile)

getFeatureIterator

protected IlvSDOFeatureIterator getFeatureIterator(ResultSet rset)
                                            throws SQLException
Returns the instance of IlvSDOFeatureIterator that is used by the tile loader. You can override this method in order to use your own feature iterator.

Parameters:
rset - The ResultSet from which geometries are read.
Returns:
The instance of IlvSDOFeatureIterator used by the tile loader.
Throws:
SQLException

load

public void load(IlvTile tile)
          throws Exception
Loads a tile from the Oracle database and adds the graphic objects to the layer of the tile. This method calls getResultSet to get the SDO geometries, transforms them into graphic objects using the renderer of the layer, and then adds the objects to the layer.

Specified by:
load in interface IlvTileLoader
Overrides:
load in class IlvSDOTileLoader
Parameters:
tile - The tile to load.
Throws:
Exception - if an error occurs while loading the tile.
See Also:
getResultSet(ilog.views.tiling.IlvTile)

getSize

public IlvRect getSize()
                throws SQLException
Returns the size of the tile loader.

Specified by:
getSize in class IlvSDOTileLoader
Throws:
SQLException
See Also:
IlvTiledLayer.getSize()

connectionRestored

public void connectionRestored()
                        throws SQLException
This method is called by the IlvSDOLayer when it is read from an .ivl file, and after the connection to an SDO database has been restored. When the connection to the database has been restored, this method collects the information that will allow the load-on-demand to work.

Overrides:
connectionRestored in class IlvSDOTileLoader
Throws:
SQLException

getSDOTilingLevel

public int getSDOTilingLevel()
Returns the SDO tiling level of the SDO layer.


getDefaultCoordinateSystem

public IlvCoordinateSystem getDefaultCoordinateSystem()
Returns the default IlvCoordinateSystem used to render map features when they do not have a specified one. Null by default

Returns:
Returns the defaultCoordinateSystem.
Since:
JViews 7.5

setDefaultCoordinateSystem

public void setDefaultCoordinateSystem(IlvCoordinateSystem defaultCoordinateSystem)
Sets the default IlvCoordinateSystem used to render map features when they do not have a specified one. Null by default

Parameters:
defaultCoordinateSystem - The defaultCoordinateSystem to set.
Since:
JViews 7.5


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.