Package com.attivio.sdk.search.facet
Class FacetResponse
- java.lang.Object
-
- com.attivio.sdk.search.facet.FacetBuckets
-
- com.attivio.sdk.search.facet.FacetResponse
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<FacetBucket>,java.util.function.Consumer<FacetBucket>
public class FacetResponse extends FacetBuckets
A response to aFacetRequest.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.facet.FacetBuckets
COUNT_ATTR, DEFAULT_BUCKETS, MAX_ATTR, MEAN_ATTR, MIDPOINT_ATTR, MIN_ATTR, STDEV_ATTR, SUM_ATTR, SUM_OF_SQUARES_ATTR, VARIANCE_ATTR
-
-
Constructor Summary
Constructors Constructor Description FacetResponse()FacetResponse(java.lang.String name)FacetResponse(java.lang.String name, java.lang.String displayName)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddAttributes(java.lang.StringBuilder buffer)FacetResponseclone()booleanequals(java.lang.Object other)java.util.ArrayList<FacetBucket>getBuckets()Deprecated.useFacetBuckets.get(int)/FacetBuckets.iterator()instead.FacetFiltergetFacetFilter(FacetBucket bucket)FacetFiltergetFacetFilter(FacetBucket... buckets)longgetFacetTime()Get the facet generation time (in milliseconds).FacetStatisticsgetStatistics()Get the statistics for this response.longgetTotalCount()Get the sum of the counts for all buckets (even those not returned).inthashCode()voidreadExternal(java.io.ObjectInput in)voidsetBuckets(java.util.Collection<FacetBucket> value)Deprecated.voidsetFacetTime(long time)Set the facet generation time (in milliseconds).voidsetTotalCount(long value)Set the sum of the counts for all buckets (even those not returned).voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class com.attivio.sdk.search.facet.FacetBuckets
accept, add, addAll, addAttribute, addAttribute, addAttribute, addAttributes, attributes, clear, coerce, coerce, contains, containsBucket, ensureCapacity, forEach, get, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getBucket, getDisplayName, getField, getFilterField, getName, getStatistics, iterator, removeAttribute, removeLast, setAttribute, setAttributes, setDisplayName, setField, setName, setStatistics, size, sort, toString
-
-
-
-
Method Detail
-
getBuckets
@Deprecated public java.util.ArrayList<FacetBucket> getBuckets()
Deprecated.useFacetBuckets.get(int)/FacetBuckets.iterator()instead.Get the buckets as a list.
-
setBuckets
@Deprecated public void setBuckets(java.util.Collection<FacetBucket> value)
Deprecated.Set the buckets.
-
getStatistics
public FacetStatistics getStatistics()
Get the statistics for this response.- Overrides:
getStatisticsin classFacetBuckets
-
getTotalCount
public long getTotalCount()
Get the sum of the counts for all buckets (even those not returned).
-
setTotalCount
public void setTotalCount(long value)
Set the sum of the counts for all buckets (even those not returned).
-
getFacetTime
public long getFacetTime()
Get the facet generation time (in milliseconds).
-
setFacetTime
public void setFacetTime(long time)
Set the facet generation time (in milliseconds).
-
getFacetFilter
public FacetFilter getFacetFilter(FacetBucket bucket)
-
getFacetFilter
public FacetFilter getFacetFilter(FacetBucket... buckets)
Create aFacetFiltersuitable for applyingbucketsto aQueryRequest.Assumes that each subsequent bucket is a child bucket of the preceeding bucket and that the first bucket is a child of this
FacetResponse.
-
addAttributes
protected void addAttributes(java.lang.StringBuilder buffer)
- Overrides:
addAttributesin classFacetBuckets
-
clone
public FacetResponse clone()
- Overrides:
clonein classFacetBuckets
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFacetBuckets
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classFacetBuckets
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classFacetBuckets- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classFacetBuckets- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-