public abstract class TextResponseWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
doIndent |
protected int |
level |
protected SolrQueryRequest |
req |
protected Set<String> |
returnFields |
protected SolrQueryResponse |
rsp |
protected IndexSchema |
schema |
protected FastWriter |
writer |
| Constructor and Description |
|---|
TextResponseWriter(Writer writer,
SolrQueryRequest req,
SolrQueryResponse rsp) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
done with this ResponseWriter... make sure any buffers are flushed to writer
|
int |
decLevel() |
Writer |
getWriter()
returns the Writer that the response is being written to
|
int |
incLevel() |
void |
indent() |
void |
indent(int lev) |
int |
level() |
void |
setIndent(boolean doIndent) |
void |
setLevel(int level) |
abstract void |
writeArray(String name,
Iterator val) |
abstract void |
writeArray(String name,
Object[] val) |
void |
writeBool(String name,
boolean val) |
abstract void |
writeBool(String name,
String val)
if this form of the method is called, val is the Java string form of a boolean
|
void |
writeByte(String name,
byte val) |
abstract void |
writeByte(String name,
String s) |
void |
writeDate(String name,
Date val) |
abstract void |
writeDate(String name,
String val)
if this form of the method is called, val is the Solr ISO8601 based date format
|
abstract void |
writeDoc(String name,
Document doc,
Set<String> returnFields,
float score,
boolean includeScore) |
abstract void |
writeDocList(String name,
DocList ids,
Set<String> fields,
Map otherFields) |
void |
writeDouble(String name,
double val) |
abstract void |
writeDouble(String name,
String val)
if this form of the method is called, val is the Java string form of a double
|
void |
writeFloat(String name,
float val) |
abstract void |
writeFloat(String name,
String val)
if this form of the method is called, val is the Java string form of a float
|
void |
writeInt(String name,
int val) |
abstract void |
writeInt(String name,
String val)
if this form of the method is called, val is the Java string form of an int
|
void |
writeLong(String name,
long val) |
abstract void |
writeLong(String name,
String val)
if this form of the method is called, val is the Java string form of a long
|
abstract void |
writeMap(String name,
Map val,
boolean excludeOuter,
boolean isFirstVal) |
abstract void |
writeNamedList(String name,
NamedList val) |
abstract void |
writeNull(String name) |
void |
writeShort(String name,
short val) |
abstract void |
writeShort(String name,
String val) |
abstract void |
writeSolrDocument(String name,
SolrDocument doc,
Set<String> returnFields,
Map pseudoFields) |
abstract void |
writeSolrDocumentList(String name,
SolrDocumentList docs,
Set<String> fields,
Map otherFields) |
abstract void |
writeStr(String name,
String val,
boolean needsEscaping) |
void |
writeVal(String name,
Object val) |
protected final FastWriter writer
protected final IndexSchema schema
protected final SolrQueryRequest req
protected final SolrQueryResponse rsp
protected int level
protected boolean doIndent
public TextResponseWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp)
public void close()
throws IOException
IOExceptionpublic Writer getWriter()
public void indent()
throws IOException
IOExceptionpublic void indent(int lev)
throws IOException
IOExceptionpublic void setLevel(int level)
public int level()
public int incLevel()
public int decLevel()
public void setIndent(boolean doIndent)
public abstract void writeNamedList(String name, NamedList val) throws IOException
IOExceptionpublic void writeVal(String name, Object val) throws IOException
IOExceptionpublic abstract void writeDoc(String name, Document doc, Set<String> returnFields, float score, boolean includeScore) throws IOException
IOExceptionpublic abstract void writeSolrDocument(String name, SolrDocument doc, Set<String> returnFields, Map pseudoFields) throws IOException
IOExceptionpublic abstract void writeDocList(String name, DocList ids, Set<String> fields, Map otherFields) throws IOException
IOExceptionpublic abstract void writeSolrDocumentList(String name, SolrDocumentList docs, Set<String> fields, Map otherFields) throws IOException
IOExceptionpublic abstract void writeStr(String name, String val, boolean needsEscaping) throws IOException
IOExceptionpublic abstract void writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal) throws IOException
IOExceptionpublic abstract void writeArray(String name, Object[] val) throws IOException
IOExceptionpublic abstract void writeArray(String name, Iterator val) throws IOException
IOExceptionpublic abstract void writeNull(String name) throws IOException
IOExceptionpublic abstract void writeInt(String name, String val) throws IOException
IOExceptionpublic void writeInt(String name, int val) throws IOException
IOExceptionpublic abstract void writeLong(String name, String val) throws IOException
IOExceptionpublic void writeLong(String name, long val) throws IOException
IOExceptionpublic abstract void writeBool(String name, String val) throws IOException
IOExceptionpublic void writeBool(String name, boolean val) throws IOException
IOExceptionpublic abstract void writeFloat(String name, String val) throws IOException
IOExceptionpublic void writeFloat(String name, float val) throws IOException
IOExceptionpublic abstract void writeDouble(String name, String val) throws IOException
IOExceptionpublic void writeDouble(String name, double val) throws IOException
IOExceptionpublic void writeDate(String name, Date val) throws IOException
IOExceptionpublic abstract void writeDate(String name, String val) throws IOException
IOExceptionpublic abstract void writeShort(String name, String val) throws IOException
IOExceptionpublic void writeShort(String name, short val) throws IOException
IOExceptionpublic abstract void writeByte(String name, String s) throws IOException
IOExceptionpublic void writeByte(String name, byte val) throws IOException
IOException