public abstract class AbstractRTFDocumentTransformer extends Object implements IRTFDocumentTransformer, IRTFFieldNameTransform
| Modifier and Type | Field and Description |
|---|---|
protected Map |
bookmarkBkmEndMap |
protected Map |
bookmarkBkmIfMap |
protected Map |
bookmarkElseMap |
protected Map |
bookmarkEndIfMap |
protected Map |
bookmarkEndMap |
protected Map |
bookmarkIfMap
Map of IF/ELSE/ENDIF Bookmark
|
protected Map |
bookmarkStartMap
Map of START/END LOOP Bookmark
|
protected int |
groupByPerPageBreak
This value allow to group by content when ther eis PageBreak in order to
group by content.
|
protected RTFBookmark |
lastEndLoopRTFBookmark |
protected Map |
pageBeforeEndBookmarkMap |
protected List |
rowMustNotGenerateForeachList
When Row is after START_LOOP, Row must not generate #foreach This list
contains row which not generate #foreach
|
protected static int |
RTF_ELEMENT_ANNOTATION |
protected static int |
RTF_ELEMENT_BOOKMARK |
protected static int |
RTF_ELEMENT_DOCUMENT |
protected static int |
RTF_ELEMENT_FIELD |
protected static int |
RTF_ELEMENT_PAGE |
protected static int |
RTF_ELEMENT_ROW |
protected static int |
RTF_ELEMENT_STRINGBUFFER |
protected static int |
RTF_ELEMENT_USERPROPERTY |
protected Map |
rtfTransformMap |
protected Vector |
startBookmarksList
This list contains start LOOP Bookmark
|
protected Map |
startBookmarksNotEnded |
| Constructor and Description |
|---|
AbstractRTFDocumentTransformer() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
formatSubFieldName(String fieldName) |
RTFContextFields |
getContextFields(IContext context,
boolean hasCircularReferences) |
protected abstract String |
getForeach(String fieldName,
String fieldNameWithListInfo) |
int |
getGroupByPerPageBreak() |
protected String |
getItemListName(String fieldName,
String fieldNameWithListInfo) |
protected abstract String |
getMacroElse() |
protected abstract String |
getMacroEndForEach()
Return string for end for each
|
protected abstract String |
getMacroEndIf() |
protected abstract String |
getMacroIf(String condition) |
protected abstract String |
getMacroPageBreak(String itemNameList,
String rtfPageBreakContent) |
protected abstract String |
getMacroPageBreak(String itemNameList,
String rtfPageBreakContent,
int groupByPerPageBreak) |
protected abstract String |
getObjectValueList(String fieldName,
boolean withGetter) |
protected abstract String |
getObjectValueList(String fieldName,
String fieldNameWithListInfo,
boolean withGetter) |
String |
getTransformedFieldName(boolean fieldIsList,
String fieldName) |
TransformerConfig |
getTransformerConfig() |
boolean |
isBookmarkElse(String bookmarkName) |
boolean |
isBookmarkEndIf(String bookmarkName) |
boolean |
isBookmarkEndLoop(String bookmarkName) |
boolean |
isBookmarkIf(String bookmarkName) |
boolean |
isBookmarkStartLoop(String bookmarkName) |
boolean |
isCircularReferences() |
void |
setCircularReferences(boolean circularReferences) |
void |
setGroupByPerPageBreak(int groupByPerPageBreak) |
void |
setTransformerConfig(TransformerConfig transformerConfig) |
RTFDocument |
transform(RTFDocument document,
IContext context) |
RTFDocument |
transform(RTFDocument document,
RTFContextFields contextFields) |
protected void |
transform(RTFElement parentElement,
Vector elementList,
Map contextFieldsMap) |
protected static final int RTF_ELEMENT_DOCUMENT
protected static final int RTF_ELEMENT_STRINGBUFFER
protected static final int RTF_ELEMENT_ROW
protected static final int RTF_ELEMENT_FIELD
protected static final int RTF_ELEMENT_BOOKMARK
protected static final int RTF_ELEMENT_PAGE
protected static final int RTF_ELEMENT_USERPROPERTY
protected static final int RTF_ELEMENT_ANNOTATION
protected int groupByPerPageBreak
protected List rowMustNotGenerateForeachList
protected Map bookmarkStartMap
protected Map bookmarkEndMap
protected Map bookmarkBkmEndMap
protected Map pageBeforeEndBookmarkMap
protected Map startBookmarksNotEnded
protected RTFBookmark lastEndLoopRTFBookmark
protected Vector startBookmarksList
protected Map bookmarkIfMap
protected Map bookmarkEndIfMap
protected Map bookmarkElseMap
protected Map bookmarkBkmIfMap
protected Map rtfTransformMap
public TransformerConfig getTransformerConfig()
public void setTransformerConfig(TransformerConfig transformerConfig)
setTransformerConfig in interface IRTFDocumentTransformerpublic RTFDocument transform(RTFDocument document, IContext context) throws IOException
transform in interface IRTFDocumentTransformerIOExceptionpublic RTFDocument transform(RTFDocument document, RTFContextFields contextFields) throws IOException
transform in interface IRTFDocumentTransformerIOExceptionprotected void transform(RTFElement parentElement, Vector elementList, Map contextFieldsMap) throws IOException
IOExceptionpublic boolean isBookmarkStartLoop(String bookmarkName)
public boolean isBookmarkEndLoop(String bookmarkName)
public boolean isBookmarkIf(String bookmarkName)
public boolean isBookmarkEndIf(String bookmarkName)
public boolean isBookmarkElse(String bookmarkName)
public RTFContextFields getContextFields(IContext context, boolean hasCircularReferences)
public void setGroupByPerPageBreak(int groupByPerPageBreak)
setGroupByPerPageBreak in interface IRTFDocumentTransformerprotected abstract String getMacroEndForEach()
protected abstract String getObjectValueList(String fieldName, String fieldNameWithListInfo, boolean withGetter)
protected abstract String getObjectValueList(String fieldName, boolean withGetter)
public String getTransformedFieldName(boolean fieldIsList, String fieldName)
getTransformedFieldName in interface IRTFFieldNameTransformprotected abstract String getMacroPageBreak(String itemNameList, String rtfPageBreakContent)
protected abstract String getMacroPageBreak(String itemNameList, String rtfPageBreakContent, int groupByPerPageBreak)
protected abstract String getMacroEndIf()
protected abstract String getMacroElse()
public boolean isCircularReferences()
isCircularReferences in interface IRTFDocumentTransformerpublic void setCircularReferences(boolean circularReferences)
setCircularReferences in interface IRTFDocumentTransformerpublic int getGroupByPerPageBreak()
getGroupByPerPageBreak in interface IRTFDocumentTransformerCopyright © 2020 Mice S.r.l. All rights reserved.