Package org.apache.uima.util.impl

# Class ProcessTraceEvent_impl

java.lang.Object
org.apache.uima.util.impl.ProcessTraceEvent_impl

All Implemented Interfaces:
  `Serializable`, `ProcessTraceEvent`

public class ProcessTraceEvent_impl extends Object implements ProcessTraceEvent
Reference implementation of `ProcessTraceEvent`.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from interface org.apache.uima.util.ProcessTraceEvent

  `ANALYSIS, ANALYSIS_ENGINE, SERVICE, SERVICE_CALL`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProcessTraceEvent_impl()`
  Creates a new ProcessTraceEvent_impl with null property values.
  `ProcessTraceEvent_impl(String aComponentName, String aType, String aDescription)`
  Creates a new ProcessTraceEvent_impl and sets the Component name, type, and description properties.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addSubEvent(ProcessTraceEvent aEvent)`
  `void`
  `addToDuration(long aAdditionalDuration)`
  `String`
  `getComponentName()`
  Retrieves the name of the component that is performing this event.
  `String`
  `getDescription()`
  Retrieves the description of this event.
  `int`
  `getDuration()`
  Gets the duration of this event.
  `int`
  `getDurationExcludingSubEvents()`
  Gets the duration of this event, minus the sum of the durations of its direct sub-events.
  `String`
  `getResultMessage()`
  Retrieves the result message of this event.
  `long`
  `getStartTime()`
  `List<ProcessTraceEvent>`
  `getSubEvents()`
  Gets the sub-events of this event.
  `String`
  `getType()`
  Gets the type of event.
  `void`
  `setComponentName(String aName)`
  `void`
  `setDescription(String aDescription)`
  `void`
  `setDuration(int aDuration)`
  `void`
  `setResultMessage(String aResultMessage)`
  `void`
  `setStartTime(long aStartTime)`
  `void`
  `setType(String aType)`
  `String`
  `toString()`
  Generates a user-readable representation of this event and its sub-events.
  `void`
  `toString(StringBuffer aBuf, int aIndentLevel)`
  Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer.
  `void`
  `toString(StringBuffer aBuf, int aIndentLevel, int aTotalTime)`
  Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer.
  `protected void`
  `writeTabs(int aNumTabs, StringBuffer aBuf)`
  Writes tabs to a StringBuffer

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ProcessTraceEvent_impl

    public ProcessTraceEvent_impl()
    Creates a new ProcessTraceEvent_impl with null property values.

  - ### ProcessTraceEvent_impl

    public ProcessTraceEvent_impl(String aComponentName, String aType, String aDescription)
    Creates a new ProcessTraceEvent_impl and sets the Component name, type, and description properties.
    Parameters:
      `aComponentName` - name of Component generating this event
      `aType` - type of event. Standard event types are defined as constants on the `ProcessTraceEvent` interface, but any string is allowed.
      `aDescription` - description of event

- ## Method Details

  - ### getComponentName

    public String getComponentName()
    Description copied from interface: `ProcessTraceEvent`
    Retrieves the name of the component that is performing this event.
    Specified by:
      `getComponentName` in interface `ProcessTraceEvent`
    Returns:
      the component name
    See Also:
      - `ProcessTraceEvent.getComponentName()`

  - ### setComponentName

    public void setComponentName(String aName)
    Parameters:
      `aName` - the component name for this event

  - ### getType

    public String getType()
    Description copied from interface: `ProcessTraceEvent`
    Gets the type of event. Standard values for this property are defined as constants on this interface, but any String is allowed.
    Specified by:
      `getType` in interface `ProcessTraceEvent`
    Returns:
      the event type
    See Also:
      - `ProcessTraceEvent.getType()`

  - ### setType

    public void setType(String aType)
    Parameters:
      `aType` - the type of this event

  - ### getDescription

    public String getDescription()
    Description copied from interface: `ProcessTraceEvent`
    Retrieves the description of this event.
    Specified by:
      `getDescription` in interface `ProcessTraceEvent`
    Returns:
      the event Description
    See Also:
      - `ProcessTraceEvent.getDescription()`

  - ### setDescription

    public void setDescription(String aDescription)
    Parameters:
      `aDescription` - the description for this event

  - ### getDuration

    public int getDuration()
    Description copied from interface: `ProcessTraceEvent`
    Gets the duration of this event.
    Specified by:
      `getDuration` in interface `ProcessTraceEvent`
    Returns:
      the duration of this event, in milliseconds.
    See Also:
      - `ProcessTraceEvent.getDuration()`

  - ### setDuration

    public void setDuration(int aDuration)
    Parameters:
      `aDuration` - the duration for this event

  - ### addToDuration

    public void addToDuration(long aAdditionalDuration)
    Parameters:
      `aAdditionalDuration` - Adds this to the duration of this event

  - ### getResultMessage

    public String getResultMessage()
    Description copied from interface: `ProcessTraceEvent`
    Retrieves the result message of this event.
    Specified by:
      `getResultMessage` in interface `ProcessTraceEvent`
    Returns:
      the event's result message
    See Also:
      - `ProcessTraceEvent.getResultMessage()`

  - ### setResultMessage

    public void setResultMessage(String aResultMessage)
    Parameters:
      `aResultMessage` - the Result Message for this event

  - ### getSubEvents

    public List<ProcessTraceEvent> getSubEvents()
    Description copied from interface: `ProcessTraceEvent`
    Gets the sub-events of this event.
    Specified by:
      `getSubEvents` in interface `ProcessTraceEvent`
    Returns:
      a List containing other `ProcessTraceEvent` objects
    See Also:
      - `ProcessTraceEvent.getSubEvents()`

  - ### addSubEvent

    public void addSubEvent(ProcessTraceEvent aEvent)
    Parameters:
      `aEvent` - Adds this sub-event to this event.

  - ### toString

    public String toString()
    Description copied from interface: `ProcessTraceEvent`
    Generates a user-readable representation of this event and its sub-events.
    Specified by:
      `toString` in interface `ProcessTraceEvent`
    Overrides:
      `toString` in class `Object`
    Returns:
      the String representation of this event and its sub-events
    See Also:
      - `ProcessTraceEvent.toString()`

  - ### toString

    public void toString(StringBuffer aBuf, int aIndentLevel)
    Description copied from interface: `ProcessTraceEvent`
    Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer. This is useful for writing nested events.
    Specified by:
      `toString` in interface `ProcessTraceEvent`
    Parameters:
      `aBuf` - string buffer to add to
      `aIndentLevel` - indentation level
    See Also:
      - `ProcessTraceEvent.toString(StringBuffer,int)`

  - ### toString

    public void toString(StringBuffer aBuf, int aIndentLevel, int aTotalTime)
    Description copied from interface: `ProcessTraceEvent`
    Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer. Also, if the total time for all events is known, this method will print the percentage of time used by this event and its subevents.
    Specified by:
      `toString` in interface `ProcessTraceEvent`
    Parameters:
      `aBuf` - string buffer to add to
      `aIndentLevel` - indentation level
      `aTotalTime` - total time, used to calculate percentags. If not known, pass 0.
    See Also:
      - `ProcessTraceEvent.toString(java.lang.StringBuffer, int, int)`

  - ### getDurationExcludingSubEvents

    public int getDurationExcludingSubEvents()
    Description copied from interface: `ProcessTraceEvent`
    Gets the duration of this event, minus the sum of the durations of its direct sub-events.
    Specified by:
      `getDurationExcludingSubEvents` in interface `ProcessTraceEvent`
    Returns:
      the duration of this event in milliseconds, excluding the time spent in its sub-events
    See Also:
      - `ProcessTraceEvent.getDurationExcludingSubEvents()`

  - ### getStartTime

    public long getStartTime()

  - ### setStartTime

    public void setStartTime(long aStartTime)

  - ### writeTabs

    protected void writeTabs(int aNumTabs, StringBuffer aBuf)
    Writes tabs to a StringBuffer
    Parameters:
      `aNumTabs` - number of tabs to print
      `aBuf` - the buffer to write to