com.day.cq.rewriter.xml.fop
Class FOPNGSerializer

java.lang.Object
  extended by org.apache.cocoon.xml.sax.AbstractSAXProducer
      extended by org.apache.cocoon.xml.sax.AbstractSAXPipe
          extended by com.day.cq.rewriter.xml.fop.FOPNGSerializer
All Implemented Interfaces:
URIResolver, Serializer, ContentHandler, LexicalHandler
Direct Known Subclasses:
PersistingFOPNGSerializerFactory.PersistingFOPNGSerializer

public class FOPNGSerializer
extends org.apache.cocoon.xml.sax.AbstractSAXPipe
implements URIResolver, Serializer


Nested Class Summary
static class FOPNGSerializer.ReleaseSourceInputStream
          An InputStream which releases the Cocoon/Avalon source from which the InputStream has been retrieved when the stream is closed.
 
Field Summary
protected  ByteArrayOutputStream cachingOS
           
protected  org.apache.fop.apps.Fop fop
          The FOP instance.
protected  org.apache.fop.apps.FopFactory fopfactory
          Factory to create fop objects
protected  org.slf4j.Logger logger
           
protected  String mimetype
          The current mime-type.
protected  OutputStream out
           
protected  SourceResolver resolver
           
protected  SlingHttpServletResponse response
           
 
Fields inherited from class org.apache.cocoon.xml.sax.AbstractSAXProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler
 
Constructor Summary
FOPNGSerializer()
           
 
Method Summary
 void dispose()
          Dispose the serializer.
 void endDocument()
           
 void init(ProcessingContext context, ProcessingComponentConfiguration config)
          Initialize this component.
 Source resolve(String href, String base)
           
 void setFontConfig(FontConfig fontConfig)
           
 
Methods inherited from class org.apache.cocoon.xml.sax.AbstractSAXPipe
characters, comment, endCDATA, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.sax.AbstractSAXProducer
recycle, setContentHandler
 
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, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 

Field Detail

logger

protected final org.slf4j.Logger logger

resolver

protected SourceResolver resolver

fopfactory

protected org.apache.fop.apps.FopFactory fopfactory
Factory to create fop objects


fop

protected org.apache.fop.apps.Fop fop
The FOP instance.


mimetype

protected String mimetype
The current mime-type.


cachingOS

protected ByteArrayOutputStream cachingOS

out

protected OutputStream out

response

protected SlingHttpServletResponse response
Constructor Detail

FOPNGSerializer

public FOPNGSerializer()
Method Detail

init

public void init(ProcessingContext context,
                 ProcessingComponentConfiguration config)
          throws IOException
Description copied from interface: Serializer
Initialize this component.

Specified by:
init in interface Serializer
Parameters:
context - The invocation context.
config - The configuration for this component.
Throws:
IOException
See Also:
Serializer.init(org.apache.sling.rewriter.ProcessingContext, org.apache.sling.rewriter.ProcessingComponentConfiguration)

dispose

public void dispose()
Description copied from interface: Serializer
Dispose the serializer. This method is always invoked by the rewriter in order to allow the serializer to release any resources etc. After this method has been called the instance is considered unusable.

Specified by:
dispose in interface Serializer
See Also:
Transformer.dispose()

setFontConfig

public void setFontConfig(FontConfig fontConfig)

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class org.apache.cocoon.xml.sax.AbstractSAXPipe
Throws:
SAXException
See Also:
AbstractSAXPipe.endDocument()

resolve

public Source resolve(String href,
                      String base)
               throws TransformerException
Specified by:
resolve in interface URIResolver
Throws:
TransformerException


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.