fr.opensagres.xdocreport.document.docx.preprocessor.sax.contenttypes
Class DocxContentTypesDocumentContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
          extended by fr.opensagres.xdocreport.document.docx.preprocessor.sax.contenttypes.DocxContentTypesDocumentContentHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class DocxContentTypesDocumentContentHandler
extends BufferedDocumentContentHandler

Parse content of the [Content_Types].xml to add missing image format. Ex :

 
 


Field Summary
protected  String entryName
           
protected  FieldsMetadata fieldsMetadata
           
protected  IDocumentFormatter formatter
           
 
Fields inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
bufferedDocument, CDATA_TYPE
 
Constructor Summary
DocxContentTypesDocumentContentHandler(String entryName, FieldsMetadata fieldsMetadata, IDocumentFormatter formatter, Map<String,Object> sharedContext)
           
 
Method Summary
 void doEndElement(String uri, String localName, String name)
           
 boolean doStartElement(String uri, String localName, String name, Attributes attributes)
           
 void startDocument()
           
 
Methods inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
characters, createDocument, endElement, findParentElementInfo, findParentElementInfo, flushCharacters, getBufferedDocument, getCurrentElement, getElementIndex, mustEncodeCharachers, printEscaped, resetCharacters, 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

entryName

protected final String entryName

formatter

protected final IDocumentFormatter formatter

fieldsMetadata

protected final FieldsMetadata fieldsMetadata
Constructor Detail

DocxContentTypesDocumentContentHandler

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

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class BufferedDocumentContentHandler
Throws:
SAXException

doStartElement

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

doEndElement

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


Copyright © 2013. All rights reserved.