org.processmining.framework.log.rfb
Class LogSummaryFormatter

java.lang.Object
  extended by org.processmining.framework.log.rfb.LogSummaryFormatter

public class LogSummaryFormatter
extends java.lang.Object

This class provides static methods for extracting an HTML-formatted summary from the information contained in a LogSummary instance.

Author:
Christian W. Guenther (christian at deckfour dot org)

Field Summary
protected static java.lang.String FONT_CODE
           
protected static java.lang.String FONT_HEADING
           
protected static java.lang.String FONT_TEXT
           
protected static java.text.NumberFormat numberFormat
           
protected static java.lang.String PART_START
           
protected static java.lang.String PART_STOP
           
protected static java.lang.String TABLE
           
protected static java.lang.String TD
           
protected static java.lang.String TR
           
 
Constructor Summary
LogSummaryFormatter()
           
 
Method Summary
protected static java.lang.String encodeInfoItem(InfoItem item)
          Formats an info item; internal helper method.
protected static java.lang.String encodeLogEvents(LogSummary summary)
          Formats a set of log events, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of audit trail entries in a log file).; internal helper method.
protected static java.lang.String encodeOriginators(LogSummary summary)
          Formats a set of originators, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of audit trail entries in a log file).; internal helper method.
protected static java.lang.String encodeProcessInstances(LogSummary summary)
          Formats a set of process instances, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of process instances in a log file).; internal helper method.
protected static java.lang.String encodeStartingEndingLogEvents(java.util.Map<LogEvent,java.lang.Integer> mappingStartingEndingLogEventsToFrequencies, int totalNumberProcessInstances)
          Formats a set of starting/ending log events, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of audit trail entries in a log file).; internal helper method.
static java.lang.String format(LogSummary summary)
          Formats information contained in a LogSummary in HTML string format.
protected static java.lang.String getOccurrencePercentage(double occurrence, double total)
          Extracts the percentage of an occurrence and formats it as string
protected static java.lang.String heading(java.lang.String heading)
          Formats a heading; internal helper method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberFormat

protected static final java.text.NumberFormat numberFormat

FONT_TEXT

protected static final java.lang.String FONT_TEXT
See Also:
Constant Field Values

FONT_CODE

protected static final java.lang.String FONT_CODE
See Also:
Constant Field Values

FONT_HEADING

protected static final java.lang.String FONT_HEADING
See Also:
Constant Field Values

TABLE

protected static final java.lang.String TABLE
See Also:
Constant Field Values

TD

protected static final java.lang.String TD
See Also:
Constant Field Values

TR

protected static final java.lang.String TR
See Also:
Constant Field Values

PART_START

protected static final java.lang.String PART_START
See Also:
Constant Field Values

PART_STOP

protected static final java.lang.String PART_STOP
See Also:
Constant Field Values
Constructor Detail

LogSummaryFormatter

public LogSummaryFormatter()
Method Detail

format

public static java.lang.String format(LogSummary summary)
Formats information contained in a LogSummary in HTML string format.

Parameters:
summary - the LogSummary to extract information from
Returns:
HTML-formatted description string

heading

protected static java.lang.String heading(java.lang.String heading)
Formats a heading; internal helper method.

Parameters:
heading - headline to be formatted
Returns:
HTML string

encodeInfoItem

protected static java.lang.String encodeInfoItem(InfoItem item)
Formats an info item; internal helper method.

Parameters:
item - info item to be formatted
Returns:
HTML string

encodeLogEvents

protected static java.lang.String encodeLogEvents(LogSummary summary)
Formats a set of log events, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of audit trail entries in a log file).; internal helper method.

Parameters:
summary - The log summary from which the set of log events should be formatted
Returns:
HTML string

encodeOriginators

protected static java.lang.String encodeOriginators(LogSummary summary)
Formats a set of originators, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of audit trail entries in a log file).; internal helper method.

Parameters:
summary - The log summary from which the set of log events should be formatted
Returns:
HTML string

encodeStartingEndingLogEvents

protected static java.lang.String encodeStartingEndingLogEvents(java.util.Map<LogEvent,java.lang.Integer> mappingStartingEndingLogEventsToFrequencies,
                                                                int totalNumberProcessInstances)
Formats a set of starting/ending log events, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of audit trail entries in a log file).; internal helper method.

Parameters:
mappingStartingEndingLogEventsToFrequencies - HashMap containing the map between the starting/ending events and their occurrences as starting/ending events in the process instances in the log
totalNumberProcessInstances - int containing the total number of process instances in the log
Returns:
HTML string

encodeProcessInstances

protected static java.lang.String encodeProcessInstances(LogSummary summary)
Formats a set of process instances, including their sorting by occurrence count and calculation of occurrence percentages (based on the total number of process instances in a log file).; internal helper method.

Parameters:
summary - The log summary from which the set of process intances should be formatted
Returns:
HTML string

getOccurrencePercentage

protected static java.lang.String getOccurrencePercentage(double occurrence,
                                                          double total)
Extracts the percentage of an occurrence and formats it as string

Parameters:
occurrence - number to calculate percentage occurrence from
total - total number of occurrences in the log
Returns:
string containing the required percentage