|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.browseengine.bobo.facets.impl.GeoFacetCountCollector
public class GeoFacetCountCollector
| Nested Class Summary | |
|---|---|
static class |
GeoFacetCountCollector.GeoRange
|
| Field Summary |
|---|
| Fields inherited from interface com.browseengine.bobo.facets.FacetCountCollector |
|---|
EMPTY_FACET_LIST |
| Constructor Summary | |
|---|---|
protected |
GeoFacetCountCollector(String name,
GeoFacetHandler.GeoFacetData dataCache,
int docBase,
FacetSpec fspec,
List<String> predefinedRanges,
boolean miles)
|
| Method Summary | |
|---|---|
void |
close()
|
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 |
static GeoFacetCountCollector.GeoRange |
parse(String range)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected GeoFacetCountCollector(String name,
GeoFacetHandler.GeoFacetData dataCache,
int docBase,
FacetSpec fspec,
List<String> predefinedRanges,
boolean miles)
name - name of the Geo FacetdataCache - The data cache for the Geo FacetdocBase - the base doc idspec - the facet spec for this facetpredefinedRanges - List of ranges, where each range looks like miles - variable to specify if the geo distance calculations are in miles. False indicates distance calculation is in kilometers| Method Detail |
|---|
public void collect(int docid)
FacetCountCollector
collect in interface FacetCountCollectordocid - The docid for which the facet counts are to be calculatedpublic void collectAll()
FacetCountCollector
collectAll in interface FacetCountCollectorpublic int[] getCountDistribution()
FacetCountCollector
getCountDistribution in interface FacetCountCollectorpublic String getName()
FacetCountCollector
getName in interface FacetCountCollectorpublic BrowseFacet getFacet(String value)
FacetAccessible
getFacet in interface FacetAccessiblevalue - This value should be one of the user-specified ranges for this Facet Count Collector. Else an
IllegalArgumentException will be raised
public List<BrowseFacet> getFacets()
FacetAccessible
getFacets in interface FacetAccessiblepublic static GeoFacetCountCollector.GeoRange parse(String range)
range - Value should be of the format - lat , lon : radius
public void close()
close in interface FacetAccessiblepublic FacetIterator iterator()
FacetAccessible
iterator in interface FacetAccessible
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||