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

 

Package: com.arsi.mj.maprpt.parser.column  previous next contents

Package com.arsi.mj.maprpt.parser.column contains the following classes and interfaces.
Classes and Interfaces
MaprptColumnDef Captures the definition of a column in a Mapper report that contains columnar data, e.g., asterisk lines with column headers and presumably some tab lines that contain records with columns of data.
MaprptColumnMetadata Stores meta-data about the columns found in a Mapper report, and provides methods for parsing this meta-data from a Mapper report.

Class: MaprptColumnDef   next package

Captures the definition of a column in a Mapper report that contains columnar data, e.g., asterisk lines with column headers and presumably some tab lines that contain records with columns of data.
Data type rules that match values of the column can be stored with this column definition but must be established independently of this class.
Treat this class as "thread-safe", since instances are immutable once created.
public class com.arsi.mj.maprpt.parser.column.MaprptColumnDef
  extends java.lang.Object
Constructors
public MaprptColumnDef(java.lang.String aParsedName, java.lang.String aCanonicalName, int aPosition, int aLength)
Methods
Add a data type rule that has been matched for data values in this column. The rule is added only if it is different from other rules that have already been matched to value(s) in this column.
Parameters:
anAppCtx - application context for looking up data type as JavaBean.
aRule - the data type rule that has been matched to column value(s).
public final void addMatchedTypeRule(org.springframework.context.ApplicationContext anAppCtx, com.arsi.mj.datatype.parse.IDataTypeParseRule aRule)
Get canonical Mapper column name (i.e., parsed column name stripped of all blanks).
Returns:
canonical column name.
public final java.lang.String getCanonicalName()
Get the unique data types that fit the values seen for this column.
Parameters:
anAppCtx - application context for looking up data type as JavaBean.
Returns:
set of data types.
public final java.util.Set getDataTypes(org.springframework.context.ApplicationContext anAppCtx)
Get length of column as determined by column mask (equal signs).
Returns:
length of column.
public final int getLength()
Get the data type rules that have been matched for data values in this column, if any. A single rule, or multiple rules for the same data type signify the column contains homogeneous values, while multiple rules for the different data types indicates the column contains heterogeneous values.
Returns:
data type rules that have been matched for data values in this column, or an empty list if no attempt has made to assign a type to the column.
public final java.util.List getMatchedTypeRules()
Get original, parsed name of column without transformation.
Returns:
original, parsed column name.
public final java.lang.String getParsedName()
Get position of column in full source line that includes first character, starting from 0 (0 is first character in line).
Returns:
position of column in source line.
public final int getPosition()

Class: MaprptColumnMetadata   previous package

Stores meta-data about the columns found in a Mapper report, and provides methods for parsing this meta-data from a Mapper report.
Treat this class as "thread-hostile" since it is intended to be used by a single thread at a time.
public class com.arsi.mj.maprpt.parser.column.MaprptColumnMetadata
  extends java.lang.Object
Methods
public final java.util.List getColumnDefs()
Get asterisk lines that comprise column headings.
Returns:
asterisk lines that comprise column headings; although Mapper only respects the first two lines containing column names if more than two such lines are present, all of the column heading asterisk lines are included.
public final java.util.List getCompositeLines()
public final boolean hasTrailingLines()
Based on column definitions stored by this meta-data instance, use position and length of columns to parse a Mapper report line assumed to contain tabular data into column values.
Parameters:
aMaprptLine - a Mapper report line assumed to contain tabular data (e.g., a tab line).
Returns:
list of column values.
public java.util.List parseColumnValues(com.arsi.mj.maprpt.parser.line.types.MaprptLine aMaprptLine)
Parse the next occurrence of column heading lines (if any) from a list of Mapper report lines. To parse all occurrences of column heading lines in a Mapper report, this method should be called iteratively until no column headings are found.
Parameters:
someMaprptLines - lines read from a Mapper report, lines are assumed to be in the same order as they occur in the report.
aStartingLineIndex - index of line in someMaprptLines to start parsing for column headings, counting from zero.
Returns:
a column meta-data object that represent the first column headings seen at or after aStartingLineIndex, or NULL if no column headings seen.
public static com.arsi.mj.maprpt.parser.column.MaprptColumnMetadata parseFromReportLines(java.util.List someMaprptLines, int aStartingLineIndex)
public final void setTrailingLines(boolean aTrailingLinesFlag)