org.jSyncManager.API.Conduit.Tools

Class AddressDBCSV


public class AddressDBCSV
extends DLPRecordCSV

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

Each "cell" in the record will be a double-quoted String, escaped if necessary.

The output CSV document will be headed by a row containing the data type indicators, and possibly a title name row.

See Also:
JSCSVCell, JSCSVDocument, DLPRecordCSV

Field Summary

static String
CSVNAME
Name of the CSV record type.
AddressRecord
record
AddressRecord for this CSV conversion.

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

DATATYPE_ROW, DLPRECORD_COLS, TITLE_ROW

Constructor Summary

AddressDBCSV()
Create new default, empty AddressDBCSV
AddressDBCSV(File document)
Create new AddressDBCSV from File.
AddressDBCSV(InputStreamReader inputfile)
Create new AddressDBCSV with InputStreamReader stream input.
AddressDBCSV(AddressRecord rec)
Create new AddressDBCSV with AddressRecord given.

Method Summary

void
insertRecord(AddressRecord rec)
Insert record into CSV row
int
insertTitles(AddressRecord rec)
Insert title row into document
int
insertTypes(AddressRecord rec)
Insert column types from input AddressRecord for CSV conversion and output.
void
readDocument(InputStreamReader inputfile)
Read the InputStreadReader input and parse the contents into a JSCSVDocument document.

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

insertRecord, insertTitles, insertTypes, readDocument, readDocument

Methods inherited from class org.jSyncManager.API.Conduit.Tools.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, readDocument, readDoubleArrayCell, readDoubleCell, readFloatArrayCell, readFloatCell, readIntArrayCell, readIntCell, readLongArrayCell, readLongCell, readStringArrayCell, readStringCell, setDocument, setElementAt, setElementAt, setHeaderrows, setReader, setReader, setReader, setSeparator, setShowtitles, writeDataRow, writeDocument, writeDocument

Field Details

CSVNAME

public static String CSVNAME
Name of the CSV record type.

record

public AddressRecord record
AddressRecord for this CSV conversion.

Constructor Details

AddressDBCSV

public AddressDBCSV()
Create new default, empty AddressDBCSV

AddressDBCSV

public AddressDBCSV(File document)
            throws java.io.IOException
Create new AddressDBCSV from File.
Parameters:
document - CSV Document file

AddressDBCSV

public AddressDBCSV(InputStreamReader inputfile)
            throws java.io.IOException
Create new AddressDBCSV with InputStreamReader stream input.
Parameters:
inputfile - InputStreamReader input

AddressDBCSV

public AddressDBCSV(AddressRecord rec)
Create new AddressDBCSV with AddressRecord given.
Parameters:
rec - AddressRecord

Method Details

insertRecord

public void insertRecord(AddressRecord rec)
Insert record into CSV row
Parameters:
rec - AddressRecord

insertTitles

public int insertTitles(AddressRecord rec)
Insert title row into document
Parameters:
rec - AddressRecord
Returns:
Number of columns in titles

insertTypes

public int insertTypes(AddressRecord rec)
Insert column types from input AddressRecord for CSV conversion and output.
Parameters:
rec - AddressRecord input
Returns:
Number of columns in record

readDocument

public void readDocument(InputStreamReader inputfile)
            throws java.io.IOException
Read the InputStreadReader input and parse the contents into a JSCSVDocument document.
Overrides:
readDocument in interface DLPRecordCSV
Parameters:
inputfile - InputStreamReader