public class FileListEntityProcessor extends EntityProcessorBase
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
Modifier and Type | Field and Description |
---|---|
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
|
ABORT, cacheSupport, context, CONTINUE, entityName, isFirstInit, ON_ERROR, onError, query, rowIterator, SKIP, TRANSFORM_ROW, TRANSFORMER
Constructor and Description |
---|
FileListEntityProcessor() |
Modifier and Type | Method and Description |
---|---|
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.
|
destroy, firstInit, getNext, initCache, nextDeletedRowKey, nextModifiedParentRowKey, nextModifiedRowKey
close, postTransform
protected String fileName
protected String baseDir
protected String excludes
protected Date newerThan
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
public void init(Context context)
EntityProcessor
init
in class EntityProcessorBase
context
- The current contextpublic Map<String,Object> nextRow()
EntityProcessorBase
nextRow
in class EntityProcessorBase
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.