org.jSyncManager.API.Conduit.Tools

Class DateBookDBXML


public class DateBookDBXML
extends DLPRecordXML

This is a synchronization JConduit for a XML document from the DateBookDB database. Each element in the records will be a double-quoted String, escaped if necessary.
See Also:
JSXMLDocument, JSXMLElement, DLPRecordXML

Field Summary

static String
RECORDNAME
static String
XMLNAME

Fields inherited from class org.jSyncManager.API.Conduit.Tools.DLPRecordXML

RECORDNAME, XMLNAME

Constructor Summary

DateBookDBXML()
Create new DateBookXML Document with default name and DTD.
DateBookDBXML(InputStreamReader inputfile)
Create new DateBookXMLDocument from InputStreamReader stream.
DateBookDBXML(DateBookRecord rec)
Create new DateBookXML Document with given DateBookRecord.
DateBookDBXML(org.jdom.Document document)
Create new DateBookXML Document with given org.jdom.Document.

Method Summary

JSXMLElement
DBRecordEntry(DateBookRecordEntry rec)
Create an JSXMLElement instance from the given DateBookRecordEntry.
String
getDTD()
Get the complete DTD for this database type.
DateBookRecord
insertRecord(DateBookRecord rec)
Insert DateBookRecord into XML Document.
void
readDocument(InputStreamReader inputfile)
Read JSXMLDocument through InputStreamReader and parse into the JSCSVDocument.

Methods inherited from class org.jSyncManager.API.Conduit.Tools.DLPRecordXML

getDTD, insertRecord, readDocument

Methods inherited from class org.jSyncManager.API.Conduit.Tools.JSXMLDocument

getDTD, readDocument, readDocument, readDocument, readDocument, setDTD, setDocument, writeDocument

Field Details

RECORDNAME

public static String RECORDNAME

XMLNAME

public static String XMLNAME

Constructor Details

DateBookDBXML

public DateBookDBXML()
Create new DateBookXML Document with default name and DTD.

DateBookDBXML

public DateBookDBXML(InputStreamReader inputfile)
            throws org.jdom.JDOMException,
                   IOException
Create new DateBookXMLDocument from InputStreamReader stream.
Parameters:
inputfile - InputStreamReader to parse into document.

DateBookDBXML

public DateBookDBXML(DateBookRecord rec)
Create new DateBookXML Document with given DateBookRecord.
Parameters:
rec - DateBookRecord to create XML record from

DateBookDBXML

public DateBookDBXML(org.jdom.Document document)
Create new DateBookXML Document with given org.jdom.Document.
Parameters:
document - JDOM document to create DateBookXML document from.

Method Details

DBRecordEntry

public JSXMLElement DBRecordEntry(DateBookRecordEntry rec)
Create an JSXMLElement instance from the given DateBookRecordEntry.
Parameters:
rec - DateBookRecordEntry to be parsed and returned as a JSXMLElement.
Returns:
JSXMLElement Element created from DateBookRecordEntry.

getDTD

public String getDTD()
Get the complete DTD for this database type.
Overrides:
getDTD in interface DLPRecordXML
Returns:
String containing complete DTD, delimited by System.getProperty("line.separator")

insertRecord

public DateBookRecord insertRecord(DateBookRecord rec)
Insert DateBookRecord into XML Document.
Parameters:
rec - DateBookRecord input.
Returns:
Return the DateBookRecord for further processing.

readDocument

public void readDocument(InputStreamReader inputfile)
            throws org.jdom.JDOMException,
                   IOException
Read JSXMLDocument through InputStreamReader and parse into the JSCSVDocument.
Overrides:
readDocument in interface JSXMLDocument
Parameters:
inputfile - InputStreamReader input.