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 XMLInputFactoryinputFactoryprotected SAXParserFactorysaxFactoryprotected static XMLErrorLoggerxmllog
-
Constructor Summary
Constructors Constructor Description XMLLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultWT()XMLLoaderinit(SolrParams args)This should be called once for each RequestHandlervoidload(SolrQueryRequest req, SolrQueryResponse rsp, ContentStream stream, UpdateRequestProcessor processor)Loaders are responsible for closing the streamprotected voidprocessUpdate(SolrQueryRequest req, UpdateRequestProcessor processor, XMLStreamReader parser)SolrInputDocumentreadDoc(XMLStreamReader parser)Given the input stream, read a document
-
-
-
Field Detail
-
xmllog
protected static final XMLErrorLogger xmllog
-
inputFactory
protected XMLInputFactory inputFactory
-
saxFactory
protected SAXParserFactory saxFactory
-
-
Method Detail
-
init
public XMLLoader init(SolrParams args)
Description copied from class:ContentStreamLoaderThis should be called once for each RequestHandler- Overrides:
initin classContentStreamLoader
-
getDefaultWT
public String getDefaultWT()
- Overrides:
getDefaultWTin classContentStreamLoader
-
load
public void load(SolrQueryRequest req, SolrQueryResponse rsp, ContentStream stream, UpdateRequestProcessor processor) throws Exception
Description copied from class:ContentStreamLoaderLoaders are responsible for closing the stream- Specified by:
loadin classContentStreamLoader- Parameters:
req- The inputSolrQueryRequestrsp- The response, in case the Loader wishes to add anythingstream- TheContentStreamto addprocessor- TheUpdateRequestProcessorto use- Throws:
Exception
-
processUpdate
protected void processUpdate(SolrQueryRequest req, UpdateRequestProcessor processor, XMLStreamReader parser) throws XMLStreamException, IOException, FactoryConfigurationError
- Throws:
XMLStreamExceptionIOExceptionFactoryConfigurationError- Since:
- solr 1.2
-
readDoc
public SolrInputDocument readDoc(XMLStreamReader parser) throws XMLStreamException
Given the input stream, read a document- Throws:
XMLStreamException- Since:
- solr 1.3
-
-