com.oroad.stxx.xform
Class JDOMForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended bycom.oroad.stxx.xform.AbstractXMLForm
          extended bycom.oroad.stxx.xform.JDOMForm
All Implemented Interfaces:
java.io.Serializable, XMLForm

public class JDOMForm
extends AbstractXMLForm
implements XMLForm, java.io.Serializable

A form that uses JDOM to store the form information

Author:
Don Brown
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.oroad.stxx.xform.AbstractXMLForm
defaultXML, form, formPath, log, name, phase, schema, schemaNS, vsEnabled, xml
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
JDOMForm()
           
 
Method Summary
 org.jdom.Document getDefaultXML()
          Gets the default xml
 org.jdom.Document getXML()
          Gets the JDOM document
 void loadState(java.io.InputStream in)
          Loads the JDOM document from the inputstream
 void outputXML(java.io.OutputStream out)
          Serializes the XML removing all whitespace and omitting xml declarations
 void prePopulate()
          Called before the form is populated
 void reset()
          Resets the form
 void setDefaultXML(org.w3c.dom.Document doc)
          Sets the default xml
 void setXML(org.jdom.Document xml)
          Sets the JDOM document
 void setXML(org.w3c.dom.Document doc)
          Sets the xml
 
Methods inherited from class com.oroad.stxx.xform.AbstractXMLForm
getForm, getFormPath, getFormValidator, getLog, getName, getPhase, getSchemaNS, getValue, getValue, isInitialized, isViewstateEnabled, reset, save, setForm, setFormPath, setName, setPhase, setSchema, setSchemaNS, setValue, setViewstateEnabled, validate, validate
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.oroad.stxx.xform.XMLForm
getForm, getFormPath, getName, getPhase, getSchemaNS, getValue, getValue, isInitialized, isViewstateEnabled, save, setForm, setFormPath, setName, setPhase, setSchema, setSchemaNS, setValue, setViewstateEnabled, validate
 

Constructor Detail

JDOMForm

public JDOMForm()
Method Detail

prePopulate

public void prePopulate()
Called before the form is populated

Specified by:
prePopulate in interface XMLForm
Overrides:
prePopulate in class AbstractXMLForm

getXML

public org.jdom.Document getXML()
Gets the JDOM document

Returns:
The xml document

setXML

public void setXML(org.jdom.Document xml)
Sets the JDOM document

Parameters:
xml - The new document

setXML

public void setXML(org.w3c.dom.Document doc)
Sets the xml

Specified by:
setXML in interface XMLForm
Specified by:
setXML in class AbstractXMLForm
Parameters:
doc - The default XML

setDefaultXML

public void setDefaultXML(org.w3c.dom.Document doc)
Sets the default xml

Specified by:
setDefaultXML in interface XMLForm
Specified by:
setDefaultXML in class AbstractXMLForm
Parameters:
doc - The default XML

loadState

public void loadState(java.io.InputStream in)
Loads the JDOM document from the inputstream

Specified by:
loadState in interface XMLForm
Specified by:
loadState in class AbstractXMLForm
Parameters:
in - The inputstream

outputXML

public void outputXML(java.io.OutputStream out)
Serializes the XML removing all whitespace and omitting xml declarations

Specified by:
outputXML in interface XMLForm
Specified by:
outputXML in class AbstractXMLForm
Parameters:
out - The outputstream

reset

public void reset()
Resets the form

Specified by:
reset in interface XMLForm
Overrides:
reset in class AbstractXMLForm

getDefaultXML

public org.jdom.Document getDefaultXML()
Gets the default xml

Returns:
The default XML