类 XContentSource
java.lang.Object
org.easysearch.client.common.XContentSource
public class XContentSource
extends java.lang.Object
Encapsulates the xcontent source
-
构造器概要
构造器 构造器 说明 XContentSource(org.easysearch.common.xcontent.XContentParser parser)Constructs a new XContentSource out of the given parser -
方法概要
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
构造器详细资料
-
XContentSource
public XContentSource(org.easysearch.common.xcontent.XContentParser parser) throws java.io.IOExceptionConstructs a new XContentSource out of the given parser- 抛出:
java.io.IOException
-
-
方法详细资料
-
isMap
public boolean isMap()- 返回:
- true if the top level value of the source is a map
-
getAsMap
public java.util.Map<java.lang.String,java.lang.Object> getAsMap()- 返回:
- The source as a map
-
isList
public boolean isList()- 返回:
- true if the top level value of the source is a list
-
getAsList
public java.util.List<java.lang.Object> getAsList()- 返回:
- The source as a list
-
getValue
public <T> T getValue(java.lang.String path)Extracts a value identified by the given path in the source.- 参数:
path- a dot notation path to the requested value- 返回:
- The extracted value or
nullif no value is associated with the given path
-