|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| DocumentWriter | This is the interface to the back-end of the system. |
| DocumentWriterOptions | This interface describes the possibilities of the DocumentWriter to access its options. |
| MultipleDocumentStream | This interface describes the ability of a class to produce multiple output documents. |
| SingleDocumentStream | This interface describes the ability of a class to produce a single output document. |
| Class Summary | |
|---|---|
| DocumentWriterFactory | This is the factory to provide an instance of a document writer. |
This package contains the backends of
To write a document writer you start to create a class which
implements the interface DocumentWriter.
This interface describes the ability to receive some nodes for
processing. This is usually not enough. In addition it is necessary
to send the result to some destination. This is accomplished by the
interfaces SingleDocumentStream and MultipleDocumentStream.
The decoupling of the actual output stream and the writing of the document is necessary to relief the document writer from the task and concentrate the same routine for each document writer in one place. On the other side with this approach it is possible to transparently add some processing before or after the document writer. It would also be possible not only to direct the output to some file but send it to a display immediately.
The interface SingleDocumentStream is used by those document writers which send
the output to a single destination. At startup the method
setOutputStream() is invoked and the output stream is passed to the
document writer. As an example consider a classical dvi document
writer which tries to produce one output file.
The interface MultipleDocumentStream is used by those document writers which
send the output to several destinations. As an example consider an
EPS writer which produces one file per page. Here the method
setOutputStreamFactory() is invoked at startup and a factory is
passed to the document writer which can be used to acquire the next
output stream. In fact MultipleDocumentStream can also be used in
the case of a single output stream but the SingleDocumentStream is
a little bit easier to use.
The document writer can implement the interface Configurable.
In this case the configuration object is passed to the document
writer at startup.
The document writer can implement the interface PropertyAware.
In this case the properties with the user's settings are passed to
the document writer at startup.
The document writer can implement the interface LogEnabled. In this case
the logger is passed to the document writer at startup. It can be
used to send some informative or debugging messages to the log
file.
The document writer can implement the interface ColorAware. In this case a color
converter is passed to the document writer.
The document writer can implement the interface ResourceAware. In this
case a resource finder is passed to the document writer.
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||