public abstract class Refiner<T>
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description | 
|---|
Refiner(QName name,
       java.util.Map<T,java.lang.Integer> counters)
Constructs a Refiner with a qualified name for column
 and a Map of counters for how many times a value of type
 T appears in the result. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addRefinements(java.util.List<Refinement<T>> refinements)
Adds a list of Refinements to this Refiner. 
 | 
void | 
consumeCounters(java.util.Map<T,java.lang.Integer> counters)  | 
protected abstract Refinement<T> | 
createRefinement(T key,
                int count)
Type aware subclasses will implement this to create new concrete
 subclasses of Refinement<T> 
 | 
QName | 
getName()
Gets the name of the Refiner which signifies the column
 name of the Row being navigated over. 
 | 
java.util.List<Refinement<T>> | 
getRefinements()
Returns a list of all the Refinements for this Refiner. 
 | 
Refinement<T> | 
lookupRefinement(java.lang.String name)
Lookup a refinement by name. 
 | 
void | 
organize(RefinementOrganizer organizer)
The Refiner drives the organize by taking in
 a RefinementOrganizer. 
 | 
java.lang.String | 
toString()  | 
public Refiner(QName name, java.util.Map<T,java.lang.Integer> counters)
name - the QName that describes the column being
 navigated overcounters - a Map of counters keyed by the values 
 available for navigation overpublic java.util.List<Refinement<T>> getRefinements()
public QName getName()
public final void consumeCounters(java.util.Map<T,java.lang.Integer> counters)
protected abstract Refinement<T> createRefinement(T key, int count)
key - the value to create the refinement with - currently we only
 support creating with one value (as opposed to a List of them) within
 the Refiner consumption.count - number of times this value appearedpublic final Refinement<T> lookupRefinement(java.lang.String name)
name - the name of the Refinement within this Refinerpublic void addRefinements(java.util.List<Refinement<T>> refinements)
refinements - the List of Refinement of type T
 to add to this Refinerpublic void organize(RefinementOrganizer organizer)
organizer - a RefinementOrganizer that is used
 to re-arrange the list of Refinements in this Refinerpublic java.lang.String toString()
toString in class java.lang.Object