public abstract class ParsedAggregation extends java.lang.Object implements Aggregation, ToXContent
Aggregation
that is parsed from a REST response.
Serves as a base class for all aggregation implementations that are parsed from REST.Aggregation.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
metadata |
TYPED_KEYS_DELIMITER
EMPTY_PARAMS
Constructor and Description |
---|
ParsedAggregation() |
Modifier and Type | Method and Description |
---|---|
protected static void |
declareAggregationFields(ObjectParser<? extends ParsedAggregation,java.lang.Void> objectParser) |
protected abstract XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
java.util.Map<java.lang.String,java.lang.Object> |
getMetaData()
Get the optional byte array metadata that was set on the aggregation
|
java.lang.String |
getName() |
protected static double |
parseDouble(XContentParser parser,
double defaultNullValue)
Parse a token of type XContentParser.Token.VALUE_NUMBER or XContentParser.Token.STRING to a double.
|
protected void |
setName(java.lang.String name) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
isFragment
protected static void declareAggregationFields(ObjectParser<? extends ParsedAggregation,java.lang.Void> objectParser)
public final java.lang.String getName()
getName
in interface Aggregation
protected void setName(java.lang.String name)
public final java.util.Map<java.lang.String,java.lang.Object> getMetaData()
Aggregation
getMetaData
in interface Aggregation
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
protected abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
protected static double parseDouble(XContentParser parser, double defaultNullValue) throws java.io.IOException
java.io.IOException