ora4mas.nopl
Class SchemeBoard

Package class diagram package SchemeBoard
java.lang.Object
  extended by cartago.Artifact
      extended by ora4mas.nopl.OrgArt
          extended by ora4mas.nopl.SchemeBoard
All Implemented Interfaces:
ToXML

public class SchemeBoard
extends OrgArt

Artifact to manage a scheme instance.

Operations (see details in method list below):

Observable properties: Signals (obligations has the form: obligation(to whom, reason, what, deadline)):

See Also:
Scheme

Field Summary
static java.lang.String obsPropCommitment
           
static java.lang.String obsPropGroups
           
static java.lang.String obsPropSpec
           
static jason.asSyntax.PredicateIndicator piGoalState
           
 
Fields inherited from class ora4mas.nopl.OrgArt
gui, monitorSchArt, myNPLListener, nengine, orgState, ownerAgent, running, sglDestroyed, sglNormFailure, sglOblCreated, sglOblFulfilled, sglOblInactive, sglOblUnfulfilled, updateGUIThread
 
Fields inherited from class cartago.Artifact
observabilityRadius, position, thisOpId
 
Constructor Summary
SchemeBoard()
           
 
Method Summary
 void admCommand(java.lang.String cmd)
           
 void commitMission(java.lang.String mission)
          The agent executing this operation tries to commit to a mission in the scheme.
 void destroy()
           
 org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
           
protected  java.lang.String getStyleSheetName()
           
 void goalAchieved(java.lang.String goal)
          The agent executing this operation set the goal as achieved by it.
 void init(java.lang.String osFile, java.lang.String schType, boolean createMonitoring, boolean hasGUI)
          Initialises the scheme artifact
 void leaveMission(java.lang.String mission)
          The agent executing this operation tries to leave/remove its mission in the scheme Verifications: the agent must be committed to the mission the mission's goals have to be satisfied (otherwise the agent is obliged to commit again to the mission)
 void setArgumentValue(java.lang.String goal, java.lang.String var, java.lang.Object value)
          The agent executing this operation set a value for a goal argument.
protected  void updateGoalStateObsProp()
           
 
Methods inherited from class ora4mas.nopl.OrgArt
fixAgName, getNPLInterpreter, getStyleSheet, initNormativeEngine, installNormativeSignaler, setOwner, updateGuiOE
 
Methods inherited from class cartago.Artifact
await_time, await, await, commit, defineObsProperty, defineOp, delay, dispose, dispose, execInternalOp, execLinkedOp, execLinkedOp, failed, failed, getCreatorId, getId, getManualSrcFile, getObservabilityRadius, getObsProperty, getObsPropertyByTemplate, getOpKey, getOpUserId, getOpUserName, getPosition, hasObsProperty, hasObsPropertyByTemplate, isLinked, log, lookupArtifact, makeArtifact, removeObsProperty, removeObsPropertyByTemplate, setupOperations, setupPosition, signal, signal, updateObservabilityRadius, updateObsProperty, updatePosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

obsPropSpec

public static final java.lang.String obsPropSpec
See Also:
Constant Field Values

obsPropGroups

public static final java.lang.String obsPropGroups
See Also:
Constant Field Values

obsPropCommitment

public static final java.lang.String obsPropCommitment
See Also:
Constant Field Values

piGoalState

public static final jason.asSyntax.PredicateIndicator piGoalState
Constructor Detail

SchemeBoard

public SchemeBoard()
Method Detail

init

public void init(java.lang.String osFile,
                 java.lang.String schType,
                 boolean createMonitoring,
                 boolean hasGUI)
          throws ParseException,
                 MoiseException
Initialises the scheme artifact

Parameters:
osFile - the organisation specification file (path and file name)
schType - the type of the scheme (as defined in the OS)
createMonitoring - whether a monitoring scheme will be created and attached
hasGUI - whether a GUI have to be created for the artifact
Throws:
ParseException - if the OS file is not correct
MoiseException - if schType was not specified

destroy

public void destroy()
Overrides:
destroy in class OrgArt

commitMission

public void commitMission(java.lang.String mission)
                   throws cartago.CartagoException
The agent executing this operation tries to commit to a mission in the scheme.

Verifications:

Parameters:
mission - the mission being committed to
Throws:
NormativeFailureException - the failure produced if the adoption breaks some regimentation
cartago.CartagoException - some cartago problem

leaveMission

public void leaveMission(java.lang.String mission)
                  throws cartago.CartagoException,
                         MoiseException
The agent executing this operation tries to leave/remove its mission in the scheme

Verifications:

Parameters:
mission - the mission being removed
Throws:
NormativeFailureException - the failure produced if the remove breaks some regimentation
cartago.CartagoException - some cartago problem
MoiseException - some moise inconsistency (the agent is not committed to the mission)

goalAchieved

public void goalAchieved(java.lang.String goal)
                  throws cartago.CartagoException
The agent executing this operation set the goal as achieved by it.

Verifications:

Throws:
cartago.CartagoException

setArgumentValue

public void setArgumentValue(java.lang.String goal,
                             java.lang.String var,
                             java.lang.Object value)
                      throws cartago.CartagoException
The agent executing this operation set a value for a goal argument.

Throws:
cartago.CartagoException

admCommand

public void admCommand(java.lang.String cmd)
                throws cartago.CartagoException,
                       jason.asSyntax.parser.ParseException
Throws:
cartago.CartagoException
jason.asSyntax.parser.ParseException

updateGoalStateObsProp

protected void updateGoalStateObsProp()

getStyleSheetName

protected java.lang.String getStyleSheetName()
Specified by:
getStyleSheetName in class OrgArt

getAsDOM

public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)