org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.types.task
Class ExecutionType

java.lang.Object
  extended by org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.types.ExecutionEntity
      extended by org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.types.task.ExecutionType
All Implemented Interfaces:
Cloneable, Evaluable
Direct Known Subclasses:
ParallelExecution, SequentialExecution

public abstract class ExecutionType
extends ExecutionEntity
implements Cloneable

Author:
Spyros Boutsis, NKUA

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.types.ExecutionEntity
ExecutionEntity.ExecutionState
 
Field Summary
protected  List<ExecutionEntity> executionEntities
          The list of execution entities contained inside this execution type
 
Fields inherited from class org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.types.ExecutionEntity
entityName, execState, isGoalFulfilled, parent, scope, UID
 
Constructor Summary
ExecutionType()
          Class constructor
 
Method Summary
 void addExecutionEntity(ExecutionEntity entity)
          Adds an ExecutionEntity in the list of entities to be executed
 void cancel()
          Cancels the execution of this execution entity.
 Object clone()
           
 EvaluationResult evaluate(String expression)
          Evaluates the given expression on the execution tree rooted at the current object and returns a Node representing the result
 List<ExecutionEntity> getEntitiesToBeExecuted()
          Returns the list of ExecutionEntitys contained in this ExecutionType
 void initialize(Element xml, BootstrappingConfiguration conf)
          Sets the execution entities contained inside this ExecutionType object.
 void initializeWithDataInScope(org.gcube.common.core.scope.GCUBEScope scope)
          Finds the DataTypes that could be possibly used as inputs for this entity as well as each sub-entity contained in it.
 
Methods inherited from class org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.types.ExecutionEntity
assignRandomUID, createExecutionLog, execute, getExecutionLogger, getExecutionState, getName, getParent, getScope, getTypeName, getUID, getUIDescription, isFulfilled, newInstance, setExecutionState, setIsFulfilled, setParent, setScope, toXML
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executionEntities

protected List<ExecutionEntity> executionEntities
The list of execution entities contained inside this execution type

Constructor Detail

ExecutionType

public ExecutionType()
Class constructor

Method Detail

addExecutionEntity

public void addExecutionEntity(ExecutionEntity entity)
Adds an ExecutionEntity in the list of entities to be executed

Parameters:
entity - the ExecutionEntity to add

initialize

public void initialize(Element xml,
                       BootstrappingConfiguration conf)
                throws Exception
Sets the execution entities contained inside this ExecutionType object. The entities are given in the form of an XML document fragment, which is parsed and transformed to objects.

Parameters:
xml - the XML describing the execution entities wrapped into this ExecutionType
conf - the active BootstrappingConfiguration object
Throws:
Exception

getEntitiesToBeExecuted

public List<ExecutionEntity> getEntitiesToBeExecuted()
Returns the list of ExecutionEntitys contained in this ExecutionType

Returns:
the list of entities to be executed by this ExecutionType

evaluate

public EvaluationResult evaluate(String expression)
Description copied from class: ExecutionEntity
Evaluates the given expression on the execution tree rooted at the current object and returns a Node representing the result

Specified by:
evaluate in interface Evaluable
Specified by:
evaluate in class ExecutionEntity
Parameters:
expression - the expression to evaluate, in "a.b.c..." notation
Returns:
the Node object that represents the result

initializeWithDataInScope

public void initializeWithDataInScope(org.gcube.common.core.scope.GCUBEScope scope)
                               throws Exception
Description copied from class: ExecutionEntity
Finds the DataTypes that could be possibly used as inputs for this entity as well as each sub-entity contained in it. The possible inputs for each entity are stored in a list inside the entity itself, so this method does not need to return anything. Furthermore, this method checks if the desirable output of this entity already exists in the given scope, and if it does, the entity's goal is defined as being already 'fulfilled' (the entity does not need to be executed).

Specified by:
initializeWithDataInScope in class ExecutionEntity
Parameters:
scope - the scope in which the entity will be executed
Throws:
Exception

cancel

public void cancel()
Description copied from class: ExecutionEntity
Cancels the execution of this execution entity. If the entity is not currently executing, calling this method has no effect.

Specified by:
cancel in class ExecutionEntity

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class ExecutionEntity
Throws:
CloneNotSupportedException


Copyright © 2013. All Rights Reserved.