SheetNameMetadataParser
public class MetadataParser
extends java.lang.Object
MetadataParser
parses metadata at the end of cell text.Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
VAR_NAME_COLLAPSE |
Metadata variable name specifying whether any Excel grouping created
should be collapsed, defaulting to
false . |
static java.lang.String |
VAR_NAME_COPY_RIGHT |
Metadata variable name for copying right instead of down.
|
static java.lang.String |
VAR_NAME_EXTRA_ROWS |
Metadata variable name for extra rows in the Block.
|
static java.lang.String |
VAR_NAME_FIXED |
Metadata variable name for not shifting other content out of the way of a
looping block.
|
static java.lang.String |
VAR_NAME_GROUP_DIR |
Metadata variable name specifying to create an Excel grouping for rows,
columns, or no grouping.
|
static java.lang.String |
VAR_NAME_INDEXVAR |
Metadata variable name specifying the name of the zero-based "looping"
variable.
|
static java.lang.String |
VAR_NAME_LEFT |
Metadata variable name for additional columns to the left in the Block.
|
static java.lang.String |
VAR_NAME_LIMIT |
Metadata variable name specifying a limit to the number of iterations
processed.
|
static java.lang.String |
VAR_NAME_ON_LOOP_PROCESSED |
Metadata variable name specifying a
TagLoopListener to
listen for TagLoopEvents . |
static java.lang.String |
VAR_NAME_ON_PROCESSED |
Metadata variable name specifying a
TagListener to listen
for TagEvents . |
static java.lang.String |
VAR_NAME_PAST_END_ACTION |
Metadata variable name specifying the "past end action" to take whenever
a
Collection is exhausted before the end of iteration. |
static java.lang.String |
VAR_NAME_REPLACE_VALUE |
Metadata variable name specifying the value with which to replace any
expression that refers to a
Collection that is exhausted
before the end of iteration. |
static java.lang.String |
VAR_NAME_RIGHT |
Metadata variable name for additional columns to the right in the Block.
|
static java.lang.String |
VAR_NAME_VAR_STATUS |
Metadata variable name specifying the name of the
LoopTagStatus variable. |
Constructor | Description |
---|---|
MetadataParser() |
Create a
MetadataParser . |
MetadataParser(java.lang.String metadataText) |
Create a
MetadataParser object that will parse the given
metadata text. |
Modifier and Type | Method | Description |
---|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
getAbbreviations() |
Returns a
Map of abbreviations. |
java.lang.String |
getCollapsingGroup() |
Returns the "collapse" lexeme.
|
java.lang.String |
getColsLeft() |
Returns the "columns left" lexeme.
|
java.lang.String |
getColsRight() |
Returns the "columns right" lexeme.
|
java.lang.String |
getCopyingRight() |
Returns the "copy right" lexeme.
|
java.lang.String |
getExtraRows() |
Returns the "extra rows" lexeme.
|
java.lang.String |
getFixed() |
Returns the "fixed" lexeme.
|
java.lang.String |
getGroupDir() |
Returns the "group dir" lexeme.
|
java.lang.String |
getIndexVarName() |
Returns the "looping" variable name.
|
java.lang.String |
getLimit() |
Returns the "limit" lexeme.
|
java.lang.String |
getPastEndAction() |
Returns the "past end action" lexeme.
|
java.lang.String |
getReplacementValue() |
Returns the replacement value, which is used to replace expressions that
have been exhausted prior to the end of iteration, if the past end action
is to replace expressions.
|
java.lang.String |
getTagListener() |
Returns the "tag listener" lexeme.
|
java.lang.String |
getTagLoopListener() |
Returns the "tag loop listener" lexeme.
|
java.lang.String |
getVarStatusName() |
Returns the "varStatus" lexeme.
|
boolean |
isDefiningCols() |
Returns whether column definitions are present.
|
protected boolean |
isRestricted(java.lang.String metadataKey) |
Determines whether the given metadata key is restricted -- not
allowed in this context.
|
void |
parse() |
Parses the metadata text.
|
void |
setCell(org.apache.poi.ss.usermodel.Cell cell) |
Sets the
Cell that contains the formula to be parsed. |
void |
setMetadataText(java.lang.String metadataText) |
Sets the metadata text to the given metadata text and resets the parser.
|
public static final java.lang.String VAR_NAME_EXTRA_ROWS
public static final java.lang.String VAR_NAME_LEFT
public static final java.lang.String VAR_NAME_RIGHT
public static final java.lang.String VAR_NAME_COPY_RIGHT
public static final java.lang.String VAR_NAME_FIXED
public static final java.lang.String VAR_NAME_PAST_END_ACTION
Collection
is exhausted before the end of iteration.public static final java.lang.String VAR_NAME_REPLACE_VALUE
Collection
that is exhausted
before the end of iteration. This defaults to an empty string
""
. This is only relevant if the past end action is to
replace expressions.public static final java.lang.String VAR_NAME_GROUP_DIR
public static final java.lang.String VAR_NAME_COLLAPSE
false
.public static final java.lang.String VAR_NAME_ON_LOOP_PROCESSED
TagLoopListener
to
listen for TagLoopEvents
.public static final java.lang.String VAR_NAME_ON_PROCESSED
TagListener
to listen
for TagEvents
.public static final java.lang.String VAR_NAME_INDEXVAR
public static final java.lang.String VAR_NAME_LIMIT
public static final java.lang.String VAR_NAME_VAR_STATUS
LoopTagStatus
variable.public MetadataParser()
MetadataParser
.public MetadataParser(java.lang.String metadataText)
MetadataParser
object that will parse the given
metadata text.metadataText
- The text of the metadata.public void setCell(org.apache.poi.ss.usermodel.Cell cell)
Cell
that contains the formula to be parsed.cell
- The Cell
.public void setMetadataText(java.lang.String metadataText)
metadataText
- The new metadata text.public void parse()
protected boolean isRestricted(java.lang.String metadataKey)
false
.metadataKey
- The metadata key.true
if it's restricted, else false
.protected java.util.Map<java.lang.String,java.lang.String> getAbbreviations()
Map
of abbreviations. The map's keys are the
abbreviations, and the values are the metadata keys.Map
of abbreviations, null
means no
abbreviations are permitted.public java.lang.String getExtraRows()
public java.lang.String getColsLeft()
public java.lang.String getColsRight()
public boolean isDefiningCols()
public java.lang.String getCopyingRight()
public java.lang.String getFixed()
public java.lang.String getPastEndAction()
public java.lang.String getReplacementValue()
""
.public java.lang.String getGroupDir()
public java.lang.String getCollapsingGroup()
public java.lang.String getTagLoopListener()
public java.lang.String getTagListener()
public java.lang.String getIndexVarName()
public java.lang.String getLimit()
public java.lang.String getVarStatusName()
Copyright © 2012–2018 Jett Team. All rights reserved.