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

 

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

Package com.arsi.mj.maprpt.parser.tuple contains the following classes and interfaces.
Classes and Interfaces
AssertDataTupleDecorator Implements the decorator pattern to process Mapper report lines to be treated as tabular data lines, i.e., tuples of data.
IgnoreDataTupleDecorator Implements the decorator pattern to process Mapper report lines which appear to be tabular data lines (i.e., tuples of data) but are to be ignored as such.
InlineDataHandlerDecorator Implements the decorator pattern to process Mapper report lines to be treated as "in-line" data.
MaprptTuple
MaprptTuplizer Parses tuples of data from Mapper report lines.
MaprptTuplizerIterator

Class: AssertDataTupleDecorator   next package

Implements the decorator pattern to process Mapper report lines to be treated as tabular data lines, i.e., tuples of data.
Treat this class as "thread-hostile", since it is intended to be created, used and discarded by a single thread.
public class com.arsi.mj.maprpt.parser.tuple.AssertDataTupleDecorator
  extends com.arsi.mj.maprpt.parser.lineproc.LineProcessorBase
Constructors
Public ctor for initializing an instance of this class.
Parameters:
aPragma - assert data tuple pragma.
aDefaultFirstCharset - set of default characters to match against first character of line that should be treated as data tuple (e.g., tab).
public AssertDataTupleDecorator(com.arsi.mj.maprpt.parser.pragma.types.AssertDataTuplePragma aPragma, java.lang.String aDefaultFirstCharset)
Public ctor for initializing an instance of this class.
Parameters:
aDefaultFirstCharset - set of default characters to match against first character of line that should be treated as data tuple (e.g., tab).
public AssertDataTupleDecorator(java.lang.String aDefaultFirstCharset)
Methods
public boolean applyActions(com.arsi.mj.maprpt.parser.line.types.MaprptLine aMaprptLine)
Should line that was last fed to LineProcessorBase.applyActions() be treated as data tuple?
Returns:
true if last line is data tuple, false if not.
public boolean assertProcessedLineAsTuple()
public boolean wantLine(com.arsi.mj.maprpt.parser.line.types.MaprptLine aMaprptLine)

Class: IgnoreDataTupleDecorator   previous next package

Implements the decorator pattern to process Mapper report lines which appear to be tabular data lines (i.e., tuples of data) but are to be ignored as such.
Treat this class as "thread-hostile", since it is intended to be created, used and discarded by a single thread.
public class com.arsi.mj.maprpt.parser.tuple.IgnoreDataTupleDecorator
  extends com.arsi.mj.maprpt.parser.lineproc.LineProcessorBase
Constructors
Public ctor for initializing an instance of this class.
Parameters:
aPragma - ignore data tuple pragma.
public IgnoreDataTupleDecorator(com.arsi.mj.maprpt.parser.pragma.types.IgnoreDataTuplePragma aPragma)
Methods
public boolean applyActions(com.arsi.mj.maprpt.parser.line.types.MaprptLine aMaprptLine)
Should line that was last fed to LineProcessorBase.applyActions() be ignored as data tuple?
Returns:
true if last line is to be ignored as data tuple, false if not.
public boolean ignoreProcessedLineAsTuple()
public boolean wantLine(com.arsi.mj.maprpt.parser.line.types.MaprptLine aMaprptLine)

Class: InlineDataHandlerDecorator   previous next package

Implements the decorator pattern to process Mapper report lines to be treated as "in-line" data.
Treat this class as "thread-hostile", since it is intended to be created, used and discarded by a single thread.
public class com.arsi.mj.maprpt.parser.tuple.InlineDataHandlerDecorator
  extends com.arsi.mj.maprpt.parser.lineproc.LineProcessorBase
Constructors
Public ctor for initializing an instance of this class.
Parameters:
aDefaultFirstCharset - set of default characters to match against first character of line that should be treated as in-line data (e.g., asterisk, period).
aDefaultInlineBeanref - default in-line data handler.
public InlineDataHandlerDecorator(java.lang.String aDefaultFirstCharset, java.lang.String aDefaultInlineBeanref)
Public ctor for initializing an instance of this class.
Parameters:
aPragma - inline data handler pragma.
aDefaultFirstCharset - set of default characters to match against first character of line that should be treated as in-line data (e.g., asterisk, period).
public InlineDataHandlerDecorator(com.arsi.mj.maprpt.parser.pragma.types.UseInlineDataHandlerPragma aPragma, java.lang.String aDefaultFirstCharset)
Methods
public boolean applyActions(com.arsi.mj.maprpt.parser.line.types.MaprptLine aMaprptLine)
Get the reference to the bean that handles in-line data.
Returns:
the bean ID of the bean that handles in-line data.
public java.lang.String getHandlerBeanReference()
Get the Mapper report lines to be treated as in-line data that were processed (accumulated) by this class, best invoked when wantLine has returned false so all accumulated lines are returned.
Returns:
Mapper report lines to be treated as in-line data.
public java.util.List getProcessedLines()
public boolean wantLine(com.arsi.mj.maprpt.parser.line.types.MaprptLine aMaprptLine)

Class: MaprptTuple   previous next package

public class com.arsi.mj.maprpt.parser.tuple.MaprptTuple
  extends java.lang.Object
Constructors
public MaprptTuple(com.arsi.mj.maprpt.parser.column.MaprptColumnMetadata aColumnMetadata, java.util.List someColumnValues, java.lang.String anInlineDataBeanref, java.util.List someTrailingLines, java.util.List somePragmas, com.arsi.mj.maprpt.parser.line.types.MaprptLine aTupleLine)
Methods
public final com.arsi.mj.maprpt.parser.column.MaprptColumnMetadata getColumnMetadata()
public final java.util.List getColumnValues()
public final java.lang.String getInlineDataHandlerBeanref()
public final java.util.List getMatchedTypeRules()
public final java.util.List getPragmas()
public final java.util.List getTrailingLines()
public final com.arsi.mj.maprpt.parser.line.types.MaprptLine getTupleLine()
public final void setMatchedTypeRules(java.util.List someRules)

Class: MaprptTuplizer   previous next package

Parses tuples of data from Mapper report lines.
Treat this class as "thread-hostile", since it is intended to created, used and then discarded by a single thread.
public class com.arsi.mj.maprpt.parser.tuple.MaprptTuplizer
  extends java.lang.Object
  implements java.lang.Iterable
Constructors
Public ctor for creating an instance of this class.
Parameters:
someParsedLines - lines that have been parsed from a Mapper report that contains columnar data (i.e., asterisk lines that hold column headings and tab or other lines that hold column data).
anStartingLineIdx - index (from zero) of the first line to process in someParsedLines.
anEndingLineIdx - index of the last line (inclusive) to process in someParsedLines.
aColumnMetadata - meta data about columns that are expected to be found in tab or other lines.
aStopIfNotTupleFlag - if true, stop when a report line that is not a tuple is encounters; if false, any report line that is not a data tuple is ignored.
aDefaultTupleCharset - string of individual characters that should be treated as tab character when encountered as the first character in a line, i.e., identifies lines containing columnar data that start with a character other than a tab. Do not arbitrarily specify characters here, e.g., if the Mapper report lines contains in-line, non-tabular data in period or asterisk lines, do not specify . or * here. Can be NULL if no character other than tab identifies a line that contains columnar data.
aDefaultInlineCharset - set of default characters to match against first character of line that should be treated as in-line data (e.g., asterisk, period).
aDefaultInlineBeanref - default in-line data handler as bean reference name.
public MaprptTuplizer(java.util.List someParsedLines, int anStartingLineIdx, int anEndingLineIdx, com.arsi.mj.maprpt.parser.column.MaprptColumnMetadata aColumnMetadata, boolean aStopIfNotTupleFlag, java.lang.String aDefaultTupleCharset, java.lang.String aDefaultInlineCharset, java.lang.String aDefaultInlineBeanref)
Methods
Get iterator that pulls data tuples from range of parsed Mapper report lines passed to this tuplizer instance when it was created. The returned iterator generally follows the Iterator conventions, except that next may return NULL under some circumstances to indicate end-of-iteration.
See Also:
java.lang.Iterable#iterator()
public java.util.Iterator iterator()

Class: MaprptTuplizerIterator   previous package

public class com.arsi.mj.maprpt.parser.tuple.MaprptTuplizerIterator
  extends java.lang.Object
  implements java.util.Iterator
Constructors
Public ctor for creating an instance of this class.
Parameters:
someParsedLines - lines that have been parsed from a Mapper report that contains columnar data (i.e., asterisk lines that hold column headings and tab or other lines that hold column data).
anStartingLineIdx - index (from zero) of the first line to process in someParsedLines.
anEndingLineIdx - index of the last line (inclusive) to process in someParsedLines.
aColumnMetadata - meta-data about columns that are expected to be found in tab or other lines.
aStopIfNotTupleFlag - if true, stop when a report line that is not a tuple is encounters; if false, any report line that is not a data tuple is ignored.
aDefaultTupleCharset - string of individual characters that should be treated as tab character when encountered as the first character in a line, i.e., identifies lines containing columnar data that start with a character other than a tab. Do not arbitrarily specify characters here, e.g., if the Mapper report lines contains in-line, non-tabular data in period or asterisk lines, do not specify . or * here. Can be NULL if no character other than tab identifies a line that contains columnar data.
aDefaultInlineCharset - set of default characters to match against first character of line that should be treated as in-line data (e.g., asterisk, period).
aDefaultInlineBeanref - default in-line data handler as bean reference name.
public MaprptTuplizerIterator(java.util.List someParsedLines, int anStartingLineIdx, int anEndingLineIdx, com.arsi.mj.maprpt.parser.column.MaprptColumnMetadata aColumnMetadata, boolean aStopIfNotTupleFlag, java.lang.String aDefaultTupleCharset, java.lang.String aDefaultInlineCharset, java.lang.String aDefaultInlineBeanref)
Methods
Get the last Mapper report line read by the tuplizer that is not part of a tuple.
Returns:
the last report line read but not processed as tuple, or NULL if all lines passed to tuplizer were processed as tuples.
public com.arsi.mj.maprpt.parser.line.types.MaprptLine getLastNonTupleRead()
public boolean hasNext()
Get the next Mapper report data tuple, if any.
IMPORTANT: Unlike the usual contract defined by Iterator.next, this method may return NULL if no more data tuples exists because it needs to look ahead for lines that contain inline data.
See Also:
java.util.Iterator#next()
public com.arsi.mj.maprpt.parser.tuple.MaprptTuple next()
public void remove()