org.ourgrid.common.spec.semantic
Class JDFSemanticActions

java.lang.Object
  extended by org.ourgrid.common.spec.semantic.JDFSemanticActions
All Implemented Interfaces:
SemanticActions

public class JDFSemanticActions
extends java.lang.Object
implements SemanticActions

This entity is the set of actions that the JOB grammar uses to build a answer to the compilation of sources wrote in this language. Created on 15/06/2004


Constructor Summary
JDFSemanticActions()
          The constructor
 
Method Summary
 void action10()
          This action: Initializes the "condition" string for the actual block of I/O commands or job expresion.
 void action11()
          This action: Concatenates the symbol of the Token at the condition string statemant.
 void action12()
          This action: Sets the condition string to null, it means that the condition readed will not be used anymore.
 void action13()
          This action: Mounts the condition for the ELSE block and push it at the stack.
 void action14()
          This action: Closes and set the job expresion.
 void action15()
          This action: initializes the IOBlock to receive a new one.
 void action16()
          This action: Puts the I/O block condition statement at the stack.
 void action17()
          This action: Will push a empty String object at the stack.
 void action18()
          This action: Will push the other parts ( command, file, path ) of the I/O commands at the stack.
 void action19()
          This action: Builds a IOEntry and insert it at the actual IOBlock.
 void action20()
          This action:Pops the "condition" string that remains at the stack top.
 void action21()
          This action: Sets the IOBlock built as the input entry for the actualTask.
 void action22()
          This action: Sets the final result LIST object.
 void action23()
          This action: Sets the IOBlock built as the output entry for the actualTask.
 void action24()
          This action: initializes the obejct JobSpec with the found label.
 void action25()
          This action: initializes the obeject JobSpec with a empty string because any label was defined.
 void action26()
          This action: sets the reading mode to readstring
 void action27()
          This action: sets the reading mode to normal
 void action28()
          This action: sets the reading mode to readline
 void action4()
          This action: Sets the actual script of the remote script.
 void action8()
          This action: Tells to this entity that the job (default) attributes reading was finished.
 void action9()
          This action: Closes a Task and put it at "this.tasksSpec" list.
 int getOperationalMode()
           
 java.util.List<JobSpec> getResult()
          Used to return the result of the compilation process, after execute all the semantic actions necessary and defined by a grammar definition.
 void performAction(java.lang.String action, Token token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDFSemanticActions

public JDFSemanticActions()
The constructor

Method Detail

performAction

public void performAction(java.lang.String action,
                          Token token)
                   throws SemanticException
Specified by:
performAction in interface SemanticActions
Throws:
SemanticException
See Also:
SemanticActions.performAction(java.lang.String, org.ourgrid.common.spec.token.Token)

getOperationalMode

public int getOperationalMode()
Specified by:
getOperationalMode in interface SemanticActions
See Also:
SemanticActions.getOperationalMode()

getResult

public java.util.List<JobSpec> getResult()
Description copied from interface: SemanticActions
Used to return the result of the compilation process, after execute all the semantic actions necessary and defined by a grammar definition.

Specified by:
getResult in interface SemanticActions
Returns:
A list with all the objects constructed as answer of the compilation This is a generic way of giving a answer because each language needs a different answer structure.
See Also:
SemanticActions.getResult()

action4

public void action4()
This action: Sets the actual script of the remote script. Actual can be jobs (default) script if this.isJobAttrib == true It happens only when the first tag "task:" was not found yet.


action8

public void action8()
This action: Tells to this entity that the job (default) attributes reading was finished. That means that will begin to read tasks.


action9

public void action9()
             throws SemanticException
This action: Closes a Task and put it at "this.tasksSpec" list.

Throws:
SemanticException - When the task could not be validated then the TaskSpecificationException is wrapped into this one.

action10

public void action10()
This action: Initializes the "condition" string for the actual block of I/O commands or job expresion.


action11

public void action11()
This action: Concatenates the symbol of the Token at the condition string statemant.


action12

public void action12()
This action: Sets the condition string to null, it means that the condition readed will not be used anymore.


action13

public void action13()
This action: Mounts the condition for the ELSE block and push it at the stack.


action14

public void action14()
This action: Closes and set the job expresion.


action15

public void action15()
This action: initializes the IOBlock to receive a new one.


action16

public void action16()
This action: Puts the I/O block condition statement at the stack.


action17

public void action17()
This action: Will push a empty String object at the stack. It happens when the I/O entries have no conditions to be transfered.


action18

public void action18()
This action: Will push the other parts ( command, file, path ) of the I/O commands at the stack.


action19

public void action19()
              throws SemanticException
This action: Builds a IOEntry and insert it at the actual IOBlock.

Throws:
SemanticException - If the user did not define a part of the I/O command.

action20

public void action20()
This action:Pops the "condition" string that remains at the stack top.


action21

public void action21()
This action: Sets the IOBlock built as the input entry for the actualTask.


action22

public void action22()
              throws SemanticException
This action: Sets the final result LIST object.

Throws:
SemanticException

action23

public void action23()
This action: Sets the IOBlock built as the output entry for the actualTask.


action24

public void action24()
This action: initializes the obejct JobSpec with the found label.


action25

public void action25()
This action: initializes the obeject JobSpec with a empty string because any label was defined.


action26

public void action26()
This action: sets the reading mode to readstring


action27

public void action27()
This action: sets the reading mode to normal


action28

public void action28()
This action: sets the reading mode to readline