net.sf.jett.parser
Class MetadataParser

java.lang.Object
  extended by net.sf.jett.parser.MetadataParser

public class MetadataParser
extends java.lang.Object

A MetadataParser parses metadata at the end of cell text.

Author:
Randy Gettman

Field Summary
static java.lang.String BEGIN_METADATA
          Determines the beginning of metadata text.
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_RIGHT
          Metadata variable name for additional columns to the right in the Block.
 
Constructor Summary
MetadataParser()
          Create a MetadataParser.
MetadataParser(java.lang.String metadataText)
          Create a MetadataParser object that will parse the given metadata text.
 
Method Summary
 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 getTagListener()
          Returns the "tag listener" lexeme.
 java.lang.String getTagLoopListener()
          Returns the "tag loop listener" lexeme.
 boolean isDefiningCols()
          Returns whether column definitions are present.
 void parse()
          Parses the metadata text.
 void setMetadataText(java.lang.String metadataText)
          Sets the metadata text to the given metadata text and resets the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VAR_NAME_EXTRA_ROWS

public static final java.lang.String VAR_NAME_EXTRA_ROWS
Metadata variable name for extra rows in the Block.

See Also:
Constant Field Values

VAR_NAME_LEFT

public static final java.lang.String VAR_NAME_LEFT
Metadata variable name for additional columns to the left in the Block.

See Also:
Constant Field Values

VAR_NAME_RIGHT

public static final java.lang.String VAR_NAME_RIGHT
Metadata variable name for additional columns to the right in the Block.

See Also:
Constant Field Values

VAR_NAME_COPY_RIGHT

public static final java.lang.String VAR_NAME_COPY_RIGHT
Metadata variable name for copying right instead of down. This is ignored if neither "left" nor "right" is specified.

See Also:
Constant Field Values

VAR_NAME_FIXED

public static final java.lang.String VAR_NAME_FIXED
Metadata variable name for not shifting other content out of the way of a looping block. This turns on the implicit version of the "fixed" attribute of looping tags.

See Also:
Constant Field Values

VAR_NAME_PAST_END_ACTION

public static final 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.

Since:
0.2.0
See Also:
Constant Field Values

VAR_NAME_GROUP_DIR

public static final java.lang.String VAR_NAME_GROUP_DIR
Metadata variable name specifying to create an Excel grouping for rows, columns, or no grouping.

Since:
0.2.0
See Also:
Constant Field Values

VAR_NAME_COLLAPSE

public static final java.lang.String VAR_NAME_COLLAPSE
Metadata variable name specifying whether any Excel grouping created should be collapsed, defaulting to false.

Since:
0.2.0
See Also:
Constant Field Values

VAR_NAME_ON_LOOP_PROCESSED

public static final java.lang.String VAR_NAME_ON_LOOP_PROCESSED
Metadata variable name specifying a TagLoopListener to listen for TagLoopEvents.

Since:
0.3.0
See Also:
Constant Field Values

VAR_NAME_ON_PROCESSED

public static final java.lang.String VAR_NAME_ON_PROCESSED
Metadata variable name specifying a TagListener to listen for TagEvents.

Since:
0.3.0
See Also:
Constant Field Values

VAR_NAME_INDEXVAR

public static final java.lang.String VAR_NAME_INDEXVAR
Metadata variable name specifying the name of the zero-based "looping" variable.

Since:
0.3.0
See Also:
Constant Field Values

VAR_NAME_LIMIT

public static final java.lang.String VAR_NAME_LIMIT
Metadata variable name specifying a limit to the number of iterations processed.

Since:
0.3.0
See Also:
Constant Field Values

BEGIN_METADATA

public static final java.lang.String BEGIN_METADATA
Determines the beginning of metadata text.

See Also:
Constant Field Values
Constructor Detail

MetadataParser

public MetadataParser()
Create a MetadataParser.


MetadataParser

public MetadataParser(java.lang.String metadataText)
Create a MetadataParser object that will parse the given metadata text.

Parameters:
metadataText - The text of the metadata.
Method Detail

setMetadataText

public void setMetadataText(java.lang.String metadataText)
Sets the metadata text to the given metadata text and resets the parser.

Parameters:
metadataText - The new metadata text.

parse

public void parse()
Parses the metadata text.


getExtraRows

public java.lang.String getExtraRows()
Returns the "extra rows" lexeme.

Returns:
The "extra rows" lexeme.

getColsLeft

public java.lang.String getColsLeft()
Returns the "columns left" lexeme.

Returns:
The "columns left" lexeme.

getColsRight

public java.lang.String getColsRight()
Returns the "columns right" lexeme.

Returns:
The "columns right" lexeme.

isDefiningCols

public boolean isDefiningCols()
Returns whether column definitions are present.

Returns:
Whether column definitions are present.

getCopyingRight

public java.lang.String getCopyingRight()
Returns the "copy right" lexeme.

Returns:
The "copy right" lexeme.

getFixed

public java.lang.String getFixed()
Returns the "fixed" lexeme.

Returns:
The "fixed" lexeme.

getPastEndAction

public java.lang.String getPastEndAction()
Returns the "past end action" lexeme.

Returns:
The "past end action" lexeme.
Since:
0.2.0

getGroupDir

public java.lang.String getGroupDir()
Returns the "group dir" lexeme.

Returns:
The "group dir" lexeme.
Since:
0.2.0

getCollapsingGroup

public java.lang.String getCollapsingGroup()
Returns the "collapse" lexeme.

Returns:
The "collapse" lexeme.
Since:
0.2.0

getTagLoopListener

public java.lang.String getTagLoopListener()
Returns the "tag loop listener" lexeme.

Returns:
The "tag loop listener" lexeme.
Since:
0.3.0

getTagListener

public java.lang.String getTagListener()
Returns the "tag listener" lexeme.

Returns:
The "tag listener" lexeme.
Since:
0.3.0

getIndexVarName

public java.lang.String getIndexVarName()
Returns the "looping" variable name.

Returns:
The "looping" variable name.
Since:
0.3.0

getLimit

public java.lang.String getLimit()
Returns the "limit" lexeme.

Returns:
The "limit" lexeme.
Since:
0.3.0


Copyright © 2012-2013 Jett Team. All Rights Reserved.