fr.opensagres.xdocreport.template.formatter
Class AbstractDocumentFormatter

java.lang.Object
  extended by fr.opensagres.xdocreport.template.formatter.AbstractDocumentFormatter
All Implemented Interfaces:
IDocumentFormatter

public abstract class AbstractDocumentFormatter
extends Object
implements IDocumentFormatter


Nested Class Summary
protected static class AbstractDocumentFormatter.DirectiveToParse
           
 
Field Summary
static String NO_ESCAPE
           
 
Fields inherited from interface fr.opensagres.xdocreport.template.formatter.IDocumentFormatter
IMAGE_REGISTRY_KEY
 
Constructor Summary
AbstractDocumentFormatter()
           
 
Method Summary
 String extractItemNameList(String content, String fieldName, boolean forceAsField)
           
 int extractListDirectiveInfo(String content, DirectivesStack directives)
           
protected  AbstractDocumentFormatter.DirectiveToParse getDirectiveToParse(int startLoopIndex, int endLoopIndex, int startIfIndex, int endIfIndex)
           
 String getEndDocumentDirective()
           
protected abstract  String getItemToken()
           
 int getMinIndex(int startLoopIndex, int endLoopIndex, int startIfIndex, int endIfIndex)
           
 String getStartDocumentDirective()
           
 String getStartLoopDirective(String itemNameList)
           
protected  String getVariableName(long variableIndex)
           
protected abstract  boolean isModelField(String content, String fieldName)
           
 void setEndDocumentDirective(String endDocumentDirective)
           
 void setStartDocumentDirective(String startDocumentDirective)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.opensagres.xdocreport.template.formatter.IDocumentFormatter
containsInterpolation, extractListDirectiveInfo, extractModelTokenPrefix, formatAsCallTextStyling, formatAsFieldItemList, formatAsSimpleField, formatAsTextStylingField, getEndIfDirective, getEndLoopDirective, getFunctionDirective, getImageDirective, getImageHeightDirective, getImageWidthDirective, getIndexOfScript, getLoopCountDirective, getStartIfDirective, getStartLoopDirective, hasDirective
 

Field Detail

NO_ESCAPE

public static final String NO_ESCAPE
See Also:
Constant Field Values
Constructor Detail

AbstractDocumentFormatter

public AbstractDocumentFormatter()
Method Detail

extractItemNameList

public String extractItemNameList(String content,
                                  String fieldName,
                                  boolean forceAsField)
Specified by:
extractItemNameList in interface IDocumentFormatter

getStartDocumentDirective

public String getStartDocumentDirective()
Specified by:
getStartDocumentDirective in interface IDocumentFormatter

setStartDocumentDirective

public void setStartDocumentDirective(String startDocumentDirective)

getEndDocumentDirective

public String getEndDocumentDirective()
Specified by:
getEndDocumentDirective in interface IDocumentFormatter

setEndDocumentDirective

public void setEndDocumentDirective(String endDocumentDirective)

getStartLoopDirective

public String getStartLoopDirective(String itemNameList)
Specified by:
getStartLoopDirective in interface IDocumentFormatter

extractListDirectiveInfo

public int extractListDirectiveInfo(String content,
                                    DirectivesStack directives)
Specified by:
extractListDirectiveInfo in interface IDocumentFormatter

getItemToken

protected abstract String getItemToken()

isModelField

protected abstract boolean isModelField(String content,
                                        String fieldName)

getDirectiveToParse

protected AbstractDocumentFormatter.DirectiveToParse getDirectiveToParse(int startLoopIndex,
                                                                         int endLoopIndex,
                                                                         int startIfIndex,
                                                                         int endIfIndex)

getMinIndex

public int getMinIndex(int startLoopIndex,
                       int endLoopIndex,
                       int startIfIndex,
                       int endIfIndex)

getVariableName

protected String getVariableName(long variableIndex)


Copyright © 2012. All Rights Reserved.