net.sf.joost.emitter
Class FOPEmitter

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by net.sf.joost.emitter.FOPEmitter
All Implemented Interfaces:
Constants, StxEmitter, ContentHandler, DTDHandler, EntityResolver, ErrorHandler, LexicalHandler, XMLFilter, XMLReader

public class FOPEmitter
extends XMLFilterImpl
implements StxEmitter

Wrapper class which passes SAX events to FOP

Version:
$Revision: 1.3 $ $Date: 2005/03/13 17:12:48 $, tested with FOP 0.20.4
Author:
Oliver Becker

Field Summary
private  String systemId
          The system identifier required by StxEmitter
 
Fields inherited from interface net.sf.joost.Constants
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS
 
Constructor Summary
FOPEmitter(OutputStream os)
          Constructs a new FOPEmitter wrapper object.
 
Method Summary
 void comment(char[] ch, int start, int length)
           
 void endCDATA()
           
 void endDTD()
           
 void endEntity(String name)
           
static ContentHandler getFOPContentHandler(OutputStream os)
           
 String getSystemId()
          Get the system identifier that was set with StxEmitter.setSystemId(String).
 void setSystemId(String systemId)
          Set the system identifier for this emitter.
 void startCDATA()
           
 void startDTD(String name, String pubId, String sysId)
           
 void startEntity(String name)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 

Field Detail

systemId

private String systemId
The system identifier required by StxEmitter

Constructor Detail

FOPEmitter

public FOPEmitter(OutputStream os)
Constructs a new FOPEmitter wrapper object.

Parameters:
os - the stream to which the PDF output will be written by FOP
Method Detail

getFOPContentHandler

public static ContentHandler getFOPContentHandler(OutputStream os)
Parameters:
os - the stream to which the PDF output will be written by FOP
Returns:
the content handler of a FOP Driver object which is used to process FO data

startDTD

public void startDTD(String name,
                     String pubId,
                     String sysId)
Specified by:
startDTD in interface LexicalHandler

endDTD

public void endDTD()
Specified by:
endDTD in interface LexicalHandler

startEntity

public void startEntity(String name)
Specified by:
startEntity in interface LexicalHandler

endEntity

public void endEntity(String name)
Specified by:
endEntity in interface LexicalHandler

startCDATA

public void startCDATA()
Specified by:
startCDATA in interface LexicalHandler

endCDATA

public void endCDATA()
Specified by:
endCDATA in interface LexicalHandler

comment

public void comment(char[] ch,
                    int start,
                    int length)
Specified by:
comment in interface LexicalHandler

getSystemId

public String getSystemId()
Description copied from interface: StxEmitter
Get the system identifier that was set with StxEmitter.setSystemId(String).

Specified by:
getSystemId in interface StxEmitter
Returns:
the system identifier or null if StxEmitter.setSystemId(String) was not called.

setSystemId

public void setSystemId(String systemId)
Description copied from interface: StxEmitter
Set the system identifier for this emitter. This is optional - the system identifier may be used to resolve relative output identifiers.

Specified by:
setSystemId in interface StxEmitter
Parameters:
systemId - the system identifier as a URI string