com.browseengine.bobo.api
Class BrowseResult

java.lang.Object
  extended by com.browseengine.bobo.api.BrowseResult
All Implemented Interfaces:
Serializable

public class BrowseResult
extends Object
implements Serializable

A Browse result

See Also:
Serialized Form

Constructor Summary
BrowseResult()
          Constructor
 
Method Summary
 void addAll(Map<String,FacetAccessible> facets)
          Add all of the given FacetAccessible to this BrowseResult
 void addFacets(String name, FacetAccessible facets)
          Add a container full of choices
 void close()
           
 FacetAccessible getFacetAccessor(String name)
          Get the facets by name
 Map<String,FacetAccessible> getFacetMap()
          Gets all the facet collections
 BrowseHit[] getHits()
          Gets the hits
 int getNumHits()
          Get the hit count
 long getTid()
          Get the transaction ID.
 long getTime()
          Gets the search time in milliseconds
 int getTotalDocs()
          Gets the total number of docs in the index
 void setHits(BrowseHit[] hits)
          Sets the hits
 void setNumHits(int hits)
          Sets the hit count
 void setTid(long tid)
          Set the transaction ID;
 void setTime(long time)
          Sets the search time in milliseconds
 void setTotalDocs(int docs)
          Sets the total number of docs in the index
 String toString()
           
static String toString(Map<String,FacetAccessible> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BrowseResult

public BrowseResult()
Constructor

Method Detail

getTid

public final long getTid()
Get the transaction ID.

Returns:
the transaction ID.

setTid

public final void setTid(long tid)
Set the transaction ID;

Parameters:
tid -

getFacetAccessor

public FacetAccessible getFacetAccessor(String name)
Get the facets by name

Parameters:
name -
Returns:
FacetAccessible instance corresponding to the name

getNumHits

public int getNumHits()
Get the hit count

Returns:
hit count
See Also:
setNumHits(int)

setNumHits

public void setNumHits(int hits)
Sets the hit count

Parameters:
hits - hit count
See Also:
getNumHits()

getTotalDocs

public int getTotalDocs()
Gets the total number of docs in the index

Returns:
total number of docs in the index.
See Also:
setTotalDocs(int)

setTotalDocs

public void setTotalDocs(int docs)
Sets the total number of docs in the index

Parameters:
docs - total number of docs in the index
See Also:
getTotalDocs()

addFacets

public void addFacets(String name,
                      FacetAccessible facets)
Add a container full of choices

Parameters:
facets - container full of facets

addAll

public void addAll(Map<String,FacetAccessible> facets)
Add all of the given FacetAccessible to this BrowseResult

Parameters:
facets - map of facets to add to the result set

setHits

public void setHits(BrowseHit[] hits)
Sets the hits

Parameters:
hits - hits
See Also:
getHits()

getHits

public BrowseHit[] getHits()
Gets the hits

Returns:
hits
See Also:
setHits(BrowseHit[])

setTime

public void setTime(long time)
Sets the search time in milliseconds

Parameters:
time - search time
See Also:
getTime()

getTime

public long getTime()
Gets the search time in milliseconds

Returns:
search time
See Also:
setTime(long)

getFacetMap

public Map<String,FacetAccessible> getFacetMap()
Gets all the facet collections

Returns:
list of facet collections

toString

public static String toString(Map<String,FacetAccessible> map)

toString

public String toString()
Overrides:
toString in class Object

close

public void close()


Copyright © 2011. All Rights Reserved.