org.syrup.helpers
Class PTaskTemplateImpl

java.lang.Object
  extended byorg.syrup.helpers.TemplateImpl
      extended byorg.syrup.helpers.PTaskTemplateImpl
All Implemented Interfaces:
PTask, PTaskTemplate, Task, Template

public class PTaskTemplateImpl
extends TemplateImpl
implements PTaskTemplate

A generic PTaskTemplate implementation.

Author:
Robbert van Dalen

Field Summary
 
Fields inherited from class org.syrup.helpers.TemplateImpl
operators, values
 
Fields inherited from interface org.syrup.Template
EQUAL, GREATER, GREATER_EQUAL, IGNORE, LESS, LESS_EQUAL, LIKE, NOT, NOT_LIKE
 
Constructor Summary
PTaskTemplateImpl(java.lang.String[] specification)
          Constructor for the PTaskTemplateImpl object
 
Method Summary
 int creationTime_match()
          Returns the qualifier used to match the creationTime attribute.
 long creationTime()
          Returns the creation time of a PTask.
 int description_match()
          Returns the qualifier used to match the description attribute.
 java.lang.String description()
          Returns the defined description of a Task.
 int done_match()
          Returns the qualifier used to match the done attribute.
 boolean done()
          Returns true if this PTask is done.
 int environment_match()
          Returns the qualifier used to match the environment attribute.
 java.lang.String environment()
          Returns the logical environment of the Task.
 int executable_match()
          Returns the qualifier used to match the executable attribute.
 boolean executable()
          Returns true if this PTask is executable.
 int functionClass_match()
          Returns the qualifier used to match the functionClass attribute.
 java.lang.String functionClass()
          Returns the classname of the Function.
 int isParent_match()
          Returns the qualifier used to match the isParent attribute.
 boolean isParent()
          Returns true if this PTask is a parent.
 int key_match()
          Returns the qualifier used to match the key attribute.
 java.lang.String key()
          Returns the key that the WorkSpace uses to identify a PTask.
 int modifications_match()
          Returns the qualifier used to match the modifications attribute.
 long modifications()
          Returns the number of modifications since creation.
 int modificationTime_match()
          Returns the qualifier used to match the modificationTime attribute.
 long modificationTime()
          Returns the last modification time since creation.
 int name_match()
          Returns the qualifier used to match the name attribute.
 java.lang.String name()
          Returns the defined name of a Task.
 int orType_match()
          Returns the qualifier used to match the orType attribute.
 boolean orType()
          Returns true if the type is OR.
 int parameter_match()
          Returns the qualifier used to match the parameter attribute.
 java.lang.String parameter()
          Returns the static parameter to parameterize the Task.
 int parentKey_match()
          Returns the qualifier used to match the parentKey attribute.
 java.lang.String parentKey()
          Returns the parent identifier.
 int worker_match()
          Returns the qualifier used to match the worker attribute.
 java.lang.String worker()
          Returns the Worker's address (URL) that is currently executing this PTask.
 
Methods inherited from class org.syrup.helpers.TemplateImpl
operator, to_boolean, to_date, to_number
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTaskTemplateImpl

public PTaskTemplateImpl(java.lang.String[] specification)
                  throws java.lang.Exception
Constructor for the PTaskTemplateImpl object

Parameters:
specification - The query specification
Method Detail

name

public java.lang.String name()
Description copied from interface: Task
Returns the defined name of a Task. All Tasks that are part of the same Workflow (share the same parent) should have an unique name.

Specified by:
name in interface Task
Returns:
The defined name.

description

public java.lang.String description()
Description copied from interface: Task
Returns the defined description of a Task. This can be used as an annotation for the execution of a Task, or as a match criterium to fetch Tasks from a WorkSpace.

Specified by:
description in interface Task
Returns:
The defined description.

functionClass

public java.lang.String functionClass()
Description copied from interface: Task
Returns the classname of the Function.

Specified by:
functionClass in interface Task
Returns:
The Function's classname.

environment

public java.lang.String environment()
Description copied from interface: Task
Returns the logical environment of the Task.

Specified by:
environment in interface Task
Returns:
The logical environment.

parameter

public java.lang.String parameter()
Description copied from interface: Task
Returns the static parameter to parameterize the Task.

Specified by:
parameter in interface Task
Returns:
The static parameter.

orType

public boolean orType()
Description copied from interface: Task
Returns true if the type is OR. Returns false if the type is AND. OR Tasks are marked for execution if one of the inputs is full. AND Tasks are marked for execution if both inputs are full.

Specified by:
orType in interface Task
Returns:
the type.

parentKey

public java.lang.String parentKey()
Description copied from interface: PTask
Returns the parent identifier. The parent of a PTask is fixed and cannot change during the life-cyle of a Workspace.

Specified by:
parentKey in interface PTask
Returns:
The parent identifier key.
See Also:
PTask.key()

key

public java.lang.String key()
Description copied from interface: PTask
Returns the key that the WorkSpace uses to identify a PTask. This identifier is fixed and cannot change during the life-cyle of a Workspace.

Specified by:
key in interface PTask
Returns:
The identifier key.

modifications

public long modifications()
Description copied from interface: PTask
Returns the number of modifications since creation. Because PTasks can be executed multiple times, this number can more then 1. Note that the number of modifications can only increase during the life-cyle of a Workspace.

Specified by:
modifications in interface PTask
Returns:
The number of modifications since creation.

modificationTime

public long modificationTime()
Description copied from interface: PTask
Returns the last modification time since creation. This changes when the number of modifications is increased.

Specified by:
modificationTime in interface PTask
Returns:
The last modification time since creation.

creationTime

public long creationTime()
Description copied from interface: PTask
Returns the creation time of a PTask. This is fixed and cannot change during the life-cyle of a Workspace.

Specified by:
creationTime in interface PTask

executable

public boolean executable()
Description copied from interface: PTask
Returns true if this PTask is executable.

Specified by:
executable in interface PTask
Returns:
true if this PTask is executable.

done

public boolean done()
Description copied from interface: PTask
Returns true if this PTask is done. When a PTask is done, it will be indefinitely during the life-cyle of a Workspace.

Specified by:
done in interface PTask
Returns:
true if this PTask is done.

worker

public java.lang.String worker()
Description copied from interface: PTask
Returns the Worker's address (URL) that is currently executing this PTask.

Specified by:
worker in interface PTask
Returns:
The Worker's address executing this PTask.

isParent

public boolean isParent()
Description copied from interface: PTask
Returns true if this PTask is a parent. When a PTask is made parent, it will be indefinitely during the life-cyle of a Workspace.

Specified by:
isParent in interface PTask
Returns:
true if this PTask is a parent.

name_match

public int name_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the name attribute.

Specified by:
name_match in interface PTaskTemplate
Returns:
The qualifier used to match the name attribute.

description_match

public int description_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the description attribute.

Specified by:
description_match in interface PTaskTemplate
Returns:
The qualifier used to match the description attribute.

parameter_match

public int parameter_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the parameter attribute.

Specified by:
parameter_match in interface PTaskTemplate
Returns:
The qualifier used to match the parameter attribute.

functionClass_match

public int functionClass_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the functionClass attribute.

Specified by:
functionClass_match in interface PTaskTemplate
Returns:
The qualifier used to match the functionClass attribute.

environment_match

public int environment_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the environment attribute.

Specified by:
environment_match in interface PTaskTemplate
Returns:
The qualifier used to match the environment attribute.

orType_match

public int orType_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the orType attribute.

Specified by:
orType_match in interface PTaskTemplate
Returns:
The qualifier used to match the orType attribute.

parentKey_match

public int parentKey_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the parentKey attribute.

Specified by:
parentKey_match in interface PTaskTemplate
Returns:
The qualifier used to match the parentKey attribute.

key_match

public int key_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the key attribute.

Specified by:
key_match in interface PTaskTemplate
Returns:
The qualifier used to match the key attribute.

modifications_match

public int modifications_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the modifications attribute.

Specified by:
modifications_match in interface PTaskTemplate
Returns:
The qualifier used to match the modifications attribute.

modificationTime_match

public int modificationTime_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the modificationTime attribute.

Specified by:
modificationTime_match in interface PTaskTemplate
Returns:
The qualifier used to match the modificationTime attribute.

creationTime_match

public int creationTime_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the creationTime attribute.

Specified by:
creationTime_match in interface PTaskTemplate
Returns:
The qualifier used to match the creationTime attribute.

executable_match

public int executable_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the executable attribute.

Specified by:
executable_match in interface PTaskTemplate
Returns:
The qualifier used to match the executable attribute.

done_match

public int done_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the done attribute.

Specified by:
done_match in interface PTaskTemplate
Returns:
The qualifier used to match the done attribute.

worker_match

public int worker_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the worker attribute.

Specified by:
worker_match in interface PTaskTemplate
Returns:
The qualifier used to match the worker attribute.

isParent_match

public int isParent_match()
Description copied from interface: PTaskTemplate
Returns the qualifier used to match the isParent attribute.

Specified by:
isParent_match in interface PTaskTemplate
Returns:
The qualifier used to match the isParent attribute.