@ThreadSafe
public abstract class CollectionSpecParserAbstract
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
dateFormatMark |
protected java.lang.String |
delimiter |
protected com.google.re2j.Pattern |
filter |
protected boolean |
filterOnName |
protected java.lang.String |
fragment |
protected java.lang.String |
rootDir |
protected java.lang.String |
spec |
protected boolean |
subdirs |
Modifier | Constructor and Description |
---|---|
protected |
CollectionSpecParserAbstract(java.lang.String rootDir,
java.lang.String regExp,
java.lang.String delimiter,
java.lang.String fragment,
java.util.Formatter errlog) |
protected |
CollectionSpecParserAbstract(java.lang.String collectionSpec,
java.lang.String rootDir,
java.lang.String filterAndDateMark,
java.lang.String delimiter,
java.lang.String fragment,
java.util.Formatter errlog)
Single spec : "/topdir/** /#dateFormatMark#regExp"
This only allows the dateFormatMark to be in the file name, not anywhere else in the filename path,
and you can't use any part of the dateFormat to filter on.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDateFormatMark() |
protected static java.lang.String |
getDateFormatMark(java.lang.String filterAndDateMark) |
java.lang.String |
getDelimiter() |
abstract java.lang.String |
getFilePath(java.lang.String filename)
Get the full path for a file
|
com.google.re2j.Pattern |
getFilter() |
protected static java.lang.String |
getFilterAndDateMark(java.lang.String collectionSpec,
java.lang.String delimiter) |
boolean |
getFilterOnName() |
java.lang.String |
getFragment() |
java.nio.file.PathMatcher |
getPathMatcher() |
protected static com.google.re2j.Pattern |
getRegEx(java.lang.String filterAndDateMark) |
java.lang.String |
getRootDir() |
protected static java.lang.String |
getRootDir(java.lang.String collectionSpec,
java.lang.String defaultRootDir,
java.lang.String delimiter) |
protected static java.lang.String[] |
splitOnLastDelimiter(java.lang.String collectionSpec,
java.lang.String delimiter) |
java.lang.String |
toString() |
boolean |
wantSubdirs() |
protected final java.lang.String spec
protected final java.lang.String rootDir
protected final boolean subdirs
protected final boolean filterOnName
protected final com.google.re2j.Pattern filter
protected final java.lang.String dateFormatMark
protected final java.lang.String delimiter
protected final java.lang.String fragment
protected CollectionSpecParserAbstract(java.lang.String collectionSpec, java.lang.String rootDir, java.lang.String filterAndDateMark, java.lang.String delimiter, java.lang.String fragment, java.util.Formatter errlog)
collectionSpec
- the collection specrootDir
- the root directoryfilterAndDateMark
- the part of spec containing filter and/ or date markdelimiter
- the delimiter in the file pathfragment
- in patherrlog
- put error messages here, may be nullprotected CollectionSpecParserAbstract(java.lang.String rootDir, java.lang.String regExp, java.lang.String delimiter, java.lang.String fragment, java.util.Formatter errlog)
rootDir
- the root directoryregExp
- the regular expression to use as a filterdelimiter
- the delimiter in the file pathfragment
- in patherrlog
- put error messages here, may be nullprotected static java.lang.String getRootDir(java.lang.String collectionSpec, java.lang.String defaultRootDir, java.lang.String delimiter)
protected static java.lang.String getFilterAndDateMark(java.lang.String collectionSpec, java.lang.String delimiter)
protected static java.lang.String[] splitOnLastDelimiter(java.lang.String collectionSpec, java.lang.String delimiter)
protected static com.google.re2j.Pattern getRegEx(java.lang.String filterAndDateMark)
protected static java.lang.String getDateFormatMark(java.lang.String filterAndDateMark)
public java.nio.file.PathMatcher getPathMatcher()
public java.lang.String getRootDir()
public abstract java.lang.String getFilePath(java.lang.String filename)
filename
- the file namepublic java.lang.String getDelimiter()
public java.lang.String getFragment()
public boolean wantSubdirs()
public com.google.re2j.Pattern getFilter()
public boolean getFilterOnName()
public java.lang.String getDateFormatMark()
public java.lang.String toString()
toString
in class java.lang.Object