com.googlecode.fascinator.common.solr
Class SolrDoc

java.lang.Object
  extended by com.googlecode.fascinator.common.JsonSimple
      extended by com.googlecode.fascinator.common.solr.SolrDoc

public class SolrDoc
extends JsonSimple

An extension of the JsonSimple class specifically to address Solr result documents and shortcut common access.

Author:
Greg Pendlebury

Constructor Summary
SolrDoc(JsonObject newJsonObject)
          Wrap a JsonObject in this class
 
Method Summary
 String get(String field)
          Gets the String value of the specified field.
 String getFirst(String field)
          Gets the first String value of the specified field.
 List<String> getList(String field)
          Gets the list of String values of the specified field.
 
Methods inherited from class com.googlecode.fascinator.common.JsonSimple
fromJavaMap, getArray, getBoolean, getInteger, getJsonObject, getJsonSimpleList, getJsonSimpleMap, getObject, getPath, getString, getStringList, getStringList, getStringList, search, setPropertySubstitution, toJavaList, toJavaMap, toString, toString, writeArray, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SolrDoc

public SolrDoc(JsonObject newJsonObject)
Wrap a JsonObject in this class

Parameters:
newJsonObject - : The JsonObject to wrap
Method Detail

get

public String get(String field)
Gets the String value of the specified field.

Parameters:
field - : The field name to query
Returns:
String : The value found, possibly null

getFirst

public String getFirst(String field)
Gets the first String value of the specified field.

Parameters:
field - : The field name to query
Returns:
String : The value found, possibly null

getList

public List<String> getList(String field)
Gets the list of String values of the specified field.

Parameters:
field - : The field name to query
Returns:
List : The List of values found, possibly null


Copyright © 2009-2013. All Rights Reserved.