Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.visualizers
Class VisualizerContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,Object>
          extended by de.lmu.ifi.dbs.elki.utilities.AnyMap<String>
              extended by de.lmu.ifi.dbs.elki.visualization.visualizers.VisualizerContext
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class VisualizerContext
extends AnyMap<String>

Map to store context information for the visualizer. This can be any data that should to be shared among plots, such as line colors, styles etc.

Author:
Erich Schubert
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
static String CLUSTERING
          Identifier for the primary clustering to use.
static String CLUSTERING_FALLBACK
          Identifier for a fallback (default) clustering.
static String COLOR_LIBRARY
          Identifier for the main color library to use.
private  Database<?> database
          The database
static String LINESTYLE_LIBRARY
          Identifier for the main line library to use.
static String MARKER_LIBRARY
          Identifier for the main marker library to use.
private  Result result
          The full result object
private static long serialVersionUID
          Serial version.
static String STYLE_LIBRARY
          Identifier for the main style library to use.
 
Constructor Summary
VisualizerContext(Database<?> database, Result result)
          Constructor.
 
Method Summary
private  Clustering<Model> generateDefaultClustering()
          Generate a default (fallback) clustering.
<O extends DatabaseObject>
Database<O>
getDatabase()
          Get the database itself
 LineStyleLibrary getLineStyleLibrary()
          Convenience method to get the current line style library, or use a default.
 MarkerLibrary getMarkerLibrary()
          Convenience method to get the current marker
 Clustering<Model> getOrCreateDefaultClustering()
          Convenience method to get the clustering to use, and fall back to a default "clustering".
 Result getResult()
          Get the full result object
 StyleLibrary getStyleLibrary()
          Get the style library
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.AnyMap
get, get, getGenerics
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version.

See Also:
Constant Field Values

database

private Database<?> database
The database


result

private Result result
The full result object


COLOR_LIBRARY

public static final String COLOR_LIBRARY
Identifier for the main color library to use.

See Also:
Constant Field Values

MARKER_LIBRARY

public static final String MARKER_LIBRARY
Identifier for the main marker library to use.

See Also:
Constant Field Values

LINESTYLE_LIBRARY

public static final String LINESTYLE_LIBRARY
Identifier for the main line library to use.

See Also:
Constant Field Values

STYLE_LIBRARY

public static final String STYLE_LIBRARY
Identifier for the main style library to use.

See Also:
Constant Field Values

CLUSTERING

public static final String CLUSTERING
Identifier for the primary clustering to use.

See Also:
Constant Field Values

CLUSTERING_FALLBACK

public static final String CLUSTERING_FALLBACK
Identifier for a fallback (default) clustering.

See Also:
Constant Field Values
Constructor Detail

VisualizerContext

public VisualizerContext(Database<?> database,
                         Result result)
Constructor. We currently require a Database and a Result.

Parameters:
database - Database
result - Result
Method Detail

getDatabase

public <O extends DatabaseObject> Database<O> getDatabase()
Get the database itself

Type Parameters:
O - Database object type
Returns:
Database

getResult

public Result getResult()
Get the full result object

Returns:
result object

getMarkerLibrary

public MarkerLibrary getMarkerLibrary()
Convenience method to get the current marker

Returns:
Marker library

getLineStyleLibrary

public LineStyleLibrary getLineStyleLibrary()
Convenience method to get the current line style library, or use a default.

Returns:
Line style library

getStyleLibrary

public StyleLibrary getStyleLibrary()
Get the style library

Returns:
style library

getOrCreateDefaultClustering

public Clustering<Model> getOrCreateDefaultClustering()
Convenience method to get the clustering to use, and fall back to a default "clustering".

Returns:
Clustering to use

generateDefaultClustering

private Clustering<Model> generateDefaultClustering()
Generate a default (fallback) clustering.

Returns:
generated clustering

Release 0.3 (2010-03-31_1612)