com.browseengine.bobo.facets.impl
Class PathFacetCountCollector

java.lang.Object
  extended by com.browseengine.bobo.facets.impl.PathFacetCountCollector
All Implemented Interfaces:
FacetAccessible, FacetCountCollector
Direct Known Subclasses:
MultiValuedPathFacetCountCollector

public class PathFacetCountCollector
extends Object
implements FacetCountCollector


Field Summary
protected  int[] _count
           
protected  FacetDataCache _dataCache
           
 
Fields inherited from interface com.browseengine.bobo.facets.FacetCountCollector
EMPTY_FACET_LIST
 
Method Summary
 void close()
          Responsible for release resources used.
 void collect(int docid)
          Collect a hit.
 void collectAll()
          Collects all hits.
 int[] getCountDistribution()
          Returns an integer array representing the distribution function of a given facet.
 BrowseFacet getFacet(String value)
          Gets the facet given a value.
 List<BrowseFacet> getFacets()
          Gets gathered top facets
 String getName()
          Gets the name of the facet
 FacetIterator iterator()
          Returns an iterator to visit all the facets
 boolean splitString(String input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_count

protected int[] _count

_dataCache

protected final FacetDataCache _dataCache
Method Detail

getCountDistribution

public int[] getCountDistribution()
Description copied from interface: FacetCountCollector
Returns an integer array representing the distribution function of a given facet.

Specified by:
getCountDistribution in interface FacetCountCollector
Returns:
integer array of count values representing distribution of the facet values.

getName

public String getName()
Description copied from interface: FacetCountCollector
Gets the name of the facet

Specified by:
getName in interface FacetCountCollector
Returns:
facet name

collect

public void collect(int docid)
Description copied from interface: FacetCountCollector
Collect a hit. This is called for every hit, thus the implementation needs to be super-optimized.

Specified by:
collect in interface FacetCountCollector
Parameters:
docid - doc

collectAll

public void collectAll()
Description copied from interface: FacetCountCollector
Collects all hits. This is called once per request by the facet engine in certain scenarios.

Specified by:
collectAll in interface FacetCountCollector

getFacet

public BrowseFacet getFacet(String value)
Description copied from interface: FacetAccessible
Gets the facet given a value. This is a way for random accessing into the facet data structure.

Specified by:
getFacet in interface FacetAccessible
Parameters:
value - Facet value
Returns:
a facet with count filled in

splitString

public boolean splitString(String input)

getFacets

public List<BrowseFacet> getFacets()
Description copied from interface: FacetAccessible
Gets gathered top facets

Specified by:
getFacets in interface FacetAccessible
Returns:
list of facets

close

public void close()
Description copied from interface: FacetAccessible
Responsible for release resources used. If the implementing class does not use a lot of resources, it does not have to do anything.

Specified by:
close in interface FacetAccessible

iterator

public FacetIterator iterator()
Description copied from interface: FacetAccessible
Returns an iterator to visit all the facets

Specified by:
iterator in interface FacetAccessible
Returns:
Returns a FacetIterator to iterate over all the facets


Copyright © 2011. All Rights Reserved.