Follow the links below to browse sample Javadoc for MJ classes and tools, including the MJ Runtime Library.

 

Package: com.arsi.mj.maprpt.lexer.ptree  previous next contents

Package com.arsi.mj.maprpt.lexer.ptree contains the following classes and interfaces.
Classes and Interfaces
ColumnMetadataParseNode
CommandParseNode
CommentParseNode
IParseTreeNode
LabelParseNode
MaprptParseTree Represents the parse tree of a Mapper report.
MaprptParseTreeFactory Factory class that creates parse tree for Mapper report.
TextContentParseNode
TupleParseNode

Class: ColumnMetadataParseNode   next package

public class com.arsi.mj.maprpt.lexer.ptree.ColumnMetadataParseNode
  extends java.lang.Object
  implements com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode
Methods
public final com.arsi.mj.maprpt.lexer.tokens.content.ColumnMetadataContent getContent()
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree getHostParseTree()
public java.util.List getLines()

Class: CommandParseNode   previous next package

public abstract class com.arsi.mj.maprpt.lexer.ptree.CommandParseNode
  extends java.lang.Object
  implements com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode
Fields
Label (as parse tree node) that hosts (i.e., contains) this node.
protected com.arsi.mj.maprpt.lexer.ptree.LabelParseNode hostLabel
At sign line that hosts this command (from which command tokens were parsed).
protected final com.arsi.mj.maprpt.parser.line.types.AtLine hostLine
Constructors
protected CommandParseNode(com.arsi.mj.maprpt.parser.line.types.AtLine aHostLine)
Methods
Get the highest command-info ID allocated in a set of jump-info objects.
Parameters:
aDefaultId - default command-info ID to use if set of objects is empty.
someJumpInfos - jump-info objects.
Returns:
highest allocated ID.
public static int getHighestAllocatedJumpId(int aDefaultId, java.util.List someJumpInfos)
Get the highest command-info ID allocated in a set of sub-expression-info objects.
Parameters:
aDefaultId - default command-info ID to use if set of objects is empty.
someSubexprInfos - sub-expression-info objects.
Returns:
highest allocated ID.
public static int getHighestAllocatedSubexprId(int aDefaultId, java.util.List someSubexprInfos)
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree getHostParseTree()
public java.util.List getLines()

Class: CommentParseNode   previous next package

public class com.arsi.mj.maprpt.lexer.ptree.CommentParseNode
  extends java.lang.Object
  implements com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode
Methods
public final com.arsi.mj.maprpt.lexer.tokens.cmd.PeriodToken getComment()
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree getHostParseTree()
public java.util.List getLines()

Interface: IParseTreeNode   previous next package

public interface com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode
Methods
Get parse tree that hosts (i.e., contains) this parse tree node.
Returns:
host parse tree.
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree getHostParseTree()
Get line(s) in Mapper report that are the source of this parse tree node.
Returns:
line(s) in Mapper report from which node was parsed.
public java.util.List getLines()

Class: LabelParseNode   previous next package

public class com.arsi.mj.maprpt.lexer.ptree.LabelParseNode
  extends java.lang.Object
  implements com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode
Fields
public static final java.lang.String DEFAULT_LABEL = "0"
Methods
Add command node to list of nodes under this label.
Parameters:
aNode - a command node.
public final void addNode(com.arsi.mj.maprpt.lexer.ptree.CommandParseNode aNode)
Add content node to list of nodes under this label.
Parameters:
aToken - a content token returned by a lexer that is transformed into the proper type of parse tree node.
Returns:
the parse tree node created to wrap the content token.
public final com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode addNode(com.arsi.mj.maprpt.lexer.tokens.IContentToken aToken)
Add comment node to list of nodes under this label.
Parameters:
aToken - a period token returned by a lexer that is transformed into a comment node (the period token represents termination of a Mapper at-sign line, including any comment text that follows period).
Returns:
the parse tree node created to wrap the period token.
public final com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode addNode(com.arsi.mj.maprpt.lexer.tokens.cmd.PeriodToken aToken)
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree getHostParseTree()
public final java.lang.String getLabel()
public final com.arsi.mj.maprpt.lexer.tokens.cmd.IntegerDigitsToken getLabelToken()
public java.util.List getLines()
public final java.util.List getNodes()
public final boolean isDefaultEntryPoint()

Class: MaprptParseTree   previous next package

Represents the parse tree of a Mapper report. The line-oriented, mixed-content Mapper "grammar" does not lend itself to a deep tree of terminal and non-terminal symbols typical of most computer languages. Instead, the parse tree is two levels deep, the first level consisting of label nodes, with the label nodes containing the second level of command and content nodes comprising the section of the Mapper report that follows the label. An initial, default label is introduced as the entry point of the parse tree if the Mapper report does not start with an explicit label.
Treat this class as "thread-hostile", since there is no synchronization around methods that change the state of the parse tree (it is intended an instance be created by a single thread).
public class com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree
  extends java.lang.Object
Inner Class ReportMetadata
Metadata about report gleaned from .DATE and report name lines (the first two lines in a Mapper report).
public static class com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree.ReportMetadata
  extends java.lang.Object
Get description of report that occurs in line following .DATE line.
public java.lang.String getDescription()
Get date and time report was last updated.
public final java.util.Date getLastUpdateDate()
Get name of user who last updated report (e.g., "MAPCOORD").
public final java.lang.String getLastUpdateUser()
Get date the report was originated or replaced.
public final java.util.Date getOriginDate()
Get report number and drawer from header (e.g., "11B").
public final java.lang.String getReportAndDrawer()
Parse .DATE line into report metadata.
Parameters:
strDateLine - the .DATE line (first line) of a Mapper report.
aFullDateUpdatedPattern - date-and-time pattern for parsing last-updated-date-time compatible with SimpleDateFormat.
aShortDateUpdatedPattern - time pattern for parsing last-updated-date-time compatible with SimpleDateFormat.
aDateCreatedPattern - pattern for parsing origin-date compatible with SimpleDateFormat.
Returns:
report metadata object built from parsed .DATE line.
public static com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree.ReportMetadata parseDateLine(java.lang.String strDateLine, java.lang.String aFullDateUpdatedPattern, java.lang.String aShortDateUpdatedPattern, java.lang.String aDateCreatedPattern)
Methods
Add new label to parse tree, which becomes the current label (content is added under the last label seen in the Mapper report).
Parameters:
aToken - digits token that identifies the Mapper label.
Returns:
newly add label parse tree node.
public final com.arsi.mj.maprpt.lexer.ptree.LabelParseNode addLabel(com.arsi.mj.maprpt.lexer.tokens.cmd.IntegerDigitsToken aToken)
Add command node to list of nodes under the current label.
Parameters:
aNode - a command node.
public final void addNode(com.arsi.mj.maprpt.lexer.ptree.CommandParseNode aNode)
Add content node to list of nodes under the current label.
Parameters:
aToken - a content token returned by a lexer that is transformed into the proper type of parse tree node.
Returns:
the parse tree node created to wrap the content token.
public final com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode addNode(com.arsi.mj.maprpt.lexer.tokens.IContentToken aToken)
Add comment node to list of nodes under the current label.
Parameters:
aToken - a period token returned by a lexer that is transformed into a comment node (the period token represents termination of a Mapper at-sign line, including any comment text that follows period).
Returns:
the parse tree node created to wrap the period token.
public final com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode addNode(com.arsi.mj.maprpt.lexer.tokens.cmd.PeriodToken aToken)
Get cabinet, drawer and report associated with the parse tree, if any.
Returns:
cabinet, drawer and report associated with parse tree as CDR coordinate, or NULL if none.
public final com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate getCdrCoordinate()
Get label nodes that comprise the first level of the parse tree.
Returns:
labels at top level of parse tree.
public final java.util.Deque getLabels()
Get the lexer used in building of this parse tree that ends up holding the token replacements (:DEFINEs) encountered during parse of lines in Mapper report.
Returns:
lexer used in building parse tree.
public final com.arsi.mj.maprpt.lexer.MaprptLexer getLexer()
Get metadata about report gleaned from .DATE and report name lines.
Returns:
report metadata, or NULL if .DATE and report name lines were not recognized during parse.
public final com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree.ReportMetadata getReportMetadata()
Set cabinet, drawer and report associated with the parse tree
Parameters:
aCdr - cabinet, drawer and report associated with parse tree as CDR coordinate.
public final void setCdrCoordinate(com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate aCdr)
Set metadata about report gleaned from .DATE and report name lines.
Parameters:
aMetadata - report metadata.
public final void setReportMetadata(com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree.ReportMetadata aMetadata)

Class: MaprptParseTreeFactory   previous next package

Factory class that creates parse tree for Mapper report.
Treat this class as "thread-hostile", since each instance is stateful and methods that alter state are not synchronized (it is intended a factory instance be created and used by a single thread).
public class com.arsi.mj.maprpt.lexer.ptree.MaprptParseTreeFactory
  extends java.lang.Object
Constructors
public MaprptParseTreeFactory()
Methods
Create parse tree for Mapper report undergoing lexical analysis.
Parameters:
aLexer - lexer for Mapper report.
anAppCtx - application context for looking up report names and other beans.
Throws:
MJTranslateException - if an error occurs during lexical analysis or build of parse tree.
Returns:
the newly created parse tree.
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree createParseTree(com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, org.springframework.context.ApplicationContext anAppCtx)
    throws com.arsi.mj.MJTranslateException

Class: TextContentParseNode   previous next package

public class com.arsi.mj.maprpt.lexer.ptree.TextContentParseNode
  extends java.lang.Object
  implements com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode
Methods
public final com.arsi.mj.maprpt.lexer.tokens.content.TextContent getContent()
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree getHostParseTree()
public java.util.List getLines()

Class: TupleParseNode   previous package

public class com.arsi.mj.maprpt.lexer.ptree.TupleParseNode
  extends java.lang.Object
  implements com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode
Methods
public final com.arsi.mj.maprpt.lexer.tokens.content.TupleContent getContent()
public com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree getHostParseTree()
public java.util.List getLines()