com.aurigalogic.doclet.writer
Class AbstractDocWriter

java.lang.Object
  |
  +--com.aurigalogic.doclet.writer.AbstractDocWriter
All Implemented Interfaces:
DocWriter
Direct Known Subclasses:
FODocWriter

public abstract class AbstractDocWriter
extends java.lang.Object
implements DocWriter

Abstract doc writer.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/12/24 12:38:12 $
Author:
Khurshidali Shaikh

Field Summary
protected  java.io.InputStream cssStream
           
protected  org.apache.avalon.framework.logger.ConsoleLogger log
           
protected static java.lang.String OUTPUT_HTML
           
protected static java.lang.String OUTPUT_XML
           
protected  java.lang.String outputFile
           
protected  java.util.Properties parameters
           
protected  java.io.InputStream xmlStream
           
protected  java.io.InputStream xslStream
           
 
Constructor Summary
AbstractDocWriter()
           
 
Method Summary
 void doTransform(java.io.InputStream xmlStream, java.io.InputStream xslStream, java.io.OutputStream outputStream, java.lang.String outputMethod, java.util.Properties parameters)
          Takes the xml source and write the output to the given stream by doing an xsl transformation.
 void setCssStream(java.io.InputStream cssStream)
          Sets the css stream.
 void setOutputFile(java.lang.String outputFile)
          Sets the output file.
 void setParameters(java.util.Properties params)
          Sets the parameters.
 void setXmlStream(java.io.InputStream xmlStream)
          Sets the xml stream.
 void setXslStream(java.io.InputStream xslStream)
          Sets the xsl stream.
abstract  void writeDoc()
          Write the output document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_HTML

protected static final java.lang.String OUTPUT_HTML
See Also:
Constant Field Values

OUTPUT_XML

protected static final java.lang.String OUTPUT_XML
See Also:
Constant Field Values

xmlStream

protected java.io.InputStream xmlStream

xslStream

protected java.io.InputStream xslStream

cssStream

protected java.io.InputStream cssStream

outputFile

protected java.lang.String outputFile

parameters

protected java.util.Properties parameters

log

protected org.apache.avalon.framework.logger.ConsoleLogger log
Constructor Detail

AbstractDocWriter

public AbstractDocWriter()
Method Detail

setXmlStream

public void setXmlStream(java.io.InputStream xmlStream)
Sets the xml stream.

Specified by:
setXmlStream in interface DocWriter
Parameters:
xmlStream - the xml stream.

setXslStream

public void setXslStream(java.io.InputStream xslStream)
Sets the xsl stream.

Specified by:
setXslStream in interface DocWriter
Parameters:
xslStream - the xsl stream.

setCssStream

public void setCssStream(java.io.InputStream cssStream)
Sets the css stream.

Specified by:
setCssStream in interface DocWriter
Parameters:
cssStream - the css stream.

setOutputFile

public void setOutputFile(java.lang.String outputFile)
Sets the output file.

Specified by:
setOutputFile in interface DocWriter
Parameters:
outputFile - the output file.

setParameters

public void setParameters(java.util.Properties params)
Sets the parameters.

Specified by:
setParameters in interface DocWriter

writeDoc

public abstract void writeDoc()
                       throws java.lang.Exception
Description copied from interface: DocWriter
Write the output document.

Specified by:
writeDoc in interface DocWriter
java.lang.Exception

doTransform

public void doTransform(java.io.InputStream xmlStream,
                        java.io.InputStream xslStream,
                        java.io.OutputStream outputStream,
                        java.lang.String outputMethod,
                        java.util.Properties parameters)
                 throws java.lang.Exception
Takes the xml source and write the output to the given stream by doing an xsl transformation.

Parameters:
xmlStream - the xml stream
xslStream - the xsl stream
outputStream - the output stream
outputMethod - the output method(text,html,xml)
parameters - additonal xsl parameters
Throws:
java.lang.Exception - in case of an error.