|
TEMERITY | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectus.temerity.pipeline.FileSeq
public class FileSeq
A sequence of one or more files associated with a Pipeline node.
The file sequence is composed of FilePattern and
FrameRange components which together define a unique set of files.
FilePattern,
FrameRange,
Serialized Form| Constructor Summary | |
|---|---|
FileSeq()
This constructor is required by the GlueDecoder to instantiate the class
when encountered during the reading of GLUE format files and should not be called
from user code. |
|
FileSeq(FilePattern pattern,
FrameRange range)
Construct a general FileSeq from FilePattern and
FrameRange components. |
|
FileSeq(FileSeq fseq)
Copy constructor. |
|
FileSeq(FileSeq fseq,
int idx)
Construct a FileSeq which contains only a single file extracted from
the given file sequence. |
|
FileSeq(FileSeq fseq,
int startIdx,
int endIdx)
Construct a FileSeq which contains a subset of the frames from the
given file sequence. |
|
FileSeq(String path,
FileSeq fseq)
Construct a FileSeq by prepend a path to an existing file sequence. |
|
FileSeq(String prefix,
String suffix)
Construct a FileSeq which contains a single frame without a frame number. |
|
| Method Summary | |
|---|---|
Object |
clone()
Return a deep copy of this object. |
static TreeSet<FileSeq> |
collate(Set<File> files,
boolean ignoreInvalid)
Constructs the minimum set of file sequences which include all of the given files. |
static TreeSet<FileSeq> |
collateSeqs(Set<FileSeq> fseqs)
Constructs the minimum set of file sequences which include all of the files associated with the given set of file sequences. |
int |
compareTo(FileSeq fseq)
Compares this FileSeq with the given FileSeq for order. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
void |
fromGlue(GlueDecoder decoder)
Restores the non-transient fields of the class from Glue. |
static FileSeq |
fromString(String stringRep)
Construct a FileSeq from the string representation of a file sequence. |
File |
getFile(int idx)
Generated a literal filename for the given frame number. |
FilePattern |
getFilePattern()
Get the filename pattern. |
ArrayList<File> |
getFiles()
Generate a list of all of the files in the file sequence. |
FrameRange |
getFrameRange()
Get the file sequence frame range. |
Path |
getPath(int idx)
Generated an abstract pathname for the given frame number. |
ArrayList<Path> |
getPaths()
Generate a list of abstract pathnames of all of the files in the file sequence. |
boolean |
hasFrameNumbers()
Does this FileSeq have a frame number component? |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isSingle()
Is this a single frame sequence? |
int |
numFrames()
The total number of frames in the file sequence. |
boolean |
similarTo(FileSeq fseq)
Whether the given file sequence have an identical prefix and suffix as this file sequence. |
void |
toGlue(GlueEncoder encoder)
Saves the non-transient fields of this object as Glue. |
String |
toString()
Return a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileSeq()
GlueDecoder to instantiate the class
when encountered during the reading of GLUE format files and should not be called
from user code.
public FileSeq(String prefix,
String suffix)
FileSeq which contains a single frame without a frame number.
prefix - The required filename prefix component. This argument cannot be null.suffix - The filename extension (or suffix) component. If null is passed for this
argument, then the filename will have no suffix component.
public FileSeq(FilePattern pattern,
FrameRange range)
FileSeq from FilePattern and
FrameRange components.
pattern - The filename pattern. This argument cannot be null.range - The frame range of the file sequence. If this is a single frame file sequence
without frame numbers, null should be passed for this argument.
IllegalArgumentException - If the pattern has a frame number component and the range
is null. If the pattern has NO frame number component and
the range is NOT null.
public FileSeq(FileSeq fseq,
int idx)
FileSeq which contains only a single file extracted from
the given file sequence.
fseq - The file sequence which contains the file to be extracted.idx - The frame index of the file to be extracted.
public FileSeq(FileSeq fseq,
int startIdx,
int endIdx)
FileSeq which contains a subset of the frames from the
given file sequence.
fseq - The original file sequence.startIdx - The frame index of the first file.endIdx - The frame index of the last file.
public FileSeq(String path,
FileSeq fseq)
FileSeq by prepend a path to an existing file sequence.
path - The path to prepend.fseq - The file sequence to prepend.public FileSeq(FileSeq fseq)
| Method Detail |
|---|
public boolean hasFrameNumbers()
FileSeq have a frame number component?
public boolean isSingle()
public FilePattern getFilePattern()
public FrameRange getFrameRange()
public int numFrames()
public File getFile(int idx)
idx - The frame index of the file. Valid frame indices are in the range:
[0,numFrames()).public ArrayList<File> getFiles()
public Path getPath(int idx)
idx - The frame index of the file. Valid frame indices are in the range:
[0,numFrames()).public ArrayList<Path> getPaths()
public boolean equals(Object obj)
equals in class Objectobj - The reference object with which to compare.public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int compareTo(FileSeq fseq)
FileSeq with the given FileSeq for order.
compareTo in interface Comparable<FileSeq>fseq - The FileSeq to be compared.public boolean similarTo(FileSeq fseq)
The similarity of file sequences is independent of whether they have any frame numbers in common. In other words, there is no requirement that they share any literal files.
public Object clone()
clone in class Object
public void toGlue(GlueEncoder encoder)
throws GlueException
GlueableGlueEncoder.encode for each
non-transient field of the parent object.
toGlue in interface Glueableencoder - [modified]
The object used to encode this object's fields into Glue format.
GlueException
public void fromGlue(GlueDecoder decoder)
throws GlueException
GlueableGlueDecoder.decode for each non-transient
field of the parent object.
fromGlue in interface Glueabledecoder - The object used to decode this object's fields from Glue format.
GlueExceptionpublic static TreeSet<FileSeq> collateSeqs(Set<FileSeq> fseqs)
fseqs - The original file sequences.
public static TreeSet<FileSeq> collate(Set<File> files,
boolean ignoreInvalid)
throws PipelineException
WARNING: The prefix of the returned file sequences will be seperated with an operating system dependent character.
files - The files which define the file sequences created.ignoreInvalid - Whether to ignore files which do not conform to the file naming conventions.
PipelineException - If invalid or conflicting files are given.public static FileSeq fromString(String stringRep)
FileSeq from the string representation of a file sequence.
prefix[.#|@...][.suffix][,start[-end[xby]]]
Completely specifies a file sequence associated with the target node. The filename prefix (prefix) is required. The optional frame number pattern may either be a (#) character for 4-digit padded frame numbers or one or more (@) characters, each specifying one digit of padding. A single (@) character is the same as unpadded frame numbers. The last entry is an optional filename suffix (suffix). If a frame number pattern was specified, the start frame (start) must also be specified. If the file sequence contains only a single frame, the single frame number is specified by the start frame. Multiple frame sequences also specify an end frame (end) and optionally a frame step increment (by).
stringRep - The string representation of the FileSeq.
IllegalArgumentException - If the string passed in does not represent a valid FileSeq
|
TEMERITY | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||