info.aduna.gee.spectacle.gee
Class Labeler
java.lang.Object
info.aduna.gee.spectacle.gee.Labeler
public class Labeler
- extends Object
Class Labeler represents a mapping between classification (as maintained
by a Classifier) and labels (as used by the a12r publication server).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Labeler
public Labeler(EntityContext context,
Classifier classifier)
- Construct a new Labeler.
- Parameters:
context - the context from which to obtain the labelsclassifier - the classifier used to classify the entities
getDepth
public int getDepth()
- Returns:
- the depth of this Labeler, i.e. the number of hierarchical
levels this lableler supports.
getLabels
public Map<String,String> getLabels()
- Returns:
- the complete set of labels maintained by this labeller,
mapped to their descriptions
getLabels
public Map<String,String> getLabels(int level)
- Parameters:
level - the hierarchical level to get the labels from
- Returns:
- the set of labels at the specified level, mapped to their
descriptions
getClassifications
public Map<String,Object> getClassifications()
- Returns:
- the complete set of labels maintained by this labeller,
mapped to their classifications
getClassifications
public Map<String,Object> getClassifications(int level)
- Parameters:
level - the hierarchical level to get the labels from
- Returns:
- the set of labels at the specified level, mapped to their
classifications
getLabel
public String getLabel(Object classification)
- Parameters:
classification - the classification to get the label for
- Returns:
- the label assigned to the specified classification at any
level, or null if the classification could not be found
getLabel
public String getLabel(Object classification,
int level)
- Parameters:
classification - the classification to get the label forlevel - the hierarchical level
- Returns:
- the label assigned to the specified classification at the
specified level, or null if the classification could not
be found at this level
label
public void label()
- Perform the actual labelling of all entities in this labelers
context, using this labelers classification.
Copyright © 1997-2008 Aduna. All Rights Reserved.