public abstract class CollectionAbstract extends java.lang.Object implements MCollection
where:
| Modifier and Type | Class and Description |
|---|---|
class |
CollectionAbstract.DateSorter |
class |
CollectionAbstract.MyStreamFilter |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
auxInfo |
static java.lang.String |
CATALOG |
protected java.lang.String |
collectionName |
protected DateExtractor |
dateExtractor |
static java.lang.String |
DIR |
static java.lang.String |
FILE |
static java.lang.String |
GLOB |
protected long |
lastModified |
static java.lang.String |
LIST |
protected org.slf4j.Logger |
logger |
static java.lang.String |
NCX_SUFFIX |
protected FeatureCollectionConfig.ProtoChoice |
protoChoice |
protected java.lang.String |
root |
protected java.nio.file.DirectoryStream.Filter<java.nio.file.Path> |
sfilter |
protected CalendarDate |
startCollection |
| Modifier | Constructor and Description |
|---|---|
protected |
CollectionAbstract(java.lang.String collectionName,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
cleanName(java.lang.String name) |
CalendarDate |
extractDate(MFile mfile)
Use the date extractor to extract the date from the filename.
|
java.lang.Object |
getAuxInfo(java.lang.String key) |
java.lang.String |
getCollectionName()
The name of the collection
|
java.util.List<java.lang.String> |
getFilenames()
Sorted filename
|
java.lang.String |
getIndexFilename() |
long |
getLastModified()
last time this collection was modified
|
MFile |
getLatestFile()
The latest file in the collection.
|
CalendarDate |
getPartitionDate()
The date to partition on, usually the starting date of the collection.
|
int |
getProtoIndex(int n)
Choose Proto dataset as index from [0..n-1], based on configuration.
|
java.lang.String |
getRoot()
Get common root directory of all MFiles in the collection - may be null
|
boolean |
hasDateExtractor()
Does this CollectionManager have the ability to extract a date from the MFile ?
|
protected java.util.List<MFile> |
makeFileListSorted() |
static MCollection |
open(java.lang.String collectionName,
java.lang.String collectionSpec,
java.lang.String olderThan,
java.util.Formatter errlog) |
protected long |
parseOlderThanString(java.lang.String olderThan)
parse the "olderThan" TimeDuration, meaning files must not have been modified since this amount of time
|
void |
putAuxInfo(java.lang.String key,
java.lang.Object value) |
void |
setDateExtractor(DateExtractor dateExtractor) |
protected void |
setRoot(java.lang.String root) |
void |
setStreamFilter(java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getFileIterator, getFilesSortedpublic static final java.lang.String NCX_SUFFIX
public static final java.lang.String CATALOG
public static final java.lang.String DIR
public static final java.lang.String FILE
public static final java.lang.String LIST
public static final java.lang.String GLOB
protected java.lang.String collectionName
protected java.lang.String root
protected final org.slf4j.Logger logger
protected FeatureCollectionConfig.ProtoChoice protoChoice
protected java.util.Map<java.lang.String,java.lang.Object> auxInfo
protected DateExtractor dateExtractor
protected CalendarDate startCollection
protected long lastModified
protected java.nio.file.DirectoryStream.Filter<java.nio.file.Path> sfilter
protected CollectionAbstract(java.lang.String collectionName,
org.slf4j.Logger logger)
public static MCollection open(java.lang.String collectionName, java.lang.String collectionSpec, java.lang.String olderThan, java.util.Formatter errlog) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String cleanName(java.lang.String name)
public java.lang.String getCollectionName()
MCollectiongetCollectionName in interface MCollectionpublic java.lang.String getIndexFilename()
getIndexFilename in interface MCollectionpublic void setStreamFilter(java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter)
public java.lang.String getRoot()
MCollectiongetRoot in interface MCollectionprotected void setRoot(java.lang.String root)
public long getLastModified()
MCollectiongetLastModified in interface MCollectionpublic MFile getLatestFile() throws java.io.IOException
MCollectiongetLatestFile in interface MCollectionjava.io.IOExceptionpublic java.util.List<java.lang.String> getFilenames()
throws java.io.IOException
MCollectiongetFilenames in interface MCollectionjava.io.IOExceptionpublic CalendarDate extractDate(MFile mfile)
MCollectionextractDate in interface MCollectionmfile - extract from herepublic boolean hasDateExtractor()
MCollectionhasDateExtractor in interface MCollectionpublic void setDateExtractor(DateExtractor dateExtractor)
public CalendarDate getPartitionDate()
MCollectiongetPartitionDate in interface MCollectionpublic java.lang.Object getAuxInfo(java.lang.String key)
getAuxInfo in interface MCollectionpublic void putAuxInfo(java.lang.String key,
java.lang.Object value)
putAuxInfo in interface MCollectionpublic int getProtoIndex(int n)
MCollectiongetProtoIndex in interface MCollectionn - size to choose fromprotected java.util.List<MFile> makeFileListSorted() throws java.io.IOException
java.io.IOExceptionprotected long parseOlderThanString(java.lang.String olderThan)
olderThan - TimeDuration string