public abstract class CollectionAbstract extends Object implements MCollection
| Modifier and Type | Class and Description |
|---|---|
class |
CollectionAbstract.DateSorter |
class |
CollectionAbstract.MyGribFilter |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
auxInfo |
static String |
CATALOG |
protected String |
collectionName |
protected DateExtractor |
dateExtractor |
static String |
DIR |
static String |
FILE |
protected MFileFilter |
filter |
static String |
GLOB |
protected long |
lastModified |
static String |
LIST |
protected org.slf4j.Logger |
logger |
static String |
NCX_SUFFIX |
protected FeatureCollectionConfig.ProtoChoice |
protoChoice |
protected String |
root |
protected DirectoryStream.Filter<Path> |
sfilter |
protected CalendarDate |
startCollection |
| Modifier | Constructor and Description |
|---|---|
protected |
CollectionAbstract(String collectionName,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static String |
cleanName(String name) |
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
|
List<String> |
getFilenames()
Sorted filename
|
String |
getIndexFilename() |
long |
getLastModified()
last time this collection was modified
|
MFile |
getLatestFile()
The latest file in 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
|
CalendarDate |
getStartCollection()
The starting date of the collection.
|
boolean |
hasDateExtractor()
Does this CollectionManager have the ability to extract a date from the MFile ?
|
boolean |
isLeaf()
Consider MCollections as a tree.
|
protected List<MFile> |
makeFileListSorted() |
static MCollection |
open(String collectionName,
String collectionSpec,
String olderThan,
Formatter errlog) |
long |
parseOlderThanString(String olderThan) |
void |
putAuxInfo(String key,
Object value) |
void |
setDateExtractor(DateExtractor dateExtractor) |
void |
setLeaf(boolean isLeaf) |
void |
setMFileFilter(MFileFilter filter) |
void |
setRoot(String root) |
void |
setStreamFilter(DirectoryStream.Filter<Path> filter) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getFileIterator, getFilesSortedpublic static final String NCX_SUFFIX
public static final String CATALOG
public static final String DIR
public static final String FILE
public static final String LIST
public static final String GLOB
protected String collectionName
protected String root
protected final org.slf4j.Logger logger
protected FeatureCollectionConfig.ProtoChoice protoChoice
protected DateExtractor dateExtractor
protected CalendarDate startCollection
protected long lastModified
protected MFileFilter filter
protected DirectoryStream.Filter<Path> sfilter
protected CollectionAbstract(String collectionName, org.slf4j.Logger logger)
public static MCollection open(String collectionName, String collectionSpec, String olderThan, Formatter errlog) throws IOException
IOExceptionpublic boolean isLeaf()
MCollectionisLeaf in interface MCollectionpublic void setLeaf(boolean isLeaf)
public String getCollectionName()
MCollectiongetCollectionName in interface MCollectionpublic String getIndexFilename()
getIndexFilename in interface MCollectionpublic void setMFileFilter(MFileFilter filter)
public void setStreamFilter(DirectoryStream.Filter<Path> filter)
public String getRoot()
MCollectiongetRoot in interface MCollectionpublic void setRoot(String root)
public long getLastModified()
MCollectiongetLastModified in interface MCollectionpublic MFile getLatestFile() throws IOException
MCollectiongetLatestFile in interface MCollectionIOExceptionpublic List<String> getFilenames() throws IOException
MCollectiongetFilenames in interface MCollectionIOExceptionpublic CalendarDate extractDate(MFile mfile)
MCollectionextractDate in interface MCollectionmfile - extract from herepublic boolean hasDateExtractor()
MCollectionhasDateExtractor in interface MCollectionpublic void setDateExtractor(DateExtractor dateExtractor)
public CalendarDate getStartCollection()
MCollectiongetStartCollection in interface MCollectionpublic Object getAuxInfo(String key)
getAuxInfo in interface MCollectionpublic void putAuxInfo(String key, Object value)
putAuxInfo in interface MCollectionpublic int getProtoIndex(int n)
MCollectiongetProtoIndex in interface MCollectionn - size to choose fromprotected List<MFile> makeFileListSorted() throws IOException
IOExceptionpublic long parseOlderThanString(String olderThan)
Copyright © 1999–2015 UCAR/Unidata. All rights reserved.