at.tuwien.ifs.somtoolbox.apps.server
Class SOMMap

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.apps.server.SOMMap

public class SOMMap
extends Object

Version:
$Id: SOMMap.java 3888 2010-11-02 17:42:53Z frank $
Author:
Rudolf Mayer

Field Summary
 String applicationPath
           
private static String BASICMAP_IMAGES_DIR
           
private  Hashtable<String,Object[]> basicMapCache
           
private  int cellHeight
           
private  int cellWidth
           
private static Color COLOR_SEARCHRESULT
           
static int DEFAULT_CELL_SIZE
           
 String documentDetailLink
           
 String documentDetailParamName
           
private  float dotSize
           
private  String fullLink
           
private  String imagePathBase
           
private  String imagePathTemp
           
private  Hashtable<String,HTMLMapInformation> interactionMapCache
           
(package private)  Logger logger
           
private  int mapHeight
           
 String mapLink
           
 String mapParamName
           
private  int mapWidth
           
private static int MINIMUM_DIAMETER
           
private  Hashtable<String,HTMLMapInformation> sectionMapCache
           
static String SEPARATOR
           
(package private) static SOMMap singleton
           
static ServerSOM som
           
private static String TEMP_IMAGES_DIR
           
 
Constructor Summary
SOMMap()
           
 
Method Summary
private  void addVis(String defaultVis, String vis, String selected, StringBuffer b)
           
 HTMLMapInformation createFullMap(javax.servlet.http.HttpServletRequest request, String vis, Palette palette, int additionalVisParam, boolean showNodes, boolean showGrid, boolean showLables, String fodokIDs, int paramMapWidth, int paramMapHeight, String fullLink)
           
 HTMLMapInformation createFullMap(javax.servlet.http.HttpServletRequest request, String vis, Palette palette, int additionalVisParam, int paramMapWidth, int paramMapHeight, int zoom, int moveX, int moveY, Point selection, boolean showGrid, boolean showNodes, boolean showLabels, String fodokIDs, String fullLink, Rectangle areaSelection)
           
 String createImageMap(int zoom, int offsetX, int offsetY, int extraOffsetX, int extraOffsetY, int endX, int endY, String fodokId, String fullLink)
           
 String createImageMap(int zoom, int offsetX, int offsetY, int endX, int endY, String fodokId, String fullLink)
           
 String createImageMap(int zoom, int offsetX, int offsetY, String fullLink)
           
 HTMLMapInformation createMapSection(javax.servlet.http.HttpServletRequest request, String vis, Palette palette, int additionalVisParam, boolean showNodes, boolean showGrid, String fodokID, int paramMapWidth, int paramMapHeight)
           
private  void drawMarker(Graphics2D gra, Color fillColor, int zoom, int offsetX, int offsetY, int diameter, int cellOffsetX, int cellOffsetY, int unitX, int unitY)
           
private  BufferedImage getBasicMap(String vis, Palette palette, int additionalVisParam, int zoom, boolean showNodes, boolean showGrid, boolean showLabels)
           
private  String getBasicMapKey(String vis, Palette palette, int zoom, boolean showGrid, boolean showLabels)
           
 String getClassLegend()
           
private  int getDiameter(int zoom)
           
(package private) static SOMMap getInstance()
           
private  String getInteractionMapKey(String fodokID, String mapKey, Point selection)
           
private  String getMapKey(String vis, Palette palette, int moveX, int moveY, int zoom, boolean showLabels, boolean showGrid)
           
private  String getMapSelectionKey(String vis, Palette palette, String fodokID)
           
private  int getOffsetZoom2(int move, float visible)
           
private  int getOffsetZoom3(int move, float visible)
           
 String getVisualisationSelect(String vis, String selected)
           
private  void initMap(int paramMapWidth, int paramMapHeight, Palette palette)
           
static boolean isNotEmpty(String s)
           
static boolean isNotEmptyNumber(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentDetailLink

public String documentDetailLink

documentDetailParamName

public String documentDetailParamName

mapLink

public String mapLink

mapParamName

public String mapParamName

COLOR_SEARCHRESULT

private static final Color COLOR_SEARCHRESULT

BASICMAP_IMAGES_DIR

private static final String BASICMAP_IMAGES_DIR
See Also:
Constant Field Values

TEMP_IMAGES_DIR

private static final String TEMP_IMAGES_DIR
See Also:
Constant Field Values

SEPARATOR

public static final String SEPARATOR

MINIMUM_DIAMETER

private static final int MINIMUM_DIAMETER
See Also:
Constant Field Values

DEFAULT_CELL_SIZE

public static final int DEFAULT_CELL_SIZE
See Also:
Constant Field Values

applicationPath

public String applicationPath

imagePathBase

private String imagePathBase

imagePathTemp

private String imagePathTemp

som

public static final ServerSOM som

cellWidth

private int cellWidth

cellHeight

private int cellHeight

mapWidth

private int mapWidth

mapHeight

private int mapHeight

basicMapCache

private Hashtable<String,Object[]> basicMapCache

interactionMapCache

private Hashtable<String,HTMLMapInformation> interactionMapCache

sectionMapCache

private Hashtable<String,HTMLMapInformation> sectionMapCache

dotSize

private float dotSize

fullLink

private String fullLink

singleton

static SOMMap singleton

logger

Logger logger
Constructor Detail

SOMMap

public SOMMap()
       throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException
Method Detail

getInstance

static SOMMap getInstance()
                   throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

createMapSection

public HTMLMapInformation createMapSection(javax.servlet.http.HttpServletRequest request,
                                           String vis,
                                           Palette palette,
                                           int additionalVisParam,
                                           boolean showNodes,
                                           boolean showGrid,
                                           String fodokID,
                                           int paramMapWidth,
                                           int paramMapHeight)
                                    throws LayerAccessException
Throws:
LayerAccessException

getDiameter

private int getDiameter(int zoom)

createFullMap

public HTMLMapInformation createFullMap(javax.servlet.http.HttpServletRequest request,
                                        String vis,
                                        Palette palette,
                                        int additionalVisParam,
                                        int paramMapWidth,
                                        int paramMapHeight,
                                        int zoom,
                                        int moveX,
                                        int moveY,
                                        Point selection,
                                        boolean showGrid,
                                        boolean showNodes,
                                        boolean showLabels,
                                        String fodokIDs,
                                        String fullLink,
                                        Rectangle areaSelection)
                                 throws LayerAccessException
Throws:
LayerAccessException

getOffsetZoom3

private int getOffsetZoom3(int move,
                           float visible)

getOffsetZoom2

private int getOffsetZoom2(int move,
                           float visible)

createFullMap

public HTMLMapInformation createFullMap(javax.servlet.http.HttpServletRequest request,
                                        String vis,
                                        Palette palette,
                                        int additionalVisParam,
                                        boolean showNodes,
                                        boolean showGrid,
                                        boolean showLables,
                                        String fodokIDs,
                                        int paramMapWidth,
                                        int paramMapHeight,
                                        String fullLink)
                                 throws LayerAccessException
Throws:
LayerAccessException

initMap

private void initMap(int paramMapWidth,
                     int paramMapHeight,
                     Palette palette)

isNotEmpty

public static boolean isNotEmpty(String s)

isNotEmptyNumber

public static boolean isNotEmptyNumber(String s)

getBasicMap

private BufferedImage getBasicMap(String vis,
                                  Palette palette,
                                  int additionalVisParam,
                                  int zoom,
                                  boolean showNodes,
                                  boolean showGrid,
                                  boolean showLabels)

drawMarker

private void drawMarker(Graphics2D gra,
                        Color fillColor,
                        int zoom,
                        int offsetX,
                        int offsetY,
                        int diameter,
                        int cellOffsetX,
                        int cellOffsetY,
                        int unitX,
                        int unitY)

getBasicMapKey

private String getBasicMapKey(String vis,
                              Palette palette,
                              int zoom,
                              boolean showGrid,
                              boolean showLabels)

getMapSelectionKey

private String getMapSelectionKey(String vis,
                                  Palette palette,
                                  String fodokID)

getInteractionMapKey

private String getInteractionMapKey(String fodokID,
                                    String mapKey,
                                    Point selection)

getMapKey

private String getMapKey(String vis,
                         Palette palette,
                         int moveX,
                         int moveY,
                         int zoom,
                         boolean showLabels,
                         boolean showGrid)

createImageMap

public String createImageMap(int zoom,
                             int offsetX,
                             int offsetY,
                             String fullLink)
                      throws LayerAccessException
Throws:
LayerAccessException

createImageMap

public String createImageMap(int zoom,
                             int offsetX,
                             int offsetY,
                             int endX,
                             int endY,
                             String fodokId,
                             String fullLink)
                      throws LayerAccessException
Throws:
LayerAccessException

createImageMap

public String createImageMap(int zoom,
                             int offsetX,
                             int offsetY,
                             int extraOffsetX,
                             int extraOffsetY,
                             int endX,
                             int endY,
                             String fodokId,
                             String fullLink)
                      throws LayerAccessException
Throws:
LayerAccessException

getVisualisationSelect

public String getVisualisationSelect(String vis,
                                     String selected)

addVis

private void addVis(String defaultVis,
                    String vis,
                    String selected,
                    StringBuffer b)

getClassLegend

public String getClassLegend()