sk.robotics.rlcs.web.editor
Class BehaviourDesc

java.lang.Object
  extended by sk.robotics.rlcs.web.editor.BehaviourDesc

public class BehaviourDesc
extends java.lang.Object

Information about a behaviour (group of agents). Objects of this class are loaded from XML config, they are never created in any other way.


Nested Class Summary
static class BehaviourDesc.ParamDesc
           
 
Field Summary
 org.jdom.Element agents
          Array of agent configs, in XML representation.
 java.lang.String description
          HTML formatted description of the behaviour.
 java.lang.String name
          Behaviour name.
 BehaviourDesc.ParamDesc[] params
          Parameters descriptions, types, and default values.
 
Constructor Summary
BehaviourDesc()
           
 
Method Summary
 boolean allowAdd()
           
 Agent.Cfg[] generateAgentConfigs(java.util.Map<java.lang.String,java.lang.Object> paramValues)
          Genarate array of agent config object, with filled parameter values.
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
 BehaviourDesc.ParamDesc getParamDesc(java.lang.String paramName)
          Get ParamDesc object for a parameter.
 java.util.Collection<java.lang.String> getParamNames()
          Get list of parameters, found in agents.
 void init()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Behaviour name. Used for identification, as well as for informative purposes, so it must be unique, but should be human readable.


description

public java.lang.String description
HTML formatted description of the behaviour.


agents

public org.jdom.Element agents
Array of agent configs, in XML representation. The configs are parametrized, with parameters denoted as %x%. Use generateAgentConfigs method, passing values of the parameters, to get array of agent config objects.


params

public BehaviourDesc.ParamDesc[] params
Parameters descriptions, types, and default values.

Constructor Detail

BehaviourDesc

public BehaviourDesc()
Method Detail

init

public void init()

getParamDesc

public BehaviourDesc.ParamDesc getParamDesc(java.lang.String paramName)
Get ParamDesc object for a parameter.


getParamNames

public java.util.Collection<java.lang.String> getParamNames()
Get list of parameters, found in agents.


generateAgentConfigs

public Agent.Cfg[] generateAgentConfigs(java.util.Map<java.lang.String,java.lang.Object> paramValues)
Genarate array of agent config object, with filled parameter values.


getDisplayName

public java.lang.String getDisplayName()

getDescription

public java.lang.String getDescription()

allowAdd

public boolean allowAdd()