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 void
addAttributes(java.lang.StringBuilder buffer)
FacetResponse
clone()
boolean
equals(java.lang.Object other)
java.util.ArrayList<FacetBucket>
getBuckets()
Deprecated.useFacetBuckets.get(int)
/FacetBuckets.iterator()
instead.FacetFilter
getFacetFilter(FacetBucket bucket)
FacetFilter
getFacetFilter(FacetBucket... buckets)
long
getFacetTime()
Get the facet generation time (in milliseconds).FacetStatistics
getStatistics()
Get the statistics for this response.long
getTotalCount()
Get the sum of the counts for all buckets (even those not returned).int
hashCode()
void
readExternal(java.io.ObjectInput in)
void
setBuckets(java.util.Collection<FacetBucket> value)
Deprecated.void
setFacetTime(long time)
Set the facet generation time (in milliseconds).void
setTotalCount(long value)
Set the sum of the counts for all buckets (even those not returned).void
writeExternal(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:
getStatistics
in 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 aFacetFilter
suitable for applyingbuckets
to 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:
addAttributes
in classFacetBuckets
-
clone
public FacetResponse clone()
- Overrides:
clone
in classFacetBuckets
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classFacetBuckets
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classFacetBuckets
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Overrides:
writeExternal
in classFacetBuckets
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in classFacetBuckets
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-