info.aduna.gee.spectacle
Class AbstractFacetByClassificationClassifier

java.lang.Object
  extended by info.aduna.gee.spectacle.gee.AbstractByClassificationClassifier
      extended by info.aduna.gee.spectacle.AbstractFacetByClassificationClassifier
All Implemented Interfaces:
FacetClassifier, Classifier
Direct Known Subclasses:
LanguageClassifier, PeopleClassifier, SizeClassifier, TimeClassifier

public abstract class AbstractFacetByClassificationClassifier
extends AbstractByClassificationClassifier
implements FacetClassifier

A by-classification classifier that can be implemented for a facet. Classes doing this, will now also have to implement 'getFacetName' in order to let spectacle know which facet this classifier is used for.


Field Summary
 
Fields inherited from interface info.aduna.gee.spectacle.gee.Classifier
BY_CLASSIFICATION, BY_ENTITY
 
Constructor Summary
AbstractFacetByClassificationClassifier()
           
 
Method Summary
 int getDepth()
          Should be overridden by subclasses when needed.
 Map<Object,Entity> getEntities()
          Get a handle to all the entities, returns a map with key=entityID and value=Entity object.
 Entity getEntity(Object entityID)
          Get a handle to the entity with the given ID.
 String getInternalFacetName()
          Should be overridden by subclasses when needed.
 void init(Map<Object,Entity> entities)
          Invoked by spectacle just before this classifier has to do its work using the 'getClassifications' method(s).
 
Methods inherited from class info.aduna.gee.spectacle.gee.AbstractByClassificationClassifier
getAccessMethod, getClassifications
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.aduna.gee.spectacle.FacetClassifier
getFacetName
 
Methods inherited from interface info.aduna.gee.spectacle.gee.Classifier
getAccessMethod, getClassifications, getClassifications, getEntityIDs
 

Constructor Detail

AbstractFacetByClassificationClassifier

public AbstractFacetByClassificationClassifier()
Method Detail

getEntity

public Entity getEntity(Object entityID)
Get a handle to the entity with the given ID.


getEntities

public Map<Object,Entity> getEntities()
Get a handle to all the entities, returns a map with key=entityID and value=Entity object.


init

public void init(Map<Object,Entity> entities)
Invoked by spectacle just before this classifier has to do its work using the 'getClassifications' method(s).

Specified by:
init in interface FacetClassifier

getInternalFacetName

public String getInternalFacetName()
Should be overridden by subclasses when needed.

Specified by:
getInternalFacetName in interface FacetClassifier
Returns:
the internal facet name for which this classifier handles the classification; this is might differ from the actual name shown on screen.

getDepth

public int getDepth()
Should be overridden by subclasses when needed. 99% of all classifiers have a 1 depth.

Specified by:
getDepth in interface Classifier
Returns:
the depth


Copyright © 1997-2008 Aduna. All Rights Reserved.