|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BatchConverter
This is an interface for a converter, which offers conversion of
all OpenDocument (or OpenOffice.org 1.x) documents in a directory
(and optionally subdirectories), creating index pages in a specific format.
Instances of this interface are created using the
ConverterFactory
Method Summary | |
---|---|
void |
convert(java.io.File source,
java.io.File target,
boolean bRecurse,
BatchHandler handler)
Convert a directory using the given Converter (if none is given,
all files will be ignored). |
OutputFile |
createIndexFile(java.lang.String sHeading,
IndexPageEntry[] entries)
Create an index page with specific entries |
Config |
getConfig()
Get the configuration interface for this batch converter |
void |
readTemplate(java.io.File file)
Read a template to use as a base for the index pages. |
void |
readTemplate(java.io.InputStream is)
Read a template to use as a base for the index pages. |
void |
setConverter(Converter converter)
Define a Converter implementation to use for
conversion of the individual documents. |
Method Detail |
---|
Config getConfig()
void setConverter(Converter converter)
Converter
implementation to use for
conversion of the individual documents.
If no converter is given, the convert
method cannot
convert documents (but can still create index pages).
converter
- the Converter
to usevoid readTemplate(java.io.InputStream is) throws java.io.IOException
BatchConverter
implementation.
is
- an InputStream
from which to read the template
java.io.IOException
- if some exception occurs while reading the templatevoid readTemplate(java.io.File file) throws java.io.IOException
BatchConverter
implementation.
file
- the file from which to read the template
java.io.IOException
- if the file does not exist or some exception occurs
while reading the templateOutputFile createIndexFile(java.lang.String sHeading, IndexPageEntry[] entries)
sHeading
- a heading describing the index pageentries
- an array of IndexPageEntry
objects (null entries
are allowed, and will be ignored) describing the individual directories
and documentsvoid convert(java.io.File source, java.io.File target, boolean bRecurse, BatchHandler handler)
Converter
(if none is given,
all files will be ignored).
This method fails silently if you haven't set a converter.
source
- a File
representing the directory to converttarget
- a File
representing the directory to contain
the converted documentsbRecurse
- determines wether or not to recurse into subdirectorieshandler
- a BatchHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |