public abstract class DataSource<T> extends Object
Provides data from a source with a given query.
Implementation of this abstract class must provide a default no-arg constructor
Refer to http://wiki.apache.org/solr/DataImportHandler for more details.
This API is experimental and may change in the future.| Constructor and Description | 
|---|
| DataSource() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract void | close()Cleans up resources of this DataSource after use. | 
| abstract T | getData(String query)Get records for the given query.The return type depends on the
 implementation . | 
| abstract void | init(Context context,
    Properties initProps)Initializes the DataSource with the  Contextand
 initialization properties. | 
public abstract void init(Context context, Properties initProps)
Context and
 initialization properties.
 
 This is invoked by the DataImporter after creating an
 instance of this class.public abstract T getData(String query)
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.public abstract void close()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.