Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-05


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

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

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>

getRefiner

public Refiner<T> getRefiner()
Gets the newly created Refiner.
Returns:
a Refiner of 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

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

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-05


Copyright © 2009, 2012, Oracle and/or its affiliates. All rights reserved.