com.ibm.dtfj.analyzer.ext
Interface IAnalysisReport


public interface IAnalysisReport

This will handle the report produced by an analyser. Initially it will probably be directed straight to a print stream and so this can be a simple container for something like a StringBuffer. In the longer term we probably want to preserve the formatting information in order to turn this into some alternative rich output such as HTML or XML etc.


Field Summary
static java.lang.String FORMAT_COLUMNS
          Type for startFormatSection(String, String): print all fields on the same line, with column alignment as specified by the args parameter.
static java.lang.String FORMAT_VERBATIM
          Type for startFormatSection(String): print all fields verbatim, i.e. just the value, with no name, no prefix, and concatenated with all other fields in the section.
static java.lang.String TAG_ERROR
          Tag for a field that represents an error encountered while generating some data for the report
static java.lang.String TAG_HIDETITLE
          Tag for a section or report that should be printed without a title
static java.lang.String TAG_MAJORHEADING
          Tag for a section or report that should be considered a major section, with a big title
static java.lang.String TAG_OBSERVATION
          Tag for a field that represents a potential problem detected by the tool
static java.lang.String TAG_STANDOUT
          Tag for a section or report that should be printed so that it "stands-out" from other surrounding sections, e.g. surrounded by white space
 
Method Summary
 IAnalysisReport close()
          End the output document.
 void endSection()
          Mark the end of the previously started subsection.
 void endSection(int depth)
          Mark the end of all previously started subsections up to the specified depth.
 void printField(java.lang.String name, long value)
          Print a named integer report field.
 void printField(java.lang.String name, java.lang.String value)
          Print a named report field.
 void printField(java.lang.String name, java.lang.String value, java.lang.String tag, java.lang.String details)
          Print a named report field, specifying special options
 void printFieldHex(java.lang.String name, long value)
          Print a named integer report field as a hexadecimal value.
 void printIdent(java.lang.Object refKey)
          Print a named reference to some object or another report embedded in this report.
 void printIdent(java.lang.String title, java.lang.Object refKey)
          Print a named reference to some object or another report embedded in this report.
 void printLiteral(java.lang.String value)
          Print a literal string in a report.
 void printReport(IAnalysisReport value)
          Embed an entire report from another analyzer inside this report, without a title.
 void printReport(java.lang.String title, IAnalysisReport value)
          Embed an entire report from another analyzer inside this report.
 void printReport(java.lang.String title, IAnalysisReport value, java.lang.String tag)
          Embed an entire report from another analyzer inside this report.
 int startFormatSection(java.lang.String type)
          Start a formatting section.
 int startFormatSection(java.lang.String type, java.lang.String args)
          Start a formatting section.
 int startIdentitySection()
          Start a identity section.
 int startSection()
          Start a subsection of the report.
 int startSection(java.lang.String name)
          Start a named subsection of the report.
 int startSection(java.lang.String name, java.lang.String tag)
          Start a named subsection of the report.
 

Field Detail

FORMAT_VERBATIM

static final java.lang.String FORMAT_VERBATIM
Type for startFormatSection(String): print all fields verbatim, i.e. just the value, with no name, no prefix, and concatenated with all other fields in the section.

See Also:
Constant Field Values

FORMAT_COLUMNS

static final java.lang.String FORMAT_COLUMNS
Type for startFormatSection(String, String): print all fields on the same line, with column alignment as specified by the args parameter. Columns alignment is given as a space separated sequence of integers indicating the relative proportions of the available space given for each columns. E.g. "3 2 1" gives the first column as three times the size of the last and the second as two thirds the size of the first.

See Also:
Constant Field Values

TAG_ERROR

static final java.lang.String TAG_ERROR
Tag for a field that represents an error encountered while generating some data for the report

See Also:
Constant Field Values

TAG_OBSERVATION

static final java.lang.String TAG_OBSERVATION
Tag for a field that represents a potential problem detected by the tool

See Also:
Constant Field Values

TAG_HIDETITLE

static final java.lang.String TAG_HIDETITLE
Tag for a section or report that should be printed without a title

See Also:
Constant Field Values

TAG_MAJORHEADING

static final java.lang.String TAG_MAJORHEADING
Tag for a section or report that should be considered a major section, with a big title

See Also:
Constant Field Values

TAG_STANDOUT

static final java.lang.String TAG_STANDOUT
Tag for a section or report that should be printed so that it "stands-out" from other surrounding sections, e.g. surrounded by white space

See Also:
Constant Field Values
Method Detail

printField

void printField(java.lang.String name,
                java.lang.String value)
Print a named report field.

Parameters:
name - name of the report field.
value - field's value.

printField

void printField(java.lang.String name,
                java.lang.String value,
                java.lang.String tag,
                java.lang.String details)
Print a named report field, specifying special options

Parameters:
name - name of the report field
value - field's value
tag - any tag associated with this field, to control output or usage (e.g. error, debug, etc.)
details - additional details to be output with this field

printField

void printField(java.lang.String name,
                long value)
Print a named integer report field.

Parameters:
name - name of the report field.
value - field's value.

printFieldHex

void printFieldHex(java.lang.String name,
                   long value)
Print a named integer report field as a hexadecimal value.

Parameters:
name - name of the field.
value - field's value.

printLiteral

void printLiteral(java.lang.String value)
Print a literal string in a report. A literal is typically represented as a special kind of field, without a name.

Parameters:
value - the literal string to print.

printIdent

void printIdent(java.lang.String title,
                java.lang.Object refKey)
Print a named reference to some object or another report embedded in this report.

Parameters:
title - title to be used for the reference.
refKey - a reference to the target sub-report or object

printIdent

void printIdent(java.lang.Object refKey)
Print a named reference to some object or another report embedded in this report.

Parameters:
refKey - a reference to the target sub-report or object

printReport

void printReport(java.lang.String title,
                 IAnalysisReport value,
                 java.lang.String tag)
Embed an entire report from another analyzer inside this report.

Parameters:
title - title to be used for the embedded report.
value - report to be embedded in the current report
tag - any tag associated with this field, to control output or usage

printReport

void printReport(java.lang.String title,
                 IAnalysisReport value)
Embed an entire report from another analyzer inside this report.

Parameters:
title - title to be used for the embedded report.
value - report to be embedded in the current report

printReport

void printReport(IAnalysisReport value)
Embed an entire report from another analyzer inside this report, without a title.

Parameters:
value - report to be embedded in the current report

startSection

int startSection(java.lang.String name)
Start a named subsection of the report.

Parameters:
name - name of the subsection.
Returns:
the current depth of section nesting (for use in a subsequent call to endSection())

startSection

int startSection()
Start a subsection of the report.

Returns:
the current depth of section nesting (for use in a subsequent call to endSection())

startSection

int startSection(java.lang.String name,
                 java.lang.String tag)
Start a named subsection of the report.

Parameters:
name - name of the subsection.
tag - any tag associated with this field, to control output or usage
Returns:
the current depth of section nesting (for use in a subsequent call to endSection())

startFormatSection

int startFormatSection(java.lang.String type,
                       java.lang.String args)
Start a formatting section.

Parameters:
type - type of the format to use on elements of this section.
args - arguments to use for this type of formatting.
Returns:
the current depth of section nesting (for use in a subsequent call to endSection())

startFormatSection

int startFormatSection(java.lang.String type)
Start a formatting section.

Parameters:
type - type of the format to use on elements of this section.
Returns:
the current depth of section nesting (for use in a subsequent call to endSection())

startIdentitySection

int startIdentitySection()
Start a identity section. The identity section is used to distinguish those elements in a report that are used to identify this particular report and distinguish it from other similar reports. It can be used to generate a title for the report

Returns:
the current depth of section nesting (for use in a subsequent call to endSection())

endSection

void endSection()
Mark the end of the previously started subsection.


endSection

void endSection(int depth)
Mark the end of all previously started subsections up to the specified depth. The depth is an integer returned from all calls to startSection() and its variants. endSection(depth) closes all sections nested inside and including the one that returned that particular depth value.

Parameters:
depth - the depth of nested sections to close

close

IAnalysisReport close()
End the output document. It's an error to use output methods of this interface once the output is closed.

Returns:
the current AnalysisObject instance (for chaining this call)


© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.