Class ElasticsearchJson.AggregationsDeserializer

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.deser.NullValueProvider, java.io.Serializable
    Enclosing class:
    ElasticsearchJson

    static class ElasticsearchJson.AggregationsDeserializer
    extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<ElasticsearchJson.Aggregations>
    Allows to de-serialize nested aggregation structures.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        com.fasterxml.jackson.databind.JsonDeserializer.None
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Set<java.lang.String> IGNORE_TOKENS  
      • Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        _valueClass, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ElasticsearchJson.Aggregations deserialize​(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext ctxt)  
      private static boolean isMissingBucket​(com.fasterxml.jackson.databind.JsonNode key)
      Determines if current key is a missing field key.
      private static ElasticsearchJson.Aggregations parseAggregations​(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.node.ObjectNode node)  
      private static ElasticsearchJson.Bucket parseBucket​(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ObjectNode node)  
      private static ElasticsearchJson.Aggregation parseBuckets​(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ArrayNode nodes)  
      private static ElasticsearchJson.MultiValue parseValue​(com.fasterxml.jackson.core.JsonParser parser, java.lang.String name, com.fasterxml.jackson.databind.node.ObjectNode node)  
      • Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        _byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, deserializeWithType, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
      • Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        deserialize, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • IGNORE_TOKENS

        private static final java.util.Set<java.lang.String> IGNORE_TOKENS
    • Constructor Detail

      • AggregationsDeserializer

        AggregationsDeserializer()
    • Method Detail

      • deserialize

        public ElasticsearchJson.Aggregations deserialize​(com.fasterxml.jackson.core.JsonParser parser,
                                                          com.fasterxml.jackson.databind.DeserializationContext ctxt)
                                                   throws java.io.IOException
        Specified by:
        deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<ElasticsearchJson.Aggregations>
        Throws:
        java.io.IOException
      • parseAggregations

        private static ElasticsearchJson.Aggregations parseAggregations​(com.fasterxml.jackson.core.JsonParser parser,
                                                                        com.fasterxml.jackson.databind.node.ObjectNode node)
                                                                 throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • parseValue

        private static ElasticsearchJson.MultiValue parseValue​(com.fasterxml.jackson.core.JsonParser parser,
                                                               java.lang.String name,
                                                               com.fasterxml.jackson.databind.node.ObjectNode node)
                                                        throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • parseBuckets

        private static ElasticsearchJson.Aggregation parseBuckets​(com.fasterxml.jackson.core.JsonParser parser,
                                                                  java.lang.String name,
                                                                  com.fasterxml.jackson.databind.node.ArrayNode nodes)
                                                           throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
      • isMissingBucket

        private static boolean isMissingBucket​(com.fasterxml.jackson.databind.JsonNode key)
        Determines if current key is a missing field key. Missing key is returned when document does not have pivoting attribute (example GROUP BY _MAP['a.b.missing']). It helps grouping documents which don't have a field. In relational algebra this would normally be null.

        Please note that missing value is different for each type.

        Parameters:
        key - current key (usually string) as returned by ES
        Returns:
        true if this value
      • parseBucket

        private static ElasticsearchJson.Bucket parseBucket​(com.fasterxml.jackson.core.JsonParser parser,
                                                            java.lang.String name,
                                                            com.fasterxml.jackson.databind.node.ObjectNode node)
                                                     throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException