simkin
Class XMLExecutable

java.lang.Object
  |
  +--simkin.ExecutableRoot
        |
        +--simkin.XMLElementObject
              |
              +--simkin.XMLExecutable
All Implemented Interfaces:
Executable
Direct Known Subclasses:
ArrayExample, ScriptedDialog, ScriptedDialog

public class XMLExecutable
extends XMLElementObject

This class is a base class for objects which store their data and methods in an XML document

Each instance is associated with an XML document which is loaded on construction.


Constructor Summary
XMLExecutable()
          Default Constructor.
XMLExecutable(java.lang.String location, java.io.InputStream in)
          Constructor taking an input stream containing an XML document
XMLExecutable(java.lang.String location, java.io.Reader in)
          Constructor taking a reader containing an XML document
 
Method Summary
 void load(java.lang.String location, java.io.InputStream in)
          This method causes the XML to be reloaded
 void load(java.lang.String location, java.io.Reader in)
          This method causes the XML to be reloaded
 void save(java.io.OutputStream out)
          Call this method to save the state of the object back to a stream
 void save(java.io.Writer out)
          Call this method to save the state of the object back to a writer
 
Methods inherited from class simkin.XMLElementObject
addElement, containsElement, copyAttributesInto, copyItemsInto, createIterator, createIterator, createXMLElementObject, dump, enumerate, enumerate, equals, findChild, findChild, findChild, getAddIfNotPresent, getAttribute, getAttributes, getData, getElement, getInstanceVariables, getLocation, getSource, getValue, getValueAt, method, setAddIfNotPresent, setAttribute, setData, setElement, setValue, setValueAt, tagName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLExecutable

public XMLExecutable()
Default Constructor.


XMLExecutable

public XMLExecutable(java.lang.String location,
                     java.io.InputStream in)
              throws org.xml.sax.SAXException,
                     java.io.IOException
Constructor taking an input stream containing an XML document

Parameters:
location - location of the document
Throws:
org.xml.sax.SAXException - where there was a syntax error in the XML stream
java.io.IOException - where there was an error loading the stream

XMLExecutable

public XMLExecutable(java.lang.String location,
                     java.io.Reader in)
              throws org.xml.sax.SAXException,
                     java.io.IOException
Constructor taking a reader containing an XML document

Parameters:
location - location of the document
Throws:
org.xml.sax.SAXException - where there was a syntax error in the XML stream
java.io.IOException - where there was an error loading the stream
Method Detail

load

public void load(java.lang.String location,
                 java.io.InputStream in)
          throws org.xml.sax.SAXException,
                 java.io.IOException
This method causes the XML to be reloaded

Parameters:
location - location of the document
in - - stream containing the XML
org.xml.sax.SAXException
java.io.IOException

load

public void load(java.lang.String location,
                 java.io.Reader in)
          throws org.xml.sax.SAXException,
                 java.io.IOException
This method causes the XML to be reloaded

Parameters:
location - location of the document
in - - reader containing the XML
org.xml.sax.SAXException
java.io.IOException

save

public void save(java.io.OutputStream out)
          throws java.io.IOException
Call this method to save the state of the object back to a stream

Throws:
java.io.IOException - if there was an error writing to the stream

save

public void save(java.io.Writer out)
          throws java.io.IOException
Call this method to save the state of the object back to a writer

Throws:
java.io.IOException - if there was an error writing to the writer