fmrisc.ProofNavigator.Commands
Class CommandBase

java.lang.Object
  extended by fmrisc.ProofNavigator.Commands.CommandBase
All Implemented Interfaces:
Command
Direct Known Subclasses:
ContextC, DeclarationC, Empty, EnvironmentC, FormulaC, ProofC, ProofCommandBase, Prove, Quit, Read, StateC, TCC, TypeC, ValueC

public abstract class CommandBase
extends java.lang.Object
implements Command

Base class of commands.


Constructor Summary
CommandBase(java.lang.String name)
          construct command with denoted name
 
Method Summary
 java.lang.String getName()
          get name of command
abstract  void printCore(java.io.PrintWriter out)
          Prints text representation on out (without new line termination).
static Command toCommand(org.w3c.dom.Element node)
          Construct command from DOM representation.
 org.w3c.dom.Node toNode(org.w3c.dom.Document document)
          Convert proof command to external representation as a DOM node.
 java.lang.String toString()
          returns string representation of tree
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fmrisc.ProofNavigator.Commands.Command
process
 

Constructor Detail

CommandBase

public CommandBase(java.lang.String name)
construct command with denoted name

Parameters:
name - the name of the command
Method Detail

getName

public java.lang.String getName()
get name of command

Returns:
the command name

toString

public java.lang.String toString()
returns string representation of tree

Overrides:
toString in class java.lang.Object
Returns:
the string representation

printCore

public abstract void printCore(java.io.PrintWriter out)
Prints text representation on out (without new line termination).

Parameters:
out - the stream on which the text is written

toNode

public org.w3c.dom.Node toNode(org.w3c.dom.Document document)
Convert proof command to external representation as a DOM node.

Specified by:
toNode in interface Command
Parameters:
document - the document to which the node belongs.
Returns:
The representation of the proof command as a DOM node of the document. The name of the node is "fmrisc:command" with an attribute name="" where is the value returned by getName().

toCommand

public static Command toCommand(org.w3c.dom.Element node)
Construct command from DOM representation.

Parameters:
node - the DOM representation of the command.
Returns:
the command (null, if an error occured).