Package org.apache.solr.handler.loader
Class XMLLoader
- java.lang.Object
-
- org.apache.solr.handler.loader.ContentStreamLoader
-
- org.apache.solr.handler.loader.XMLLoader
-
public class XMLLoader extends ContentStreamLoader
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLInputFactory
inputFactory
protected SAXParserFactory
saxFactory
protected static org.apache.solr.common.util.XMLErrorLogger
xmllog
-
Constructor Summary
Constructors Constructor Description XMLLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultWT()
XMLLoader
init(org.apache.solr.common.params.SolrParams args)
This should be called once for each RequestHandlervoid
load(SolrQueryRequest req, SolrQueryResponse rsp, org.apache.solr.common.util.ContentStream stream, UpdateRequestProcessor processor)
Loaders are responsible for closing the streamprotected void
processUpdate(SolrQueryRequest req, UpdateRequestProcessor processor, XMLStreamReader parser)
org.apache.solr.common.SolrInputDocument
readDoc(XMLStreamReader parser)
Given the input stream, read a documentprotected org.apache.solr.common.SolrInputDocument
readDoc(XMLStreamReader parser, boolean forgiveNameAttr)
-
-
-
Field Detail
-
xmllog
protected static final org.apache.solr.common.util.XMLErrorLogger xmllog
-
inputFactory
protected XMLInputFactory inputFactory
-
saxFactory
protected SAXParserFactory saxFactory
-
-
Method Detail
-
init
public XMLLoader init(org.apache.solr.common.params.SolrParams args)
Description copied from class:ContentStreamLoader
This should be called once for each RequestHandler- Overrides:
init
in classContentStreamLoader
-
getDefaultWT
public String getDefaultWT()
- Overrides:
getDefaultWT
in classContentStreamLoader
-
load
public void load(SolrQueryRequest req, SolrQueryResponse rsp, org.apache.solr.common.util.ContentStream stream, UpdateRequestProcessor processor) throws Exception
Description copied from class:ContentStreamLoader
Loaders are responsible for closing the stream- Specified by:
load
in classContentStreamLoader
- Parameters:
req
- The inputSolrQueryRequest
rsp
- The response, in case the Loader wishes to add anythingstream
- TheContentStream
to addprocessor
- TheUpdateRequestProcessor
to use- Throws:
Exception
-
processUpdate
protected void processUpdate(SolrQueryRequest req, UpdateRequestProcessor processor, XMLStreamReader parser) throws XMLStreamException, IOException, FactoryConfigurationError
- Throws:
XMLStreamException
IOException
FactoryConfigurationError
- Since:
- solr 1.2
-
readDoc
public org.apache.solr.common.SolrInputDocument readDoc(XMLStreamReader parser) throws XMLStreamException
Given the input stream, read a document- Throws:
XMLStreamException
- Since:
- solr 1.3
-
readDoc
protected org.apache.solr.common.SolrInputDocument readDoc(XMLStreamReader parser, boolean forgiveNameAttr) throws XMLStreamException
- Throws:
XMLStreamException
-
-