|
|||||||||
| Home >> All >> org >> ujac >> [ print overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.ujac.print
Class DocumentPrinter

java.lang.Objectorg.ujac.print.DocumentPrinter
- public class DocumentPrinter
- extends java.lang.Object
Name: DocumentPrinter
Description: A class printing xml based documents.
Log: $Log: DocumentPrinter.java,v $
Log: Revision 1.29 2003/12/13 01:08:24 lauerc
Log: Setting the same xml reader class as attribute of the document handler as the one that parses the main document.
Log:
Log: Revision 1.28 2003/12/08 08:37:32 lauerc
Log: Fixed bug due to interface changes at org.ujac.util.table.Column.
Log:
Log: Revision 1.27 2003/12/07 23:52:28 lauerc
Log: Renamed org.ujac.util.table.Table to org.ujac.util.table.DataTable.
Log:
Log: Revision 1.26 2003/11/23 17:29:41 lauerc
Log: Fixed javadoc tags.
Log:
Log: Revision 1.25 2003/11/23 02:59:03 lauerc
Log: Added support for table column layout hints.
Log:
Log: Revision 1.24 2003/11/14 13:13:08 lauerc
Log: Fixed bug in method parseRow.
Log:
Log: Revision 1.23 2003/11/01 12:05:22 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.22 2003/10/25 14:56:43 lauerc
Log: Fixed parsing of quoted Strings at method parseRow.
Log:
Log: Revision 1.21 2003/10/16 17:02:46 lauerc
Log: Added method addDefaultProperties, which fills in default properties,
Log: currently it adds the property 'today'.
Log:
Log: Revision 1.20 2003/10/13 22:49:46 lauerc
Log: At method printDocument: When formatHelper has not been defined so far, creating a new standard FormatHelper here before calling the DocumentHandler.
Log:
Log: Revision 1.19 2003/10/08 22:56:23 lauerc
Log: Added capability to parse table structures from property file for richer test cases.
Log:
Log: Revision 1.18 2003/10/04 00:18:17 lauerc
Log: Improved localization.
Log:
Log: Revision 1.17 2003/10/03 06:58:35 lauerc
Log: Added support for country option at main method.
Log:
Log: Revision 1.16 2003/10/02 23:58:46 lauerc
Log: Added localization support to expression interpreter.
Log:
Log: Revision 1.15 2003/10/02 22:53:33 lauerc
Log: Added localization support.
Log:
Log: Revision 1.14 2003/09/29 22:52:55 lauerc
Log: Allowed to define specific tag handlers, to enable users to extend the default tag set.
Log:
Log: Revision 1.13 2003/07/19 15:31:50 lauerc
Log: Added profiling output (relies on system property ujac.profile).
Log:
Log: Revision 1.12 2003/07/17 19:30:33 lauerc
Log: Added method setXmlReaderClass, which allows to define a
Log: user specific XML reader implementation.
Log:
Log: Revision 1.11 2003/07/11 07:05:53 lauerc
Log: XML Parser imlementation not hardcoded anymore, considering value from system property 'ujac.print.xml.reader', if not set, still using crimson.
Log:
Log: Revision 1.10 2003/05/26 06:56:47 lauerc
Log: In case no column number is provided (== -1) only the line number is printed in error case at main method.
Log:
Log: Revision 1.9 2003/05/08 06:32:41 lauerc
Log: Printing stack trace of cause to make bug hunting easier.
Log:
Log: Revision 1.8 2003/04/28 22:12:39 lauerc
Log: Added support for resources directory.
Log:
Log: Revision 1.7 2003/04/28 16:56:13 lauerc
Log: Fixed error message in main method.
Log:
Log: Revision 1.6 2003/04/28 16:47:12 lauerc
Log: Simple style fixes.
Log:
Log: Revision 1.5 2003/04/28 15:59:51 lauerc
Log: Added support for resource loader.
Log: Added support for Reader as input source.
Log:
Log: Revision 1.4 2003/03/31 15:29:18 lauerc
Log: Added possibility to define sequences in property file.
Log:
Log: Revision 1.3 2003/03/30 13:32:45 lauerc
Log: Added support for document locator.
Log:
Log: Revision 1.2 2003/03/27 01:53:25 lauerc
Log: Further progress in printing stuff.
Log:
Log: Revision 1.1 2003/03/26 07:50:58 lauerc
Log: Initial revision.
Log:
- Version:
- $Revision: 1.29 $
| Field Summary | |
static java.lang.String |
DEFAULT_XML_READER
The default XML reader (crimson). |
private org.ujac.util.text.FormatHelper |
formatHelper
The format helper to use. |
private java.util.Map |
properties
The properties. |
private java.io.File |
resourceDirectory
The resource directory. |
private org.ujac.util.ResourceLoader |
resourceLoader
The resource loader. |
private DocumentTagFactory |
tagFactory
The document tag factory. |
private org.xml.sax.InputSource |
templateSource
The document output stream. |
private java.lang.String |
xmlReaderClass
The XML reader implementation. |
| Constructor Summary | |
|
DocumentPrinter(java.io.InputStream templateStream,
java.util.Map properties)
Constructs a DocumentPrinter instance with specific arguments. |
|
DocumentPrinter(java.io.InputStream templateStream,
java.util.Map properties,
DocumentTagFactory tagFactory)
Constructs a DocumentPrinter instance with specific arguments. |
private |
DocumentPrinter(java.util.Map properties,
DocumentTagFactory tagFactory)
Constructs a DocumentPrinter instance with specific attributes. |
|
DocumentPrinter(java.io.Reader templateReader,
java.util.Map properties)
Constructs a DocumentPrinter instance with specific arguments. |
|
DocumentPrinter(java.io.Reader templateReader,
java.util.Map properties,
DocumentTagFactory tagFactory)
Constructs a DocumentPrinter instance with specific arguments. |
| Method Summary | |
protected void |
addDefaultProperties()
Adds default properties. |
private static void |
ensureListSize(java.util.List list,
int index)
Ensures the size of the given list, by filling the missing entries with null references. |
private static org.ujac.util.table.Row |
ensureTableSize(org.ujac.util.table.DataTable table,
int index)
Ensures the size of the given table, by filling the missing entries with null references. |
org.ujac.util.text.FormatHelper |
getFormatHelper()
Gets the format helper. |
static void |
main(java.lang.String[] args)
The main method for command line access. |
private static java.util.List |
parseRow(java.lang.String row)
Parses the given row text for items (comma separated). |
void |
printDocument(java.io.OutputStream outputStream)
Prints the document to the given output stream |
void |
setFormatHelper(org.ujac.util.text.FormatHelper formatHelper)
Sets the format helper. |
void |
setResourceDirectory(java.io.File resourceDirectory)
Sets the resource directory. |
void |
setResourceLoader(org.ujac.util.ResourceLoader resourceLoader)
Sets the resource loader. |
void |
setXmlReaderClass(java.lang.String xmlReaderClass)
Sets the XML reader implementation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DEFAULT_XML_READER
public static final java.lang.String DEFAULT_XML_READER
- The default XML reader (crimson).
- See Also:
- Constant Field Values
templateSource
private org.xml.sax.InputSource templateSource
- The document output stream.
tagFactory
private DocumentTagFactory tagFactory
- The document tag factory.
formatHelper
private org.ujac.util.text.FormatHelper formatHelper
- The format helper to use.
properties
private java.util.Map properties
- The properties.
xmlReaderClass
private java.lang.String xmlReaderClass
- The XML reader implementation.
resourceLoader
private org.ujac.util.ResourceLoader resourceLoader
- The resource loader.
resourceDirectory
private java.io.File resourceDirectory
- The resource directory.
| Constructor Detail |
DocumentPrinter
public DocumentPrinter(java.io.InputStream templateStream, java.util.Map properties)
- Constructs a DocumentPrinter instance with specific arguments.
DocumentPrinter
public DocumentPrinter(java.io.InputStream templateStream, java.util.Map properties, DocumentTagFactory tagFactory)
- Constructs a DocumentPrinter instance with specific arguments.
DocumentPrinter
public DocumentPrinter(java.io.Reader templateReader, java.util.Map properties)
- Constructs a DocumentPrinter instance with specific arguments.
DocumentPrinter
public DocumentPrinter(java.io.Reader templateReader, java.util.Map properties, DocumentTagFactory tagFactory)
- Constructs a DocumentPrinter instance with specific arguments.
DocumentPrinter
private DocumentPrinter(java.util.Map properties, DocumentTagFactory tagFactory)
- Constructs a DocumentPrinter instance with specific attributes.
In case the system propery 'ujac.print.xml.reader' is defined,
overwrites the attribute xmlReaderClassName with that value.
| Method Detail |
getFormatHelper
public org.ujac.util.text.FormatHelper getFormatHelper()
- Gets the format helper.
setFormatHelper
public void setFormatHelper(org.ujac.util.text.FormatHelper formatHelper)
- Sets the format helper.
setXmlReaderClass
public void setXmlReaderClass(java.lang.String xmlReaderClass)
- Sets the XML reader implementation.
setResourceLoader
public void setResourceLoader(org.ujac.util.ResourceLoader resourceLoader)
- Sets the resource loader.
setResourceDirectory
public void setResourceDirectory(java.io.File resourceDirectory)
- Sets the resource directory.
printDocument
public void printDocument(java.io.OutputStream outputStream) throws DocumentHandlerException, java.io.IOException
- Prints the document to the given output stream
addDefaultProperties
protected void addDefaultProperties()
- Adds default properties.
main
public static void main(java.lang.String[] args)
- The main method for command line access.
ensureListSize
private static void ensureListSize(java.util.List list, int index)
- Ensures the size of the given list, by filling the missing entries with null references.
ensureTableSize
private static org.ujac.util.table.Row ensureTableSize(org.ujac.util.table.DataTable table, int index)
- Ensures the size of the given table, by filling the missing entries with null references.
parseRow
private static java.util.List parseRow(java.lang.String row)
- Parses the given row text for items (comma separated).
|
|||||||||
| Home >> All >> org >> ujac >> [ print overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.ujac.print.DocumentPrinter