|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.handler.dataimport.EntityProcessor org.apache.solr.handler.dataimport.EntityProcessorBase org.apache.solr.handler.dataimport.FileListEntityProcessor
public class FileListEntityProcessor
An EntityProcessor
instance which can stream file names found in a given base
directory matching patterns and returning rows containing file information.
It supports querying a give base directory by matching:
FileDataSource
to read from files in file
systems.
Refer to http://wiki.apache.org/solr/DataImportHandler for more details.
This API is experimental and may change in the future.
Pattern
Field Summary | |
---|---|
static String |
ABSOLUTE_FILE
|
static String |
BASE_DIR
|
protected String |
baseDir
The baseDir given in data-config.xml after resolving any variables |
static String |
BIGGER_THAN
|
protected long |
biggerThan
The biggerThan given in data-config as a long value |
static String |
DIR
|
protected String |
excludes
A Regex pattern of excluded file names as given in data-config.xml after resolving any variables |
static String |
EXCLUDES
|
static String |
FILE
|
static String |
FILE_NAME
|
protected String |
fileName
A regex pattern to identify files given in data-config.xml after resolving any variables |
static String |
LAST_MODIFIED
|
static String |
NEWER_THAN
|
protected Date |
newerThan
The newerThan given in data-config as a Date |
static String |
OLDER_THAN
|
protected Date |
olderThan
The newerThan given in data-config as a Date |
static Pattern |
PLACE_HOLDER_PATTERN
|
protected boolean |
recursive
The recursive given in data-config. |
static String |
RECURSIVE
|
static String |
SIZE
|
static String |
SMALLER_THAN
|
protected long |
smallerThan
The smallerThan given in data-config as a long value |
Fields inherited from class org.apache.solr.handler.dataimport.EntityProcessorBase |
---|
ABORT, cacheSupport, context, CONTINUE, entityName, isFirstInit, ON_ERROR, onError, query, rowIterator, SKIP, SKIP_DOC, TRANSFORM_ROW, TRANSFORMER |
Constructor Summary | |
---|---|
FileListEntityProcessor()
|
Method Summary | |
---|---|
void |
init(Context context)
This method is called when it starts processing an entity. |
Map<String,Object> |
nextRow()
For a simple implementation, this is the only method that the sub-class should implement. |
Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessorBase |
---|
destroy, firstInit, getNext, initCache, nextDeletedRowKey, nextModifiedParentRowKey, nextModifiedRowKey |
Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessor |
---|
close, postTransform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String fileName
protected String baseDir
protected String excludes
protected Date newerThan
Date
Note: This variable is resolved just-in-time in the nextRow()
method.
protected Date olderThan
Date
protected long biggerThan
Note: This variable is resolved just-in-time in the nextRow()
method.
protected long smallerThan
Note: This variable is resolved just-in-time in the nextRow()
method.
protected boolean recursive
public static final Pattern PLACE_HOLDER_PATTERN
public static final String DIR
public static final String FILE
public static final String ABSOLUTE_FILE
public static final String SIZE
public static final String LAST_MODIFIED
public static final String FILE_NAME
public static final String BASE_DIR
public static final String EXCLUDES
public static final String NEWER_THAN
public static final String OLDER_THAN
public static final String BIGGER_THAN
public static final String SMALLER_THAN
public static final String RECURSIVE
Constructor Detail |
---|
public FileListEntityProcessor()
Method Detail |
---|
public void init(Context context)
EntityProcessor
init
in class EntityProcessorBase
context
- The current contextpublic Map<String,Object> nextRow()
EntityProcessorBase
nextRow
in class EntityProcessorBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |