NAME

MOBY::Async::LSAE - utilities to work with LSAE analysis event blocks

AUTHORS

Former developer Enrique de Andres Saiz (enrique.deandres@pcm.uam.es) - INB GNHC-1 (Madrid Science Park, Spain) (2006-2007).

Maintainers Jose Maria Fernandez (jmfernandez@cnio.es), Jose Manuel Rodriguez (jmrodriguez@cnio.es) - INB GN2 (CNIO, Spain).

DESCRIPTION

Provides functionalities to work with LSAE analysis event blocks. It defines the following constants, which represents the different types of LSAE Event Blocks:

LSAE_BASE_EVENT
 e.g.
 <analysis_event timestamp="today">
   <message>This is a general analysis event.</message>
 </analysis_event>
LSAE_HEARTBEAT_PROGRESS_EVENT
 e.g.
 <analysis_event timestamp="today">
   <message>This is a HEARTBEAT analysis event.</message>
   <heartbeat_progress/>
 </analysis_event>
LSAE_PERCENT_PROGRESS_EVENT
 e.g.
 <analysis_event timestamp="today">
   <message>This is a PERCENT PROGRESS analysis event.</message>
   <percent_progress percentage="52"/>
 </analysis_event>
LSAE_STATE_CHANGED_EVENT
 e.g.
 <analysis_event timestamp="today">
   <message>This is a STATUS CHANGED analysis event.</message>
   <state_changed previous_state="created" new_state="running"/>
 </analysis_event>
LSAE_STEP_PROGRESS_EVENT
 e.g.
 <analysis_event timestamp="today">
   <message>This is a STEP PROGRESS analysis event.</message>
   <step_progress total_steps="10" steps_completed="5"/>
 </analysis_event>
LSAE_TIME_PROGRESS_EVENT
 e.g.
 <analysis_event timestamp="today">
   <message>This is a TIME PROGRESS analysis event.</message>
   <time_progress remaining="324"/>
 </analysis_event>

It also defines LSAE::AnalysisEventBlock class.

LSAE::AnalysisEventBlock METHODS

new

 Name       :    new
 Function   :    create a new LSAE::AnalysisEventBlock object.
 Usage      :    $event = LSAE::AnalysisEventBlock->new()
                 $event = LSAE::AnalysisEventBlock->new($xml)
 Args       :    $xml - (optional) a string containing the XML code of an
                        analysis event block according to the LSAE spec.
 Returns    :    the LSAE::AnalysisEventBlock object created.

type

 Name       :    type
 Function   :    get/set the type of an analysis event block object.
 Usage      :    $event->type()
                 $event->type($type)
 Args       :    $type - a value representing a type of analysis event block.
 Returns    :    a value representing the type of analysis event block object.

id

 Name       :    id
 Function   :    get/set the identifier of an analysis event block object.
 Usage      :    $event->id()
                 $event->id($id)
 Args       :    $id - (optional) a string.
 Returns    :    the value of the identifier attribute.

timestamp

 Name       :    timestamp
 Function   :    get/set the timestamp of an analysis event block object.
 Usage      :    $event->timestamp()
                 $event->timestamp($timestamp)
 Args       :    $timestamp - (optional) a tiemestamp.
 Returns    :    the value of the timestamp attribute.

message

 Name       :    message
 Function   :    get/set the message of an analysis event block object.
 Usage      :    $event->message()
                 $event->message($message)
 Args       :    $message - (optional) a string.
 Returns    :    the content of the message element.

percentage

 Name       :    percentage
 Function   :    get/set the percentage attribute of an analysis event block of
                 the type LSAE_PERCENT_PROGRESS_EVENT.
 Usage      :    $event->percentage()
                 $event->percentage($percentage)
 Args       :    $percentage - an integer between 0 and 100.
 Returns    :    the value of the percentage attribute.

previous_state

 Name       :    previous_state
 Function   :    get/set the previous_state attribute of an analysis event block of
                 the type LSAE_STATE_CHANGED_EVENT.
 Usage      :    $event->previous_state()
                 $event->previous_state($state)
 Args       :    $state - one of the following strings... created, running,
                          completed, terminated_by_request or terminated_by_error.
 Returns    :    the value of the previous_state attribute.

new_state

 Name       :    new_state
 Function   :    get/set the new_state attribute of an analysis event block of
                 the type LSAE_STATE_CHANGED_EVENT.
 Usage      :    $event->new_state()
                 $event->new_state($state)
 Args       :    $state - one of the following strings... created, running,
                          completed, terminated_by_request or terminated_by_error.
 Returns    :    the value of the new_state attribute.

total_steps

 Name       :    total_steps
 Function   :    get/set the total_steps attribute of an analysis event block of
                 the type LSAE_STEP_PROGRESS_EVENT.
 Usage      :    $event->total_steps()
                 $event->total_steps($steps)
 Args       :    $steps - an integer
 Returns    :    the value of the total_steps attribute.

steps_completed

 Name       :    steps_completed
 Function   :    get/set the steps_completed attribute of an analysis event block of
                 the type LSAE_STEP_PROGRESS_EVENT.
 Usage      :    $event->steps_completed()
                 $event->steps_completed($steps)
 Args       :    $steps - an integer
 Returns    :    the value of the steps_completed attribute.

remaining

 Name       :    remaining
 Function   :    get/set the remaining attribute of an analysis event block of
                 the type LSAE_TIME_PROGRESS_EVENT.
 Usage      :    $event->remaining()
                 $event->remaining($seconds)
 Args       :    $seconds - an integer
 Returns    :    the value of the remaining attribute.

XML

 Name       :    XML
 Function   :    get an string with the XML code of an analysis event block.
 Usage      :    $event->XML()
 Args       :    none
 Returns    :    the analysis event block.