public class FSDocumentSelector extends java.lang.Object implements DocumentSelector
excludeFileName pattern is applied first (if it isn't null).
Then the includeFileName pattern is applied (if it isn't null),
and finally, the size limit is applied if it is above 0.| Modifier and Type | Field and Description |
|---|---|
private java.util.regex.Pattern |
excludeFileName |
private java.util.regex.Pattern |
includeFileName |
private long |
maxFileSizeBytes |
private long |
minFileSizeBytes |
| Constructor and Description |
|---|
FSDocumentSelector(java.util.regex.Pattern includeFileName,
java.util.regex.Pattern excludeFileName,
long minFileSizeBytes,
long maxFileSizeBytes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
select(Metadata metadata)
Checks if a document with the given metadata matches the specified
selection criteria.
|
private final java.util.regex.Pattern includeFileName
private final java.util.regex.Pattern excludeFileName
private final long maxFileSizeBytes
private final long minFileSizeBytes
public FSDocumentSelector(java.util.regex.Pattern includeFileName,
java.util.regex.Pattern excludeFileName,
long minFileSizeBytes,
long maxFileSizeBytes)
public boolean select(Metadata metadata)
DocumentSelectorselect in interface DocumentSelectormetadata - document metadatatrue if the document matches the selection criteria,
false otherwise