fr.opensagres.xdocreport.document.docx.preprocessor
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.DocXBufferedDocumentContentHandler
All Implemented Interfaces:
EncodingConstants, DocXConstants, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class DocXBufferedDocumentContentHandler
extends TransformedBufferedDocumentContentHandler<DocxBufferedDocument>
implements DocXConstants

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
 
Fields inherited from interface fr.opensagres.xdocreport.document.docx.DocXConstants
A_NS, BLIP_ELT, BOOKMARK_END_ELT, BOOKMARK_START_ELT, CONTENT_TYPES_XML, CONTENT_TYPES_XML_ENTRY, DESCRIPTION_DISCOVERY, DOCX_EXTENSION, EMBED_ATTR, FLDCHAR_ELT, FLDCHARTYPE_ATTR, FLDSIMPLE_ELT, HYPERLINK_ELT, HYPERLINKS_SHARED_CONTEXT, ID_ATTR, ID_DISCOVERY, INSTR_ATTR, INSTR_TEXT_ELT, MIME_MAPPING, NAME_ATTR, P_ELT, R_ELT, R_NS, RELATIONSHIP_ELT, RELATIONSHIP_ID_ATTR, RELATIONSHIP_TARGET_ATTR, RELATIONSHIP_TARGET_MODE_ATTR, RELATIONSHIP_TYPE_ATTR, RELATIONSHIPS_ELT, RELATIONSHIPS_HYPERLINK_NS, RELATIONSHIPS_IMAGE_NS, T_ELT, TARGET_MODE_EXTERNAL, TBL_ELT, TR_ELT, W_NS, WORD_DOCUMENT_XML_ENTRY, WORD_FOOTER_XML_ENTRY, WORD_HEADER_XML_ENTRY, WORD_RELS_DOCUMENTXMLRELS_XML_ENTRY, WORD_STYLES_XML_ENTRY, WORDPROCESSINGML_DOCUMENT
 
Fields inherited from interface fr.opensagres.xdocreport.core.EncodingConstants
APOS, GT, LT, UTF_8
 
Constructor Summary
protected DocXBufferedDocumentContentHandler(FieldsMetadata fieldsMetadata, IDocumentFormatter formater, java.util.Map<java.lang.String,java.lang.Object> context)
           
 
Method Summary
protected  DocxBufferedDocument createDocument()
           
 void doEndElement(java.lang.String uri, java.lang.String localName, java.lang.String name)
           
 boolean doStartElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attributes)
           
protected  void flushCharacters(java.lang.String characters)
           
protected  java.lang.String getTableCellName()
           
protected  java.lang.String getTableRowName()
           
 
Methods inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.TransformedBufferedDocumentContentHandler
endDocument, extractListDirectiveInfo, extractListDirectiveInfo, getAfterRowToken, getAfterTableCellToken, getBeforeRowToken, getBeforeTableCellToken, getDirectives, getFieldsMetadata, getFormatter, getProcessRowResult, getSharedContext, hasSharedContext, isTable, isTableRow, processRowIfNeeded, processRowIfNeeded, processScriptAfter, processScriptBefore, startDocument
 
Methods inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
characters, endElement, findParentElementInfo, findParentElementInfo, getBufferedDocument, getCurrentElement, resetCharacters, startElement, startPrefixMapping, toAttributesImpl
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
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(FieldsMetadata fieldsMetadata,
                                             IDocumentFormatter formater,
                                             java.util.Map<java.lang.String,java.lang.Object> context)
Method Detail

createDocument

protected DocxBufferedDocument createDocument()
Overrides:
createDocument in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>

getTableRowName

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

getTableCellName

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

doStartElement

public boolean doStartElement(java.lang.String uri,
                              java.lang.String localName,
                              java.lang.String name,
                              org.xml.sax.Attributes attributes)
                       throws org.xml.sax.SAXException
Overrides:
doStartElement in class BufferedDocumentContentHandler<DocxBufferedDocument>
Throws:
org.xml.sax.SAXException

doEndElement

public void doEndElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String name)
                  throws org.xml.sax.SAXException
Overrides:
doEndElement in class TransformedBufferedDocumentContentHandler<DocxBufferedDocument>
Throws:
org.xml.sax.SAXException

flushCharacters

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


Copyright © 2011. All Rights Reserved.