org.jSyncManager.API.Conduit.Tools

Class JSXMLDocument

Known Direct Subclasses:
DLPRecordXML

public class JSXMLDocument
extends org.jdom.Document

A container for holding an XML representation of a database. This class parses and holds an XML document for use.
See Also:
JSXMLElement, DLPRecordXML

Constructor Summary

JSXMLDocument()
Create new instance of JSXMLDocument.
JSXMLDocument(InputStreamReader inputfile)
Scan through org.jdom.Document document.
JSXMLDocument(String name)
Scan through org.jdom.Document document.
JSXMLDocument(URL url)
Scan through org.jdom.Document document.
JSXMLDocument(URL url, boolean validate)
Scan through org.jdom.Document document.

Method Summary

String
getDTD()
Retrieve the DTD for the current element.
void
readDocument(InputStreamReader inputfile)
Read document from InputStreadReader and parse.
void
readDocument(InputStreamReader inputfile, boolean validate)
Read document from InputStreadReader and parse.
void
readDocument(URL url)
Read document from InputStreadReader and parse.
void
readDocument(URL url, boolean validate)
Read document from InputStreadReader and parse.
void
setDTD(String dtdname)
Set the DTD name from a string value, and create the DTD for the current element.
void
setDocument(org.jdom.Document document)
Setter for property document.
void
writeDocument(OutputStreamWriter outputfile)
Write out org.jdom.Document document to the given OutputStreamWriter stream.

Constructor Details

JSXMLDocument

public JSXMLDocument()
Create new instance of JSXMLDocument.

JSXMLDocument

public JSXMLDocument(InputStreamReader inputfile)
            throws JDOMException,
                   IOException
Scan through org.jdom.Document document.
Parameters:
inputfile - InputStreamReader to parse document from.

JSXMLDocument

public JSXMLDocument(String name)
Scan through org.jdom.Document document.
Parameters:
name - New String valuename of element

JSXMLDocument

public JSXMLDocument(URL url)
            throws JDOMException,
                   IOException
Scan through org.jdom.Document document.
Parameters:
url - URL object to parse document from.

JSXMLDocument

public JSXMLDocument(URL url,
                     boolean validate)
            throws JDOMException,
                   IOException
Scan through org.jdom.Document document.
Parameters:
url - URL object to parse document from.

Method Details

getDTD

public String getDTD()
Retrieve the DTD for the current element.
Returns:
String DTD statement.

readDocument

public void readDocument(InputStreamReader inputfile)
            throws org.jdom.JDOMException,
                   IOException
Read document from InputStreadReader and parse.
Parameters:
inputfile - InputStreamReader to parse document from.

readDocument

public void readDocument(InputStreamReader inputfile,
                         boolean validate)
            throws org.jdom.JDOMException,
                   IOException
Read document from InputStreadReader and parse.
Parameters:
inputfile - InputStreamReader to parse document from.

readDocument

public void readDocument(URL url)
            throws org.jdom.JDOMException,
                   IOException
Read document from InputStreadReader and parse.
Parameters:
url - InputStreamReader to parse document from.

readDocument

public void readDocument(URL url,
                         boolean validate)
            throws org.jdom.JDOMException,
                   IOException
Read document from InputStreadReader and parse.
Parameters:
url - InputStreamReader to parse document from.
validate - true to validate, false otherwise.

setDTD

public void setDTD(String dtdname)
Set the DTD name from a string value, and create the DTD for the current element.
Parameters:
dtdname - String value of name of the DTD element.

setDocument

public void setDocument(org.jdom.Document document)
Setter for property document.
Parameters:
document - New value of property document.

writeDocument

public void writeDocument(OutputStreamWriter outputfile)
            throws java.io.IOException
Write out org.jdom.Document document to the given OutputStreamWriter stream.
Parameters:
outputfile - OutputStreamWriter to stream the output to.