Class XMLResponseParser
- java.lang.Object
-
- org.apache.solr.client.solrj.ResponseParser
-
- org.apache.solr.client.solrj.impl.XMLResponseParser
-
public class XMLResponseParser extends ResponseParser
- Since:
- solr 1.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classXMLResponseParser.KnownType
-
Field Summary
Fields Modifier and Type Field Description static StringXML_CONTENT_TYPE
-
Constructor Summary
Constructors Constructor Description XMLResponseParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()A well behaved ResponseParser will return its content-type.StringgetWriterType()NamedList<Object>processResponse(InputStream in, String encoding)NamedList<Object>processResponse(Reader in)protected List<Object>readArray(XMLStreamReader parser)protected SolrDocumentreadDocument(XMLStreamReader parser)protected SolrDocumentListreadDocuments(XMLStreamReader parser)protected NamedList<Object>readNamedList(XMLStreamReader parser)-
Methods inherited from class org.apache.solr.client.solrj.ResponseParser
getVersion
-
-
-
-
Field Detail
-
XML_CONTENT_TYPE
public static final String XML_CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getWriterType
public String getWriterType()
- Specified by:
getWriterTypein classResponseParser
-
getContentType
public String getContentType()
Description copied from class:ResponseParserA well behaved ResponseParser will return its content-type.- Overrides:
getContentTypein classResponseParser- Returns:
- the content-type this parser expects to parse
-
processResponse
public NamedList<Object> processResponse(Reader in)
- Specified by:
processResponsein classResponseParser
-
processResponse
public NamedList<Object> processResponse(InputStream in, String encoding)
- Specified by:
processResponsein classResponseParser
-
readNamedList
protected NamedList<Object> readNamedList(XMLStreamReader parser) throws XMLStreamException
- Throws:
XMLStreamException
-
readArray
protected List<Object> readArray(XMLStreamReader parser) throws XMLStreamException
- Throws:
XMLStreamException
-
readDocuments
protected SolrDocumentList readDocuments(XMLStreamReader parser) throws XMLStreamException
- Throws:
XMLStreamException
-
readDocument
protected SolrDocument readDocument(XMLStreamReader parser) throws XMLStreamException
- Throws:
XMLStreamException
-
-