com.browseengine.bobo.facets
Class RuntimeFacetHandler<D>

java.lang.Object
  extended by com.browseengine.bobo.facets.FacetHandler<D>
      extended by com.browseengine.bobo.facets.RuntimeFacetHandler<D>
Type Parameters:
D - type parameter for FacetData
Direct Known Subclasses:
DynamicRangeFacetHandler, GeoSimpleFacetHandler, HistogramFacetHandler

public abstract class RuntimeFacetHandler<D>
extends FacetHandler<D>

Abstract class for RuntimeFacetHandlers. A concrete RuntimeFacetHandler should implement the FacetHandlerFactory and RuntimeInitializable so that bobo knows how to create new instance of the handler at run time and how to initialize it at run time respectively.

Author:
ymatsuda

Nested Class Summary
 
Nested classes/interfaces inherited from class com.browseengine.bobo.facets.FacetHandler
FacetHandler.FacetDataNone, FacetHandler.TermCountSize
 
Field Summary
 
Fields inherited from class com.browseengine.bobo.facets.FacetHandler
_name
 
Constructor Summary
RuntimeFacetHandler(String name)
          Constructor
RuntimeFacetHandler(String name, Set<String> dependsOn)
          Constructor that specifying the dependent facet handlers using names.
 
Method Summary
 void close()
           
 D getFacetData(BoboIndexReader reader)
           
 void loadFacetData(BoboIndexReader reader)
           
 void loadFacetData(BoboIndexReader reader, BoboIndexReader.WorkArea workArea)
           
 
Methods inherited from class com.browseengine.bobo.facets.FacetHandler
buildFilter, buildRandomAccessAndFilter, buildRandomAccessFilter, buildRandomAccessOrFilter, clone, getDependedFacetHandler, getDependsOn, getDocComparatorSource, getFacetCountCollectorSource, getFacetCountCollectorSource, getFieldValue, getFieldValues, getName, getRawFieldValues, getTermCountSize, load, load, merge, putDependedFacetHandler, setTermCountSize, setTermCountSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeFacetHandler

public RuntimeFacetHandler(String name,
                           Set<String> dependsOn)
Constructor that specifying the dependent facet handlers using names.

Parameters:
name - the name of this FacetHandler, which is used in FacetSpec and Selection to specify the facet. If we regard a facet as a field, the name is like a field name.
dependsOn - Set of names of facet handlers this facet handler depend on for loading.

RuntimeFacetHandler

public RuntimeFacetHandler(String name)
Constructor

Parameters:
name - the name of this FacetHandler, which is used in FacetSpec and Selection to specify the facet. If we regard a facet as a field, the name is like a field name.
Method Detail

getFacetData

public D getFacetData(BoboIndexReader reader)
Overrides:
getFacetData in class FacetHandler<D>

loadFacetData

public void loadFacetData(BoboIndexReader reader,
                          BoboIndexReader.WorkArea workArea)
                   throws IOException
Overrides:
loadFacetData in class FacetHandler<D>
Throws:
IOException

loadFacetData

public void loadFacetData(BoboIndexReader reader)
                   throws IOException
Overrides:
loadFacetData in class FacetHandler<D>
Throws:
IOException

close

public void close()


Copyright © 2011. All Rights Reserved.