com.browseengine.bobo.facets.impl
Class PathFacetHandler

java.lang.Object
  extended by com.browseengine.bobo.facets.FacetHandler<FacetDataCache>
      extended by com.browseengine.bobo.facets.impl.PathFacetHandler

public class PathFacetHandler
extends FacetHandler<FacetDataCache>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.browseengine.bobo.facets.FacetHandler
FacetHandler.FacetDataNone, FacetHandler.TermCountSize
 
Field Summary
static String SEL_PROP_NAME_DEPTH
           
static String SEL_PROP_NAME_STRICT
           
 
Fields inherited from class com.browseengine.bobo.facets.FacetHandler
_name
 
Constructor Summary
PathFacetHandler(String name)
           
PathFacetHandler(String name, boolean multiValue)
           
PathFacetHandler(String name, String indexedName, boolean multiValue)
           
 
Method Summary
 RandomAccessFilter buildRandomAccessAndFilter(String[] vals, Properties prop)
           
 RandomAccessFilter buildRandomAccessFilter(String value, Properties props)
           
 RandomAccessFilter buildRandomAccessOrFilter(String[] vals, Properties prop, boolean isNot)
           
static int getDepth(Properties selectionProp)
          Gets the depth.
 DocComparatorSource getDocComparatorSource()
          builds a comparator to determine how sorting is done
 FacetCountCollectorSource getFacetCountCollectorSource(BrowseSelection sel, FacetSpec ospec)
          Gets a FacetCountCollector
 String[] getFieldValues(BoboIndexReader reader, int id)
          Gets the field value
 Object[] getRawFieldValues(BoboIndexReader reader, int id)
           
 String getSeparator()
           
static boolean isStrict(Properties selectionProp)
          Gets if strict applied for counting.
 FacetDataCache load(BoboIndexReader reader)
          Load information from an index reader, initialized by BoboIndexReader
static void setDepth(Properties props, int depth)
          Sets the depth.
 void setSeparator(String separator)
           
static void setStrict(Properties props, boolean strict)
          Sets is strict applied for counting.
 
Methods inherited from class com.browseengine.bobo.facets.FacetHandler
buildFilter, clone, getDependedFacetHandler, getDependsOn, getFacetData, getFieldValue, getName, getTermCountSize, load, loadFacetData, loadFacetData, merge, putDependedFacetHandler, setTermCountSize, setTermCountSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEL_PROP_NAME_STRICT

public static final String SEL_PROP_NAME_STRICT
See Also:
Constant Field Values

SEL_PROP_NAME_DEPTH

public static final String SEL_PROP_NAME_DEPTH
See Also:
Constant Field Values
Constructor Detail

PathFacetHandler

public PathFacetHandler(String name)

PathFacetHandler

public PathFacetHandler(String name,
                        boolean multiValue)

PathFacetHandler

public PathFacetHandler(String name,
                        String indexedName,
                        boolean multiValue)
Method Detail

setStrict

public static void setStrict(Properties props,
                             boolean strict)
Sets is strict applied for counting. Used if the field is of type path.

Parameters:
strict - is strict applied

setDepth

public static void setDepth(Properties props,
                            int depth)
Sets the depth. Used if the field is of type path.

Parameters:
depth - depth

isStrict

public static boolean isStrict(Properties selectionProp)
Gets if strict applied for counting. Used if the field is of type path.

Returns:
is strict applied

getDepth

public static int getDepth(Properties selectionProp)
Gets the depth. Used if the field is of type path.

Returns:
depth

getDocComparatorSource

public DocComparatorSource getDocComparatorSource()
Description copied from class: FacetHandler
builds a comparator to determine how sorting is done

Specified by:
getDocComparatorSource in class FacetHandler<FacetDataCache>
Returns:
a sort comparator

getFieldValues

public String[] getFieldValues(BoboIndexReader reader,
                               int id)
Description copied from class: FacetHandler
Gets the field value

Specified by:
getFieldValues in class FacetHandler<FacetDataCache>
Parameters:
reader - index reader
id - doc
Returns:
array of field values
See Also:
FacetHandler.getFieldValue(BoboIndexReader,int)

getRawFieldValues

public Object[] getRawFieldValues(BoboIndexReader reader,
                                  int id)
Overrides:
getRawFieldValues in class FacetHandler<FacetDataCache>

setSeparator

public void setSeparator(String separator)

getSeparator

public String getSeparator()

buildRandomAccessFilter

public RandomAccessFilter buildRandomAccessFilter(String value,
                                                  Properties props)
                                           throws IOException
Specified by:
buildRandomAccessFilter in class FacetHandler<FacetDataCache>
Throws:
IOException

buildRandomAccessAndFilter

public RandomAccessFilter buildRandomAccessAndFilter(String[] vals,
                                                     Properties prop)
                                              throws IOException
Overrides:
buildRandomAccessAndFilter in class FacetHandler<FacetDataCache>
Throws:
IOException

buildRandomAccessOrFilter

public RandomAccessFilter buildRandomAccessOrFilter(String[] vals,
                                                    Properties prop,
                                                    boolean isNot)
                                             throws IOException
Overrides:
buildRandomAccessOrFilter in class FacetHandler<FacetDataCache>
Throws:
IOException

getFacetCountCollectorSource

public FacetCountCollectorSource getFacetCountCollectorSource(BrowseSelection sel,
                                                              FacetSpec ospec)
Description copied from class: FacetHandler
Gets a FacetCountCollector

Specified by:
getFacetCountCollectorSource in class FacetHandler<FacetDataCache>
Parameters:
sel - selection
ospec - facetSpec
Returns:
a FacetCountCollector

load

public FacetDataCache load(BoboIndexReader reader)
                    throws IOException
Description copied from class: FacetHandler
Load information from an index reader, initialized by BoboIndexReader

Specified by:
load in class FacetHandler<FacetDataCache>
Parameters:
reader - reader
Throws:
IOException


Copyright © 2011. All Rights Reserved.