org.elasticsearch.common.xcontent
Class XContentHelper

java.lang.Object
  extended by org.elasticsearch.common.xcontent.XContentHelper

public class XContentHelper
extends java.lang.Object


Constructor Summary
XContentHelper()
           
 
Method Summary
static void copyCurrentEvent(XContentGenerator generator, XContentParser parser)
           
static void copyCurrentStructure(XContentGenerator generator, XContentParser parser)
           
static void mergeDefaults(java.util.Map<java.lang.String,java.lang.Object> content, java.util.Map<java.lang.String,java.lang.Object> defaults)
          Merges the defaults provided as the second parameter into the content of the first.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XContentHelper

public XContentHelper()
Method Detail

mergeDefaults

public static void mergeDefaults(java.util.Map<java.lang.String,java.lang.Object> content,
                                 java.util.Map<java.lang.String,java.lang.Object> defaults)
Merges the defaults provided as the second parameter into the content of the first. Only does recursive merge for inner maps.


copyCurrentStructure

public static void copyCurrentStructure(XContentGenerator generator,
                                        XContentParser parser)
                                 throws java.io.IOException
Throws:
java.io.IOException

copyCurrentEvent

public static void copyCurrentEvent(XContentGenerator generator,
                                    XContentParser parser)
                             throws java.io.IOException
Throws:
java.io.IOException