fr.opensagres.xdocreport.document.odt.preprocessor
Class ODTStyleContentHandler

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<ODTBufferedDocument>
              extended by fr.opensagres.xdocreport.document.odt.preprocessor.ODTBufferedDocumentContentHandler
                  extended by fr.opensagres.xdocreport.document.odt.preprocessor.ODTStyleContentHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class ODTStyleContentHandler
extends ODTBufferedDocumentContentHandler

Preprocess styles.xml in order to add global styles (also manages mergeFields extension).

Author:
Tiry

Field Summary
protected  List<Integer> existingStyles
           
 
Fields inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
bufferedDocument, CDATA_TYPE
 
Constructor Summary
ODTStyleContentHandler(String entryName, FieldsMetadata fieldsMetadata, IDocumentFormatter formatter, Map<String,Object> sharedContext)
           
 
Method Summary
protected  ODTBufferedDocument createDocument()
           
 void doEndElement(String uri, String localName, String name)
           
 boolean doStartElement(String uri, String localName, String name, Attributes attributes)
           
protected  void generateHeaderStyle(int level)
           
protected  String getTableCellName()
           
protected  String getTableRowName()
           
protected  boolean needToProcessAutomaticStyles()
           
 
Methods inherited from class fr.opensagres.xdocreport.document.odt.preprocessor.ODTBufferedDocumentContentHandler
flushCharacters
 
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
 

Field Detail

existingStyles

protected List<Integer> existingStyles
Constructor Detail

ODTStyleContentHandler

public ODTStyleContentHandler(String entryName,
                              FieldsMetadata fieldsMetadata,
                              IDocumentFormatter formatter,
                              Map<String,Object> sharedContext)
Method Detail

needToProcessAutomaticStyles

protected boolean needToProcessAutomaticStyles()
Overrides:
needToProcessAutomaticStyles in class ODTBufferedDocumentContentHandler

doStartElement

public boolean doStartElement(String uri,
                              String localName,
                              String name,
                              Attributes attributes)
                       throws SAXException
Overrides:
doStartElement in class ODTBufferedDocumentContentHandler
Throws:
SAXException

doEndElement

public void doEndElement(String uri,
                         String localName,
                         String name)
                  throws SAXException
Overrides:
doEndElement in class ODTBufferedDocumentContentHandler
Throws:
SAXException

generateHeaderStyle

protected void generateHeaderStyle(int level)

getTableRowName

protected String getTableRowName()
Overrides:
getTableRowName in class ODTBufferedDocumentContentHandler

getTableCellName

protected String getTableCellName()
Overrides:
getTableCellName in class ODTBufferedDocumentContentHandler

createDocument

protected ODTBufferedDocument createDocument()
Overrides:
createDocument in class ODTBufferedDocumentContentHandler


Copyright © 2013. All rights reserved.