public class FileStorageModelOld
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
FileStorageModelOld.FieldHandler |
static class |
FileStorageModelOld.IntegerFieldHandler |
Modifier and Type | Field and Description |
---|---|
static int |
EndDay |
static int |
EndDoy |
static int |
EndHour |
static int |
EndMinute |
static int |
EndMonth |
static int |
EndMonthName |
static int |
EndSecond |
static int |
EndYear2 |
static int |
EndYear4 |
static int |
Ignore |
static int |
StartDay |
static int |
StartDoy |
static int |
StartHour |
static int |
StartMinute |
static int |
StartMonth |
static int |
StartMonthName |
static int |
StartSecond |
static int |
StartYear2 |
static int |
StartYear4 |
Constructor and Description |
---|
FileStorageModelOld(FileStorageModelOld parent,
FileSystem root,
java.lang.String regex,
FileStorageModelOld.FieldHandler[] handlers) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
calculateNameFor(Datum start)
return the name that this time will fall into.
|
boolean |
containsFile(java.io.File file)
returns true if the file came (or could come) from this FileStorageModel.
|
static FileStorageModelOld |
create(FileSystem root,
java.lang.String template)
%Y 4-digit year
%y 2-digit year
%m 2-digit month
%d 2-digit day of month
%j 3-digit day of year
%H 2-digit hour
%M 2-digit minute
%b month name
|
static FileStorageModelOld |
create(FileSystem root,
java.lang.String regex,
int[] digitList) |
java.io.File |
getFileFor(java.lang.String name,
ProgressMonitor monitor)
retrieve the file for the name.
|
java.lang.String |
getFilenameFor(Datum start,
Datum end) |
java.io.File[] |
getFilesFor(DatumRange targetRange) |
java.io.File[] |
getFilesFor(DatumRange targetRange,
ProgressMonitor monitor)
returns a list of files that can be used
|
FileSystem |
getFileSystem() |
java.lang.String |
getNameFor(java.io.File file)
Need a way to recover the model name of a file.
|
java.lang.String[] |
getNamesFor(DatumRange targetRange) |
java.lang.String[] |
getNamesFor(DatumRange targetRange,
ProgressMonitor monitor) |
static java.lang.String |
getParentRegex(java.lang.String regex) |
DatumRange |
getRangeFor(java.lang.String name) |
java.lang.String |
getRepresentativeFile(ProgressMonitor monitor)
this is introduced to support discovery, where we just need one file to
get started.
|
void |
setFileWidth(int multiplier,
char digitCode)
specify each file's width when the implicit width is not correct.
|
java.lang.String |
toString() |
public static final int StartYear4
public static final int StartYear2
public static final int StartMonth
public static final int StartMonthName
public static final int StartDay
public static final int StartDoy
public static final int StartHour
public static final int StartMinute
public static final int StartSecond
public static final int EndYear4
public static final int EndYear2
public static final int EndMonth
public static final int EndMonthName
public static final int EndDay
public static final int EndDoy
public static final int EndHour
public static final int EndMinute
public static final int EndSecond
public static final int Ignore
public FileStorageModelOld(FileStorageModelOld parent, FileSystem root, java.lang.String regex, FileStorageModelOld.FieldHandler[] handlers)
public java.lang.String[] getNamesFor(DatumRange targetRange) throws java.io.IOException
targetRange
- restrict search to range. May be null, in which case all names are returned.java.io.IOException
- if the filesystem cannot be listed.public java.lang.String calculateNameFor(Datum start)
start
- java.lang.IllegalArgumentException
- if this cannot be done.public java.lang.String[] getNamesFor(DatumRange targetRange, ProgressMonitor monitor) throws java.io.IOException
targetRange
- restrict search to range. May be null, in which case all
names are returned.java.io.IOException
- if the filesystem cannot be listed.public java.lang.String getRepresentativeFile(ProgressMonitor monitor) throws java.io.IOException
java.io.IOException
public java.io.File[] getFilesFor(DatumRange targetRange) throws java.io.IOException
java.io.IOException
public DatumRange getRangeFor(java.lang.String name)
public boolean containsFile(java.io.File file)
public java.lang.String getNameFor(java.io.File file)
public java.io.File getFileFor(java.lang.String name, ProgressMonitor monitor) throws java.io.FileNotFoundException, java.io.IOException
java.io.IOException
- if the file cannot be transferred.java.io.FileNotFoundException
public java.io.File[] getFilesFor(DatumRange targetRange, ProgressMonitor monitor) throws java.io.IOException
java.io.IOException
public static java.lang.String getParentRegex(java.lang.String regex)
public static FileStorageModelOld create(FileSystem root, java.lang.String regex, int[] digitList)
public static FileStorageModelOld create(FileSystem root, java.lang.String template)
public java.lang.String toString()
toString
in class java.lang.Object
public FileSystem getFileSystem()
public void setFileWidth(int multiplier, char digitCode)
digitCode
- 'Y', 'm', 'd', 'H', etc.