public class XMLRenderer extends AbstractCommandRenderer implements DTDConstants, TargetDepending
MasterMind and the
Sequencing instance. Command templates from the Sequencer are
completed by passing the command template, which matches the command type,
and an additional template id string to the completion method of this
renderer. In an XML-renderer this id must translate to a
target-element id (so, it must be an IDREF). The appropriate element is
passed to the command after the construction phase. This complete command
class holds an updated version of the target-definition DOM, see
DOMTarget to fullfill this request.| Modifier and Type | Field and Description |
|---|---|
static String |
LAST
ID-references starting with this string are refences to last commands.
|
private Map<String,String> |
recent
A look-up table holding command templates to references.
|
private GlobalGrouping |
set
The parameter cluster.
|
private TargetDefinition |
target
The target definition as a DOM object.
|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORABORT, ABOVE, ABSTRACT, ABSTRACTPROPOSAL, ADDRESS, BELOW, BLOCK, BROADCAST, BROADCASTWITH, BV, CHAINING, CHANGE, CLASS, COMMAND, COMMANDID, COMMANDINIT, COMMANDLAST, COMMANDPARAMETER, COMMANDREF, COMMENT, COMPLETE, CONDITION, CONSTANT, CONSTANTNAME, CONSTANTVALUE, CONSTRAINT, CONSTRAINTOVERDUE, CONSTRAINTRELAX, DATA, DAUGHTER, DEC, DELAY, DELAYMAX, DELAYTIME, DISABLED, DOCPATH, DURATION, ELAPSED, EMAIL, ENABLED, EPOCH, EQUINOX, EXCEPTION, EXCEPTIONDAUGHTER, EXCEPTIONFOR, EXCEPTIONSUCCESSOR, EXCEPTIONTHIS, FALSE, FIELDOFVIEW, FILE, FITSHEADER, FITSHEADERID, FORMATCLASS, FORMATPATTERN, FROM, GAIN, HISTORY, HISTORYCOMPLETE, HISTORYDB, HISTORYMAX, HISTORYREAD, IGNORE, IMAGETYPE, INIT, INSTITUTION, INSTRUMENT, INTERN, KEY, MAX, MERIT, MIN, NOTIFY, OBJECT, OBJECTID, OBJECTNAME, OBSERVSTART, PICK, PICKMERIT, PICKSUCCESS, PMDEC, PMRA, POSITION, RA, RATE, REC, REQUIRES, RETRY, RETRYMAX, SELECT, SENDING, SEQUENCE, SEQUENCETYPE, SET, SETNAME, SETUP, SETUPID, STEP, STEPCOUNTER, STEPWHILE, SUCCESSOR, TARGET, TARGETACCESS, TARGETDB, TARGETNAME, TARGETNAMEPROPOSAL, TARGETREAD, TARGETSUBMITTED, TARGETTYPE, TASK, TASKDONE, TASKID, TEAM, TIMESLOT, TITLE, TO, TRUE, USER, V, VARIABLECONFIG, KEY_CLASS| Constructor and Description |
|---|
XMLRenderer(Map<String,String> prop)
Constructs a new complete command object with the given properties.
|
| Modifier and Type | Method and Description |
|---|---|
CommandEvent |
getFullCommand(String template,
String id,
String parameter,
String init,
Map<String,Object> loop)
Returns a fully qualified command event from a template.
|
GlobalGrouping |
getParameterCluster()
Returns the parameter cluster registered at the renderer.
|
TargetDefinition |
getTarget()
Returns the target as a target dom.
|
void |
registerGlobals(GlobalGrouping cluster)
Registers the parameter cluster to this renderer.
|
void |
registerTarget(TargetDefinition dom)
Uses a parsed target-definition DOM and constructs a new
complete command out of it.
|
createCommandRendereraugment, augment, augment, augment, augment, clone, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String LAST
private TargetDefinition target
private GlobalGrouping set
public void registerTarget(TargetDefinition dom)
registerTarget in interface TargetDependingpublic TargetDefinition getTarget()
getTarget in interface CommandRenderingpublic void registerGlobals(GlobalGrouping cluster)
registerGlobals in interface GlobalDependingpublic GlobalGrouping getParameterCluster()
getParameterCluster in interface CommandRenderingpublic CommandEvent getFullCommand(String template, String id, String parameter, String init, Map<String,Object> loop)
CommandEvent.createCommand(stella.MessageBin) to create a command event
from the template string. If the second string is not equal
null the renderer's target definition is scanned for the unique
map which carries an ID attribute of the given value. Provided that the
command event created is a TargetDependingCommand, this unique
map is than registered at the command. ParameterDepending
commands are treated similaily in that the renderer's parameter set is
queried for the parameter of the given name which is then registered at
the command. It is the command's responsibility to adjust its validity
according to the target map or parameter registered to it. Note that
parameter registering will always occur prior to target registering.
If the generation of the command somehow failes an illegal-argument exception is thrown.
For sequencing files that are changed at run-time, like for error-
handling purposes, a special id LAST may be given. In this case,
the last command reference that was used with that command, or the
command specified after LAST refence is used.
If a command has multiple dependency, the sequence in which they are
resolved starts with InitializerDepending, followed by
ParameterDepending, then TargetDepending and finally
TargetDependingCommand.
getFullCommand in interface CommandRenderingparameter - A comma-separated list of parameter to the commandloop - Paramters from the sequncer (counters etc.)template - The command template, equal the command type.id - An id further specializing the command template.init - A static initializer to the command or null.