public interface MCollection extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close and release any resources.
|
CalendarDate |
extractDate(MFile mfile)
Use the date extractor to extract the date from the filename.
|
Object |
getAuxInfo(String key) |
String |
getCollectionName()
The name of the collection
|
CloseableIterator<MFile> |
getFileIterator()
Get the current collection of MFile, no guaranteed order.
|
List<String> |
getFilenames()
Sorted filename
|
Iterable<MFile> |
getFilesSorted()
Get the current collection of MFile.
|
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.
|
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 ?
|
void |
putAuxInfo(String key,
Object value) |
String getCollectionName()
String getRoot()
CalendarDate extractDate(MFile mfile)
mfile
- extract from hereboolean hasDateExtractor()
CalendarDate getPartitionDate()
void close()
close
in interface AutoCloseable
int getProtoIndex(int n)
n
- size to choose fromlong getLastModified()
String getIndexFilename()
Iterable<MFile> getFilesSorted() throws IOException
IOException
List<String> getFilenames() throws IOException
IOException
MFile getLatestFile() throws IOException
IOException
CloseableIterator<MFile> getFileIterator() throws IOException
try (CloseableIteratoriter = getFileIterator()) { while (iter.hasNext()) { MFile file = iter.next(); } }
IOException
Copyright © 1999–2016 UCAR/Unidata. All rights reserved.