Skip navigation links

Oracle Fusion Middleware Web 2.0 Services Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1)
E10693-01


oracle.webcenter.search.refine
Class Refiner<T>

java.lang.Object
  extended by oracle.webcenter.search.refine.Refiner<T>

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DateRefiner, StringRefiner

public abstract class Refiner<T>
extends java.lang.Object
implements java.io.Serializable

A abstract base class that captures what is necessary to implement Navigated searches. It is driven by a QName to indicate which column within the Row in the QueryResult, it can navigate over. It holds a list of Refinements that perform the actual modification of the Predicates in a Query.

Since:
11.1.1.0.0 Beta 2
See Also:
Serialized Form

Constructor Summary
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.

 

Method Summary
 void addRefinements(java.util.List<Refinement<T>> refinements)
          Adds a list of Refinements to this Refiner.
protected abstract  Refinement<T> createRefinement(T key, int count)
          Type aware subclasses will implement this to create new concrete subclasses of Refinement&ltT>
 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()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

Refiner

public 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.
Parameters:
name - the QName that describes the column being navigated over
counters - a Map of counters keyed by the values available for navigation over

Method Detail

addRefinements

public void addRefinements(java.util.List<Refinement<T>> refinements)
Adds a list of Refinements to this Refiner.
Parameters:
refinements - the List of Refinement of type T to add to this Refiner

createRefinement

protected abstract Refinement<T> createRefinement(T key,
                                                  int count)
Type aware subclasses will implement this to create new concrete subclasses of Refinement&ltT>
Parameters:
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 appeared
Returns:
a Refinement of type T

getName

public QName getName()
Gets the name of the Refiner which signifies the column name of the Row being navigated over.
Returns:
a QName signifying the column being navigated over

getRefinements

public java.util.List<Refinement<T>> getRefinements()
Returns a list of all the Refinements for this Refiner.
Returns:
a List of Refinements of type T

lookupRefinement

public final Refinement<T> lookupRefinement(java.lang.String name)
Lookup a refinement by name.
Parameters:
name - the name of the Refinement within this Refiner
Returns:
the Refinement with the matching name, null if the name is null or if no Refinements are found.

organize

public void organize(RefinementOrganizer organizer)
The Refiner drives the organize by taking in a RefinementOrganizer.
Parameters:
organizer - a RefinementOrganizer that is used to re-arrange the list of Refinements in this Refiner

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Web 2.0 Services Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1)
E10693-01


Copyright © 2009, Oracle. All rights reserved.