Package org.apache.solr.response
Class XMLWriter
- java.lang.Object
- 
- org.apache.solr.response.TextResponseWriter
- 
- org.apache.solr.response.XMLWriter
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- PushWriter,- TextWriter
 
 public class XMLWriter extends TextResponseWriter - NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
 
- 
- 
Field SummaryFields Modifier and Type Field Description static floatCURRENT_VERSION- 
Fields inherited from class org.apache.solr.response.TextResponseWritercal, doIndent, level, req, returnFields, rsp, schema, writer
 
- 
 - 
Constructor SummaryConstructors Constructor Description XMLWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteArray(String name, Object[] val, boolean raw)voidwriteArray(String name, Iterator<?> iter, boolean raw)voidwriteAttr(String name, String val, boolean escape)voidwriteBool(String name, String val)voidwriteDate(String name, String val)voidwriteDouble(String name, double val)voidwriteDouble(String name, String val)voidwriteEndDocumentList()voidwriteFloat(String name, float val)voidwriteFloat(String name, String val)voidwriteInt(String name, String val)voidwriteIterator(String name, IteratorWriter val, boolean raw)voidwriteLong(String name, String val)voidwriteMap(String name, Map<?,?> map, boolean excludeOuter, boolean isFirstVal)voidwriteMap(String name, MapWriter val)voidwriteNamedList(String name, NamedList<?> val)voidwriteNull(String name)voidwriteResponse()static voidwriteResponse(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp)voidwriteSolrDocument(String name, SolrDocument doc, ReturnFields returnFields, int idx)The SolrDocument should already have multivalued fields implemented as Collections -- this will not rewrite to <arr>voidwriteStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact)voidwriteStr(String name, String val, boolean escape)voidwriteStrRaw(String name, String val)- 
Methods inherited from class org.apache.solr.response.TextResponseWriterclose, decLevel, doIndent, getWriter, incLevel, level, setIndent, setLevel, shouldWriteRaw, writeDocuments, writeSolrDocumentList, writeVal
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.solr.common.util.TextWriterindent, indent, writeArray, writeBool, writeBool, writeByteArr, writeDate, writeInt, writeIterator, writeLong, writeMap, writeNumber, writeVal
 
- 
 
- 
- 
- 
Constructor Detail- 
XMLWriterpublic XMLWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) 
 
- 
 - 
Method Detail- 
writeResponsepublic static void writeResponse(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) throws IOException - Throws:
- IOException
 
 - 
writeResponsepublic void writeResponse() throws IOException- Throws:
- IOException
 
 - 
writeAttrpublic void writeAttr(String name, String val, boolean escape) throws IOException - Throws:
- IOException
 
 - 
writeStartDocumentListpublic void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException - Specified by:
- writeStartDocumentListin class- TextResponseWriter
- Throws:
- IOException
 
 - 
writeSolrDocumentpublic void writeSolrDocument(String name, SolrDocument doc, ReturnFields returnFields, int idx) throws IOException The SolrDocument should already have multivalued fields implemented as Collections -- this will not rewrite to <arr>- Specified by:
- writeSolrDocumentin class- TextResponseWriter
- Throws:
- IOException
 
 - 
writeEndDocumentListpublic void writeEndDocumentList() throws IOException- Specified by:
- writeEndDocumentListin class- TextResponseWriter
- Throws:
- IOException
 
 - 
writeNamedListpublic void writeNamedList(String name, NamedList<?> val) throws IOException - Throws:
- IOException
 
 - 
writeMappublic void writeMap(String name, MapWriter val) throws IOException - Throws:
- IOException
 
 - 
writeMappublic void writeMap(String name, Map<?,?> map, boolean excludeOuter, boolean isFirstVal) throws IOException - Throws:
- IOException
 
 - 
writeArraypublic void writeArray(String name, Object[] val, boolean raw) throws IOException - Throws:
- IOException
 
 - 
writeArraypublic void writeArray(String name, Iterator<?> iter, boolean raw) throws IOException - Throws:
- IOException
 
 - 
writeIteratorpublic void writeIterator(String name, IteratorWriter val, boolean raw) throws IOException - Throws:
- IOException
 
 - 
writeNullpublic void writeNull(String name) throws IOException - Throws:
- IOException
 
 - 
writeStrRawpublic void writeStrRaw(String name, String val) throws IOException - Throws:
- IOException
 
 - 
writeStrpublic void writeStr(String name, String val, boolean escape) throws IOException - Throws:
- IOException
 
 - 
writeIntpublic void writeInt(String name, String val) throws IOException - Throws:
- IOException
 
 - 
writeLongpublic void writeLong(String name, String val) throws IOException - Throws:
- IOException
 
 - 
writeBoolpublic void writeBool(String name, String val) throws IOException - Throws:
- IOException
 
 - 
writeFloatpublic void writeFloat(String name, String val) throws IOException - Throws:
- IOException
 
 - 
writeFloatpublic void writeFloat(String name, float val) throws IOException - Throws:
- IOException
 
 - 
writeDoublepublic void writeDouble(String name, String val) throws IOException - Throws:
- IOException
 
 - 
writeDoublepublic void writeDouble(String name, double val) throws IOException - Throws:
- IOException
 
 - 
writeDatepublic void writeDate(String name, String val) throws IOException - Throws:
- IOException
 
 
- 
 
-