it.eng.spagobi.engines.geo.map.renderer
Class InteractiveMapRenderer

java.lang.Object
  extended by it.eng.spagobi.engines.geo.AbstractGeoEngineComponent
      extended by it.eng.spagobi.engines.geo.map.renderer.AbstractMapRenderer
          extended by it.eng.spagobi.engines.geo.map.renderer.InteractiveMapRenderer
All Implemented Interfaces:
IGeoEngineComponent, IMapRenderer

public class InteractiveMapRenderer
extends AbstractMapRenderer

The Class InteractiveMapRenderer.

Author:
Andrea Gioia

Field Summary
static org.apache.log4j.Logger logger
          Logger component.
 
Constructor Summary
InteractiveMapRenderer()
          Instantiates a new interactive map renderer.
 
Method Summary
 java.lang.String[] getGradientColourRange(java.lang.String base_color, int num_group)
          Gets the gradient colour range.
 org.json.JSONObject getGUIConfigurationScript()
          Gets the gUI configuration script.
 org.json.JSONArray getLayersConfigurationScript(org.w3c.dom.svg.SVGDocument doc)
          Gets the layers configuration script.
 org.json.JSONArray getMeasuresConfigurationScript(DataMart datamart)
          Gets the measures configuration script.
 java.io.File getTempFile()
          Gets the temporary file.
 void init(java.lang.Object conf)
          Inits the.
 java.io.File renderMap(IMapProvider mapProvider, IDataMartProvider datamartProvider)
          Render map.
 java.io.File renderMap(IMapProvider mapProvider, IDataMartProvider datamartProvider, java.lang.String outputFormat)
          Render map.
 void setMainMapBkgRectDimension(org.w3c.dom.svg.SVGDocument masterMap, org.w3c.dom.svg.SVGDocument targetMap)
          Sets the main map bkg rect dimension.
 void setMainMapDimension(org.w3c.dom.svg.SVGDocument masterMap, org.w3c.dom.svg.SVGDocument targetMap)
          Sets the main map dimension.
 
Methods inherited from class it.eng.spagobi.engines.geo.map.renderer.AbstractMapRenderer
addLayer, clearLayers, getColoursArray, getGuiSettings, getLayer, getLayerNames, getMeasure, getSelectedMeasureName, getTresholdsArray, setGuiSettings, setLayers, setMeasures, setSelectedMeasureName
 
Methods inherited from class it.eng.spagobi.engines.geo.AbstractGeoEngineComponent
getConf, getEnv, setEnv
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.eng.spagobi.engines.geo.IGeoEngineComponent
setEnv
 

Field Detail

logger

public static transient org.apache.log4j.Logger logger
Logger component.

Constructor Detail

InteractiveMapRenderer

public InteractiveMapRenderer()
Instantiates a new interactive map renderer.

Method Detail

init

public void init(java.lang.Object conf)
          throws GeoEngineException
Description copied from interface: IGeoEngineComponent
Inits the.

Specified by:
init in interface IGeoEngineComponent
Overrides:
init in class AbstractMapRenderer
Parameters:
conf - the conf
Throws:
GeoEngineException - the geo engine exception

renderMap

public java.io.File renderMap(IMapProvider mapProvider,
                              IDataMartProvider datamartProvider)
                       throws GeoEngineException
Description copied from interface: IMapRenderer
Render map.

Specified by:
renderMap in interface IMapRenderer
Overrides:
renderMap in class AbstractMapRenderer
Parameters:
mapProvider - the map provider
datamartProvider - the datamart provider
Returns:
the file
Throws:
GeoEngineException - the geo engine exception

renderMap

public java.io.File renderMap(IMapProvider mapProvider,
                              IDataMartProvider datamartProvider,
                              java.lang.String outputFormat)
                       throws GeoEngineException
Description copied from interface: IMapRenderer
Render map.

Specified by:
renderMap in interface IMapRenderer
Overrides:
renderMap in class AbstractMapRenderer
Parameters:
mapProvider - the map provider
datamartProvider - the datamart provider
outputFormat - the output format
Returns:
the file
Throws:
GeoEngineException - the geo engine exception

getGradientColourRange

public java.lang.String[] getGradientColourRange(java.lang.String base_color,
                                                 int num_group)
Gets the gradient colour range.

Parameters:
base_color - the base_color
num_group - the num_group
Returns:
the gradient colour range

setMainMapDimension

public void setMainMapDimension(org.w3c.dom.svg.SVGDocument masterMap,
                                org.w3c.dom.svg.SVGDocument targetMap)
Sets the main map dimension.

Parameters:
masterMap - the master map
targetMap - the target map

setMainMapBkgRectDimension

public void setMainMapBkgRectDimension(org.w3c.dom.svg.SVGDocument masterMap,
                                       org.w3c.dom.svg.SVGDocument targetMap)
Sets the main map bkg rect dimension.

Parameters:
masterMap - the master map
targetMap - the target map

getMeasuresConfigurationScript

public org.json.JSONArray getMeasuresConfigurationScript(DataMart datamart)
                                                  throws org.json.JSONException
Gets the measures configuration script.

Parameters:
datamart - the datamart
Returns:
the measures configuration script
Throws:
org.json.JSONException

getLayersConfigurationScript

public org.json.JSONArray getLayersConfigurationScript(org.w3c.dom.svg.SVGDocument doc)
                                                throws org.json.JSONException
Gets the layers configuration script.

Parameters:
doc - the doc
targetLayer - the target layer
Returns:
the layers configuration script
Throws:
org.json.JSONException

getTempFile

public java.io.File getTempFile()
                         throws java.io.IOException
Gets the temporary file.

Returns:
the temporary file
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getGUIConfigurationScript

public org.json.JSONObject getGUIConfigurationScript()
                                              throws org.json.JSONException
Gets the gUI configuration script.

Returns:
the gUI configuration script
Throws:
org.json.JSONException