org.apache.solr.handler.dataimport
Class BinFileDataSource

java.lang.Object
  extended by org.apache.solr.handler.dataimport.DataSource<InputStream>
      extended by org.apache.solr.handler.dataimport.BinFileDataSource

public class BinFileDataSource
extends DataSource<InputStream>

A DataSource which reads from local files

Refer to http://wiki.apache.org/solr/DataImportHandler for more details.

This API is experimental and may change in the future.

Since:
solr 3.1

Field Summary
protected  String basePath
           
 
Constructor Summary
BinFileDataSource()
           
 
Method Summary
 void close()
          Cleans up resources of this DataSource after use.
 InputStream getData(String query)
          Get records for the given query.The return type depends on the implementation .
 void init(Context context, Properties initProps)
          Initializes the DataSource with the Context and initialization properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

basePath

protected String basePath
Constructor Detail

BinFileDataSource

public BinFileDataSource()
Method Detail

init

public void init(Context context,
                 Properties initProps)
Description copied from class: DataSource
Initializes the DataSource with the Context and initialization properties.

This is invoked by the DataImporter after creating an instance of this class.

Specified by:
init in class DataSource<InputStream>

getData

public InputStream getData(String query)
Description copied from class: DataSource
Get records for the given query.The return type depends on the implementation .

Specified by:
getData in class DataSource<InputStream>
Parameters:
query - The query string. It can be a SQL for JdbcDataSource or a URL for HttpDataSource or a file location for FileDataSource or a custom format for your own custom DataSource.
Returns:
Depends on the implementation. For instance JdbcDataSource returns an Iterator<Map <String,Object>>

close

public void close()
Description copied from class: DataSource
Cleans up resources of this DataSource after use.

Specified by:
close in class DataSource<InputStream>


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.