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 RefinerBuilder<T>

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

Direct Known Subclasses:
DateRefinerBuilder, StringRefinerBuilder

public abstract class RefinerBuilder<T>
extends java.lang.Object

An abstract base class for building Refiners of type T. It is often constructed with a QName that it eventually passes on to the Refiner it builds.

Since:
11.1.1.0.0 Beta 2

Constructor Summary
protected RefinerBuilder(QName name)
          Constructs a RefinerBuilder with a qualified name.

 

Method Summary
 void consumeRow(Row row)
          Use the stored column name to access the column value and convert it to T and visit that T value.
protected abstract  T convert(java.lang.Object value)
          Method used by subclasses to convert any Object into an Object of type T.
protected abstract  Refiner<T> createRefiner(QName column, java.util.Map<T,java.lang.Integer> counters)
          Creates a Refiner with the column name and a map of counters for each entry of type T.
 Refiner<T> getRefiner()
          Gets the newly created Refiner.
 void visit(T value)
          Visits a T value that increments the count.
 void visit(T value, int count)
          Visits a T value and increase by the count

 

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

 

Constructor Detail

RefinerBuilder

protected RefinerBuilder(QName name)
Constructs a RefinerBuilder with a qualified name.
Parameters:
name - the name to associate with the eventual Refiner built

Method Detail

consumeRow

public void consumeRow(Row row)
Use the stored column name to access the column value and convert it to T and visit that T value.
Parameters:
row - a Row in a QueryResult<Row>

convert

protected abstract T convert(java.lang.Object value)
Method used by subclasses to convert any Object into an Object of type T.
Parameters:
value - an arbitrary Object that can be converted to type T

createRefiner

protected abstract Refiner<T> createRefiner(QName column,
                                            java.util.Map<T,java.lang.Integer> counters)
Creates a Refiner with the column name and a map of counters for each entry of type T.
Parameters:
column - a QName signifying the column to navigate over
counters - a Map of counters, one for each T value encountered

getRefiner

public Refiner<T> getRefiner()
Gets the newly created Refiner.
Returns:
a Refiner of type T

visit

public void visit(T value)
Visits a T value that increments the count.
Parameters:
value - a T value that we are keeping a count of

visit

public void visit(T value,
                  int count)
Visits a T value and increase by the count
Parameters:
value - a T value that we are keeping a count of
count - increase by the count

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.