|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.AbstractCommandRenderer
stella.xml.XMLRenderer
public class XMLRenderer
The interlink between the 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
static String |
LAST
ID-references starting with this string are refences to last commands. |
private Map |
recent
A look-up table holding command templates to references. |
private ParameterClustering |
set
The parameter cluster. |
private TargetDefinition |
target
The target definition as a DOM object. |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
XMLRenderer(Map prop)
Constructs a new complete command object with the given properties. |
|
| Method Summary | |
|---|---|
CommandEvent |
getFullCommand(String template,
String id,
String parameter,
String init,
Map<String,Object> loop)
Returns a fully qualified command event from a template. |
ParameterClustering |
getParameterCluster()
Returns the parameter cluster registered at the renderer. |
TargetDefinition |
getTarget()
Returns the target as a target dom. |
void |
registerCluster(ParameterClustering 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. |
| Methods inherited from class stella.AbstractCommandRenderer |
|---|
createCommandRenderer |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, 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, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, 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, stringProperties |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.Initializable |
|---|
init |
| Field Detail |
|---|
public static final String LAST
private TargetDefinition target
private ParameterClustering set
private Map recent
| Constructor Detail |
|---|
public XMLRenderer(Map prop)
| Method Detail |
|---|
public void registerTarget(TargetDefinition dom)
registerTarget in interface TargetDependingpublic TargetDefinition getTarget()
getTarget in interface CommandRenderingpublic void registerCluster(ParameterClustering cluster)
registerCluster in interface ClusterDependingpublic ParameterClustering getParameterCluster()
getParameterCluster in interface CommandRendering
public 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||