public class ConvertData extends java.lang.Object implements ConverterResult
ConvertData
is used as a container for passing
OutputFile
objects in and out of the Convert
class. The ConvertData
contains a String
name and a Vector
of OutputFile
objects.
Constructor and Description |
---|
ConvertData() |
Modifier and Type | Method and Description |
---|---|
void |
addDocument(OutputFile doc)
Adds a
OutputFile to the vector. |
OutputFile |
getMasterDocument()
Get the master document
|
java.lang.String |
getName()
Returns the
OutputFile name. |
int |
getNumDocuments()
Gets the number of
OutputFile objects currently stored |
boolean |
isMasterDocument(OutputFile doc)
Check if a given document is the master document
|
java.util.Iterator |
iterator()
Gets an
Iterator to access the Vector
of OutputFile objects |
void |
reset()
Resets ConvertData.
|
void |
setName(java.lang.String docName)
Sets the
OutputFile name. |
void |
write(java.io.File dir)
Write all files of the
ConverterResult to a directory. |
public void reset()
OutputFile
objects from this class. This allows reuse of a
ConvertData
.public java.lang.String getName()
OutputFile
name.OutputFile
name.public void setName(java.lang.String docName)
OutputFile
name.docName
- The name of the OutputFile
.public void addDocument(OutputFile doc)
OutputFile
to the vector.doc
- The OutputFile
to add.public OutputFile getMasterDocument()
getMasterDocument
in interface ConverterResult
OutputFile
the master documentpublic boolean isMasterDocument(OutputFile doc)
doc
- The OutputFile
to checkpublic java.util.Iterator iterator()
Iterator
to access the Vector
of OutputFile
objectsiterator
in interface ConverterResult
Iterator
to access the
Vector
of OutputFile
objects.public int getNumDocuments()
OutputFile
objects currently storedOutputFile
objects currently
stored.public void write(java.io.File dir) throws java.io.IOException
ConverterResult
ConverterResult
to a directory.
Subdirectories are created as required by the individual
OutputFile
s.write
in interface ConverterResult
dir
- the directory to write to (this directory must exist).
If the parameter is null, the default directory is usedjava.io.IOException
- if the directory does not exist or one or more files
could not be written