fr.opensagres.xdocreport.document.docx.preprocessor.sax
Class DocXBufferedDocumentContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler<Document>
          extended by fr.opensagres.xdocreport.document.preprocessor.sax.TransformedBufferedDocumentContentHandler<DocxBufferedDocument>
              extended by fr.opensagres.xdocreport.document.docx.preprocessor.sax.DocXBufferedDocumentContentHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Direct Known Subclasses:
DocxEndnotesDocumentContentHandler, DocxFootnotesDocumentContentHandler

public class DocXBufferedDocumentContentHandler
extends TransformedBufferedDocumentContentHandler<DocxBufferedDocument>

SAX content handler to generate lazy Freemarker/Velocity loop directive in the table row which contains a list fields.


Field Summary
 
Fields inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
bufferedDocument, CDATA_TYPE
 
Constructor Summary
protected DocXBufferedDocumentContentHandler(String entryName, FieldsMetadata fieldsMetadata, IDocumentFormatter formater, Map<String,Object> sharedContext)
           
 
Method Summary
protected  DocxBufferedDocument createDocument()
           
 void doEndElement(String uri, String localName, String name)
           
 boolean doStartElement(String uri, String localName, String name, Attributes attributes)
           
protected  void flushCharacters(String characters)
           
protected  String getTableCellName()
           
protected  String getTableRowName()
           
 
Methods inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.TransformedBufferedDocumentContentHandler
extractListDirectiveInfo, extractListDirectiveInfo, formatDirective, generateKey, getAfterRowToken, getAfterTableCellToken, getBeforeRowToken, getBeforeTableCellToken, getDirectives, getEndNoParse, getEntryName, getFieldAsTextStyling, getFieldsMetadata, getFormatter, getProcessRowResult, getSharedContext, getStartNoParse, getVariableIndex, hasSharedContext, isTable, isTableRow, processRowIfNeeded, processRowIfNeeded, processScriptAfter, processScriptBefore, registerBufferedElement
 
Methods inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
characters, endElement, findParentElementInfo, findParentElementInfo, getBufferedDocument, getCurrentElement, getElementIndex, mustEncodeCharachers, printEscaped, resetCharacters, startDocument, startElement, startPrefixMapping, toAttributesImpl
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocXBufferedDocumentContentHandler

protected DocXBufferedDocumentContentHandler(String entryName,
                                             FieldsMetadata fieldsMetadata,
                                             IDocumentFormatter formater,
                                             Map<String,Object> sharedContext)
Method Detail

createDocument

protected DocxBufferedDocument createDocument()
Specified by:
createDocument in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>

getTableRowName

protected String getTableRowName()
Specified by:
getTableRowName in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>

getTableCellName

protected String getTableCellName()
Specified by:
getTableCellName in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>

doStartElement

public boolean doStartElement(String uri,
                              String localName,
                              String name,
                              Attributes attributes)
                       throws SAXException
Overrides:
doStartElement in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>
Throws:
SAXException

doEndElement

public void doEndElement(String uri,
                         String localName,
                         String name)
                  throws SAXException
Overrides:
doEndElement in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>
Throws:
SAXException

flushCharacters

protected void flushCharacters(String characters)
Overrides:
flushCharacters in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>


Copyright © 2013. All rights reserved.