ora4mas.nopl
Class GroupBoard

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

public class GroupBoard
extends OrgArt

Artifact to manage a group instance.

Operations (see details in method list below):

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

See Also:
Group

Field Summary
static java.lang.String obsPropParentGroup
           
static java.lang.String obsPropPlay
           
static java.lang.String obsPropSchemes
           
static java.lang.String obsPropSpec
           
static java.lang.String obsPropSubgroups
           
static java.lang.String obsWellFormed
           
 
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
GroupBoard()
           
 
Method Summary
 void addScheme(java.lang.String schId)
          the group starts being responsible for the scheme schId
 void admCommand(java.lang.String cmd)
           
 void adoptRole(java.lang.String role)
          The agent executing this operation tries to adopt a role in the group
 void destroy()
           
 org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
           
static org.w3c.dom.Element getGrAsDOM(Group gr, java.lang.String spec, boolean isWellFormed, java.lang.String owner, Group root, org.w3c.dom.Document document)
           
protected  java.lang.String getStyleSheetName()
           
 void init(java.lang.String osFile, java.lang.String grType, boolean createMonitoring, boolean hasGUI)
          Initialises the group board
 boolean isWellFormed()
           
 void leaveRole(java.lang.String role)
          The agent executing this operation tries to give up a role in the group
 void removeScheme(java.lang.String schId)
           
 void setParentGroup(java.lang.String parentGroupId)
           
 
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

obsPropPlay

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

obsPropSchemes

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

obsPropSubgroups

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

obsPropParentGroup

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

obsWellFormed

public static final java.lang.String obsWellFormed
See Also:
Constant Field Values
Constructor Detail

GroupBoard

public GroupBoard()
Method Detail

init

public void init(java.lang.String osFile,
                 java.lang.String grType,
                 boolean createMonitoring,
                 boolean hasGUI)
          throws ParseException,
                 MoiseException,
                 cartago.OperationException
Initialises the group board

Parameters:
osFile - the organisation specification file (path and file name)
grType - the type of the group (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 grType was not specified
cartago.OperationException - if parentGroupId doesn't exit

destroy

public void destroy()
Overrides:
destroy in class OrgArt

setParentGroup

public void setParentGroup(java.lang.String parentGroupId)
                    throws cartago.OperationException
Throws:
cartago.OperationException

adoptRole

public void adoptRole(java.lang.String role)
The agent executing this operation tries to adopt a role in the group

Parameters:
role - the role being adopted

leaveRole

public void leaveRole(java.lang.String role)
The agent executing this operation tries to give up a role in the group

Parameters:
role - the role being removed/leaved

addScheme

public void addScheme(java.lang.String schId)
the group starts being responsible for the scheme schId


removeScheme

public void removeScheme(java.lang.String schId)

admCommand

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

getStyleSheetName

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

isWellFormed

public boolean isWellFormed()

getAsDOM

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

getGrAsDOM

public static org.w3c.dom.Element getGrAsDOM(Group gr,
                                             java.lang.String spec,
                                             boolean isWellFormed,
                                             java.lang.String owner,
                                             Group root,
                                             org.w3c.dom.Document document)