info.aduna.gee.spectacle
Class Loader

java.lang.Object
  extended by info.aduna.gee.spectacle.Loader
Direct Known Subclasses:
SpectacleLoader

public abstract class Loader
extends Object

A generic class for talking to Spectacle Server; this is a facade towards the entire lower-level spectacle APIs.

The spectacle loader supports one type of entities at a time.

Generated names and required IDs: :


Field Summary
static String DEFAULT_LABELS_PATTERN
           
static String ENTITIES_DATA_FILENAME
           
static String INTERNAL_LIST_SEQUENCE_FIELD
          Don't use this name for any of your entity fields, when the List variant of setEntities() is used.
static String NAVSPEC_DATA_FILENAME
           
static String RENDERER_DATA_FILENAME
           
 
Constructor Summary
Loader()
          Construct a new Loader for use as Guided Exploration Engine
Loader(String appName)
          Construct a new spectacle loader for the given application.
Loader(String appName, String coverName)
          Construct a new spectacle loader, that connects to spectacle in the context of the given application name.
Loader(String appName, String coverName, int timeToLive)
          Construct a new spectacle loader, that connects to spectacle in the context of the given application name.
 
Method Summary
 void commit()
          Commit all currently known information to the spectacle server.
protected abstract  List<Entity> createEntities()
          Returns the List of explored Entities.
protected abstract  List<FacetClassifier> createFacets()
          Returns the List of Classifiers used to explore the Entities.
 NavigationTree getNavigationTree()
          For local GEE applications only: return the resulting NavigationTree.
 void run()
          Creates and sets entities and facets and commits the results.
 void setEntities(List<Entity> entities)
          Store the given entities in the specified sequence on the spectacle server.
 void setEntities(Map<Object,Entity> entities)
          Store the given entities in the spectacle server.
 void setFacets(List<FacetClassifier> facetClassifiers)
          Sets the facets being used, and how they are classified.
 void setNavigation(NavigationRules navRules, String sectionRendererClass)
          Store the given navigation specification in the spectacle server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTITIES_DATA_FILENAME

public static final String ENTITIES_DATA_FILENAME
See Also:
Constant Field Values

NAVSPEC_DATA_FILENAME

public static final String NAVSPEC_DATA_FILENAME
See Also:
Constant Field Values

RENDERER_DATA_FILENAME

public static final String RENDERER_DATA_FILENAME
See Also:
Constant Field Values

INTERNAL_LIST_SEQUENCE_FIELD

public static final String INTERNAL_LIST_SEQUENCE_FIELD
Don't use this name for any of your entity fields, when the List variant of setEntities() is used.

See Also:
Constant Field Values

DEFAULT_LABELS_PATTERN

public static final String DEFAULT_LABELS_PATTERN
See Also:
Constant Field Values
Constructor Detail

Loader

public Loader()
Construct a new Loader for use as Guided Exploration Engine


Loader

public Loader(String appName)
Construct a new spectacle loader for the given application.

Parameters:
appName - Uniquely identifying name for application, which is used for looking up the various channels: some channels are prefixed with this appName.

Loader

public Loader(String appName,
              String coverName)
Construct a new spectacle loader, that connects to spectacle in the context of the given application name.

Parameters:
appName - Uniquely identifying name for application, which is used for looking up the various channels: some channels are prefixed with this appName.
coverName - The name of the cover to be used.

Loader

public Loader(String appName,
              String coverName,
              int timeToLive)
Construct a new spectacle loader, that connects to spectacle in the context of the given application name.

Parameters:
appName - Uniquely identifying name for application, which is used for looking up the various channels: some channels are prefixed with this appName.
coverName - The name of the cover to be used.
timeToLive - After timeToLive seconds of no access, the spectacle channels are automatically removed (0 means don't remove automatically, which is the default).
Method Detail

run

public void run()
Creates and sets entities and facets and commits the results.


createEntities

protected abstract List<Entity> createEntities()
Returns the List of explored Entities.


createFacets

protected abstract List<FacetClassifier> createFacets()
Returns the List of Classifiers used to explore the Entities.


commit

public void commit()
Commit all currently known information to the spectacle server.


setEntities

public void setEntities(Map<Object,Entity> entities)
Store the given entities in the spectacle server.


setEntities

public void setEntities(List<Entity> entities)
Store the given entities in the specified sequence on the spectacle server. Note: the id of each Entity must be unique or you will loose some!


setFacets

public void setFacets(List<FacetClassifier> facetClassifiers)
Sets the facets being used, and how they are classified. To allow multiple selection of facet values (i.e. and's of them), include the classifier more than once in the List.


setNavigation

public void setNavigation(NavigationRules navRules,
                          String sectionRendererClass)
Store the given navigation specification in the spectacle server. This is forced to a default if this method is not invoked, which is the same as invoking this method with to 'null' arguments.


getNavigationTree

public NavigationTree getNavigationTree()
For local GEE applications only: return the resulting NavigationTree.

Returns:
the NavigationTree


Copyright © 1997-2008 Aduna. All Rights Reserved.