Class TransformedBufferedDocumentContentHandler<Document extends TransformedBufferedDocument>
java.lang.Object
org.xml.sax.helpers.DefaultHandler
fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler<Document>
fr.opensagres.xdocreport.document.preprocessor.sax.TransformedBufferedDocumentContentHandler<Document>
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public abstract class TransformedBufferedDocumentContentHandler<Document extends TransformedBufferedDocument>
extends BufferedDocumentContentHandler<Document>
Document transformed to manage lazy loop for row table and dynamic image.
-
Field Summary
Fields inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
bufferedDocument, CDATA_TYPE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransformedBufferedDocumentContentHandler(String entryName, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formater, Map<String, Object> sharedContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract DocumentvoiddoEndElement(String uri, String localName, String name) booleandoStartElement(String uri, String localName, String name, Attributes attributes) intextractListDirectiveInfo(String characters) intextractListDirectiveInfo(String characters, boolean dontRemoveListDirectiveInfo) protected voidflushCharacters(String characters) formatDirective(String directive) static StringgenerateKey(long variableIndex) protected StringReturns the after row token.protected StringReturns the after row token.protected StringReturns the after table token.protected StringReturns the before row token.protected StringReturns the before row token.protected StringReturns the before table token.fr.opensagres.xdocreport.template.formatter.DirectivesStackfr.opensagres.xdocreport.template.formatter.FieldMetadatagetFieldAsTextStyling(String content) fr.opensagres.xdocreport.template.formatter.FieldsMetadatafr.opensagres.xdocreport.template.formatter.IDocumentFormattergetProcessRowResult(String content, boolean forceAsField) If a row parsing, replace fields name with well script to manage lazy loop for table row.protected abstract Stringprotected abstract Stringprotected abstract Stringlongbooleanprotected booleanReturns true if current element is a table and false otherwise.protected booleanisTableRow(String uri, String localName, String name) Returns true if current element is a table row and false otherwise.processRowIfNeeded(String content) processRowIfNeeded(String content, boolean forceAsField) If a row parsing, replace fields name with well script to manage lazy loop for table row.booleanprocessScriptAfter(String fieldName) booleanprocessScriptBefore(String fieldName) registerBufferedElement(long variableIndex, BufferedElement element) Methods inherited from class fr.opensagres.xdocreport.document.preprocessor.sax.BufferedDocumentContentHandler
characters, endElement, findParentElementInfo, findParentElementInfo, getBufferedDocument, getCurrentElement, getElementIndex, mustEncodeCharachers, printEscaped, resetCharacters, startDocument, startElement, startPrefixMapping, toAttributesImplMethods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
TransformedBufferedDocumentContentHandler
-
-
Method Details
-
doStartElement
public boolean doStartElement(String uri, String localName, String name, Attributes attributes) throws SAXException - Overrides:
doStartElementin classBufferedDocumentContentHandler<Document extends TransformedBufferedDocument>- Throws:
SAXException
-
flushCharacters
- Overrides:
flushCharactersin classBufferedDocumentContentHandler<Document extends TransformedBufferedDocument>
-
processRowIfNeeded
-
processRowIfNeeded
If a row parsing, replace fields name with well script to manage lazy loop for table row.- Parameters:
content-- Returns:
-
getProcessRowResult
If a row parsing, replace fields name with well script to manage lazy loop for table row.- Parameters:
content-- Returns:
-
getFieldsMetadata
public fr.opensagres.xdocreport.template.formatter.FieldsMetadata getFieldsMetadata() -
getFormatter
public fr.opensagres.xdocreport.template.formatter.IDocumentFormatter getFormatter() -
getDirectives
public fr.opensagres.xdocreport.template.formatter.DirectivesStack getDirectives() -
getBeforeTableToken
Returns the before table token.- Returns:
-
getAfterTableToken
Returns the after table token.- Returns:
-
getBeforeRowToken
Returns the before row token.- Returns:
-
getAfterRowToken
Returns the after row token.- Returns:
-
getBeforeTableCellToken
Returns the before row token.- Returns:
-
getAfterTableCellToken
Returns the after row token.- Returns:
-
extractListDirectiveInfo
-
extractListDirectiveInfo
-
isTable
Returns true if current element is a table and false otherwise.- Parameters:
uri-localName-name-- Returns:
-
getTableTableName
-
getTableRowName
-
getTableCellName
-
isTableRow
Returns true if current element is a table row and false otherwise.- Parameters:
uri-localName-name-- Returns:
-
processScriptBefore
-
processScriptAfter
-
doEndElement
- Overrides:
doEndElementin classBufferedDocumentContentHandler<Document extends TransformedBufferedDocument>- Throws:
SAXException
-
getFieldAsTextStyling
public fr.opensagres.xdocreport.template.formatter.FieldMetadata getFieldAsTextStyling(String content) -
registerBufferedElement
-
generateKey
-
getVariableIndex
public long getVariableIndex() -
getEntryName
-
formatDirective
-
getStartNoParse
-
getEndNoParse
-
createDocument
- Overrides:
createDocumentin classBufferedDocumentContentHandler<Document extends TransformedBufferedDocument>
-