de.goerntkai.scot.app.document
Class SCoTCommando

java.lang.Object
  extended byde.goerntkai.scot.app.document.SCoTCommando
All Implemented Interfaces:
ISCoTComponent
Direct Known Subclasses:
EntityCommando, SimpleCommando

public abstract class SCoTCommando
extends java.lang.Object
implements ISCoTComponent

A SCoTCommando is content which HTML representation is an inline tag or an entity like  .

SCoTCommando holds the parameters given with the commando and parses the commando string. A class which inherits from SCoTCommando must implement NewCommando(String commando) which calls super(commando).

Version:
$Id: $
Author:
Kai Görnt

Constructor Summary
SCoTCommando(java.lang.String commando)
          This constructor parses the given commando.
 
Method Summary
 org.w3c.dom.Node getCommandoAsHTML(org.w3c.dom.Document doc, int index)
          Returns the given subcommando as its HTML representation.
 java.lang.String getParameter(int index)
          Returns the parameter of the given index.
abstract  org.w3c.dom.Node toHTML(org.w3c.dom.Document doc)
          Returns the HTML representation of the commando.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCoTCommando

public SCoTCommando(java.lang.String commando)

This constructor parses the given commando. The commando given must have the format <commando> ::= {<parameter>[; <parameter>]*}.

Parameters:
commando - the commando string as found in the SCoT document
Method Detail

getParameter

public java.lang.String getParameter(int index)

Returns the parameter of the given index. If the index is not in the range of this.parameters[], null will be returned.

Parameters:
index - the number of the parameter to return
Returns:
parameters[index] or null

getCommandoAsHTML

public org.w3c.dom.Node getCommandoAsHTML(org.w3c.dom.Document doc,
                                          int index)

Returns the given subcommando as its HTML representation. This is only for use with subcommandos.

Parameters:
doc - the parent document
index - the number of the commando to return
Returns:
commando[index] or null

toHTML

public abstract org.w3c.dom.Node toHTML(org.w3c.dom.Document doc)

Returns the HTML representation of the commando. Uses the parent document for creating the node.

Specified by:
toHTML in interface ISCoTComponent
Parameters:
doc - the parent document
Returns:
the HTML representation


© 2004 by Kai Görnt