jSyncManager

org.jSyncManager.API.Protocol.Util.StdApps
Class DateBookDBCSV

java.lang.Object
  |
  +--org.jSyncManager.API.Protocol.Util.JSCSVDocument
        |
        +--org.jSyncManager.API.Protocol.Util.DLPRecordCSV
              |
              +--org.jSyncManager.API.Protocol.Util.StdApps.DateBookDBCSV

public class DateBookDBCSV
extends DLPRecordCSV

This is a synchronization JConduit for a CSV document from the DateBookDB database.

The records are repeated in the case of the record.hasExceptions(), because the CSV document cannot be more than 2-dimensional. Therefore, the complete record is repeated for each exception.

When the document is read into the DateBookCSV object, a check is made on the next record through the exceptionno column, to see if the next record should be included as an exception within the first record of its type. If the exceptionno column is 0, a new record is begun.

Version:
$Revision: 1.12 $
Author:
David A. Bartmess <dingodave@edingo.net>
Last modified by: $Author: yaztromo $ on $Date: 2003/05/08 04:34:22 $.
See Also:
JSCSVCell, JSCSVDocument, DLPRecordCSV

Field Summary
static java.lang.String CSVNAME
          Name of CSV record type.
 DateBookRecord record
          Transient copy of DateBookRecord input.
 
Fields inherited from class org.jSyncManager.API.Protocol.Util.JSCSVDocument
DATATYPE_ROW, DLPRECORD_COLS, headerrows, TITLE_ROW
 
Constructor Summary
DateBookDBCSV()
          Create new default, empty DateBookDBCSV
DateBookDBCSV(DateBookRecord rec)
          Create new DateBookDBCSV with DateBookRecord input.
DateBookDBCSV(java.io.File document)
          Create new DateBookDBSCSV from File document.
DateBookDBCSV(java.io.InputStreamReader inputfile)
          Create new DateBookDBCSV with InputStreamReader stream input.
 
Method Summary
 void insertRecord(DateBookRecord rec)
          Insert record into the CSV document.
 int insertTitles(DateBookRecord rec)
          Insert titles columns from the DateBookRecord.
 int insertTypes(DateBookRecord rec)
          Insert column data types.
 void readDocument(java.io.InputStreamReader inputfile)
          Read JSCSVDocument document contents into the CSV document.
 
Methods inherited from class org.jSyncManager.API.Protocol.Util.DLPRecordCSV
insertRecord, insertTitles, insertTypes, readDocument
 
Methods inherited from class org.jSyncManager.API.Protocol.Util.JSCSVDocument
elementAt, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, getCell, getDocument, getHeaderrows, getReader, getRowNo, getSeparator, getValue, isShowtitles, parse, parse, parse, parse, parseRow, parseTitleRow, parseTypeRow, readBooleanCell, readByteArrayCell, readByteCell, readCalendarCell, readCharArrayCell, readCharCell, readDoubleArrayCell, readDoubleCell, readFloatArrayCell, readFloatCell, readIntArrayCell, readIntCell, readLongArrayCell, readLongCell, readStringArrayCell, readStringCell, setDocument, setElementAt, setElementAt, setHeaderrows, setReader, setReader, setReader, setSeparator, setShowtitles, writeDataRow, writeDocument, writeDocument
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSVNAME

public static java.lang.String CSVNAME
Name of CSV record type.

record

public transient DateBookRecord record
Transient copy of DateBookRecord input.
Constructor Detail

DateBookDBCSV

public DateBookDBCSV()
Create new default, empty DateBookDBCSV

DateBookDBCSV

public DateBookDBCSV(DateBookRecord rec)
Create new DateBookDBCSV with DateBookRecord input.
Parameters:
rec - DateBookRecord

DateBookDBCSV

public DateBookDBCSV(java.io.File document)
              throws java.io.IOException
Create new DateBookDBSCSV from File document.
Parameters:
document - File input.
Throws:
java.io.IOException - IOException thrown.

DateBookDBCSV

public DateBookDBCSV(java.io.InputStreamReader inputfile)
              throws java.io.IOException
Create new DateBookDBCSV with InputStreamReader stream input.
Parameters:
inputfile - InputStreamReader input stream.
Throws:
java.io.IOException - IOException thrown.
Method Detail

insertTypes

public int insertTypes(DateBookRecord rec)
Insert column data types.
Parameters:
rec - DateBookRecord input.
Returns:
Number of columns in the record.

insertTitles

public int insertTitles(DateBookRecord rec)
Insert titles columns from the DateBookRecord.
Parameters:
rec - DateBookRecord input.
Returns:
Number of columns in the record.

insertRecord

public void insertRecord(DateBookRecord rec)
Insert record into the CSV document.
Parameters:
rec - DateBookRecord input.

readDocument

public void readDocument(java.io.InputStreamReader inputfile)
                  throws java.io.IOException
Read JSCSVDocument document contents into the CSV document.
Overrides:
readDocument in class DLPRecordCSV
Parameters:
inputfile - InputStreamReader stream input.
Throws:
java.io.IOException - IOException thrown.

jSyncManager

Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.