org.jSyncManager.API.Protocol.Util.StdApps
Class MailDBXML
java.lang.Object
|
+--org.jdom.Document
|
+--org.jSyncManager.API.Protocol.Util.JSXMLDocument
|
+--org.jSyncManager.API.Protocol.Util.DLPRecordXML
|
+--org.jSyncManager.API.Protocol.Util.StdApps.MailDBXML
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class MailDBXML
- extends DLPRecordXML
This is a synchronization JConduit for ax XML document from the MailDB database.
Each element in the record will be a double-quoted String, escaped if necessary.
Format of a PalmOS mail record
Message Date/time
(2 bytes for date, one for hours, and one for minutes)
Flags (1 byte)
Subject (optional)
From (optional)
To (optional)
CC (optional)
BCC (optional)
ReplyTo (optional)
SentTo (optional)
Message Body
- Version:
- $Revision: 1.11 $
- Author:
- David A. Bartmess <dingodave@edingo.net>
Last modified by: $Author: yaztromo $ on $Date: 2003/05/08 04:34:22 $.
- See Also:
JSXMLDocument
,
JSXMLElement
,
JSXMLDate
,
DLPRecordXML
, Serialized Form
Fields inherited from class org.jdom.Document |
content, docType |
Constructor Summary |
MailDBXML()
Create new JSXMLDocument with default name and MailDB DTD entity. |
MailDBXML(java.io.InputStreamReader inputfile)
Create new MailDBScanner with InputStreamReader stream input. |
MailDBXML(JSXMLDocument document)
Create new JSXMLDocument with given JSXMLDocument. |
MailDBXML(MailRecord rec)
Create new JSXMLDocument with given MailRecord. |
Methods inherited from class org.jdom.Document |
addContent, addContent, clone, detachRootElement, equals, getContent, getContent, getDocType, getRootElement, hashCode, hasRootElement, removeContent, removeContent, setContent, setDocType, setRootElement, toString |
Methods inherited from class java.lang.Object |
, finalize, getClass, notify, notifyAll, wait, wait, wait |
XMLNAME
public static java.lang.String XMLNAME
RECORDNAME
public static java.lang.String RECORDNAME
record
MailRecord record
MailDBXML
public MailDBXML()
- Create new JSXMLDocument with default name and MailDB DTD entity.
MailDBXML
public MailDBXML(MailRecord rec)
- Create new JSXMLDocument with given MailRecord.
- Parameters:
rec
- MailRecord
MailDBXML
public MailDBXML(JSXMLDocument document)
- Create new JSXMLDocument with given JSXMLDocument.
- Parameters:
document
- The JSXMLDocument to be read and input.
MailDBXML
public MailDBXML(java.io.InputStreamReader inputfile)
throws org.jdom.JDOMException,
java.io.IOException
- Create new MailDBScanner with InputStreamReader stream input.
- Parameters:
inputfile
- InputStreamReader- Throws:
org.jdom.JDOMException
- JDOMException thrown.java.io.IOException
- IOException thrown.
insertRecord
public MailRecord insertRecord(MailRecord rec)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- Insert MailRecord into XML Document.
- Parameters:
rec
- MailRecord input.- Returns:
- Return the MailRecord for further processing.
getDTD
public java.lang.String getDTD()
- Get the complete DTD for this database type.
- Overrides:
getDTD
in class DLPRecordXML
- Returns:
- String containing complete DTD, delimited by System.Properties.line.separator
readDocument
public void readDocument(java.io.InputStreamReader inputfile)
throws org.jdom.JDOMException,
java.io.IOException
- Read JSXMLDocument through InputStreamReader and parse into XML Document.
- Overrides:
readDocument
in class JSXMLDocument
- Parameters:
inputfile
- InputStreamReader input.- Throws:
org.jdom.JDOMException
- JDOMException thrown.java.io.IOException
- IOException thrown.
readElement_jSyncManagerMailRecord
void readElement_jSyncManagerMailRecord(JSXMLElement element)
- Parse JSXMLElement element into Document
- Parameters:
element
- JSXMLElement to be parsed and inserted.
Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.