org.axiondb.engine.tables
Class DelimitedFlatfileTable

java.lang.Object
  extended byorg.axiondb.event.BaseTableModificationPublisher
      extended byorg.axiondb.engine.tables.BaseTable
          extended byorg.axiondb.engine.tables.BaseDiskTable
              extended byorg.axiondb.engine.tables.BaseFlatfileTable
                  extended byorg.axiondb.engine.tables.DelimitedFlatfileTable
All Implemented Interfaces:
ExternalTable, RowSource, Table

public class DelimitedFlatfileTable
extends BaseFlatfileTable
implements ExternalTable

A disk-resident Delimited Flatfile Table.

Version:
$Revision: 1.8 $ $Date: 2004/09/09 23:47:44 $

Nested Class Summary
 
Nested classes inherited from class org.axiondb.engine.tables.BaseFlatfileTable
BaseFlatfileTable.BaseFlatfileTableOrganizationContext
 
Field Summary
static String PROP_FIELDDELIMITER
           
static String PROP_QUALIFIER
           
 
Fields inherited from class org.axiondb.engine.tables.BaseFlatfileTable
_faultCount, _fileName, _isFirstLineHeader, _lineSep, _maxFaults, _rowsToSkip, context, CR, EOF, FILLER, NL, PROP_FILENAME, PROP_ISFIRSTLINEHEADER, PROP_MAXFAULTS, PROP_RECORDDELIMITER, PROP_ROWSTOSKIP
 
Fields inherited from class org.axiondb.engine.tables.BaseDiskTable
_dataFile, _dbdir, _freeIds, _freeIdsFileName, _modCount, _pidx, _pidxFileName, _rowCount, INVALID_OFFSET
 
Fields inherited from interface org.axiondb.ExternalTable
DELIMITED_TABLE_TYPE, EXTERNAL_DB_TABLE_TYPE, FW_TABLE_TYPE, PROP_LOADTYPE, TAGGED_EBCDIC_TABLE_TYPE
 
Fields inherited from interface org.axiondb.Table
REGULAR_TABLE_TYPE, SYSTEM_TABLE_TYPE
 
Constructor Summary
DelimitedFlatfileTable(String name, Database db)
           
 
Method Summary
protected  String getDefaultDataFileExtension()
           
protected  String getQualifier()
           
protected  int getQualifierLength()
           
protected  Row getRowByOffset(int idToAssign, long ptr)
           
 Properties getTableProperties()
          Gets Organization Property.
protected  boolean isEndOfRecord(int recLength, int nextChar, RandomAccessFile data)
           
protected  boolean isQuoted()
           
protected  void parseTableProperties(ObjectInputStream in)
           
 boolean setTableProperties(Properties props)
          Sets collection of configuration properties for this external table to the given Properties instance.
protected  void writeHeader(RandomAccessFile dataFile)
           
protected  void writeRow(CharArrayWriter buffer, Row row)
           
protected  void writeTableProperties(ObjectOutputStream out)
           
 
Methods inherited from class org.axiondb.engine.tables.BaseFlatfileTable
addColumn, addEscapeSequence, applyInserts, applyUpdates, createOrLoadDataFile, fixEscapeSequence, getDataFile, getLobDir, getRowIterator, ignoreRowsToSkip, initializeTable, isCarriageReturn, isEOF, isNewLine, isNullString, nextLineLength, reloadDataFile, remount, renameTableFiles, trySettingColumn
 
Methods inherited from class org.axiondb.engine.tables.BaseDiskTable
addColumn, addConstraint, appendLongFile, appendLongFile, applyDeletes, applyInserts, applyUpdates, clearDataFileReference, clearMetaFileReference, closeFiles, createOrLoadFreeIdsFile, createOrLoadMetaFile, createOrLoadPidxFile, deleteFile, drop, freeRowId, getCanonicalPath, getMetaFile, getNextRowId, getReadFile, getRootDir, getRow, getRowCount, getTableFile, getWriteFile, initFiles, initializeRowCount, openFile, parseIntFile, parseMetaFile, populateIndex, remount, removeIndex, rename, renameFile, saveIndices, saveIndicesAfterTruncate, setPidx, shutdown, truncate, tryToRemove, updateLongFile, writeFridFile, writeIntFile, writeLongFile, writeMetaFile, writeNameToFile, writePidxFile
 
Methods inherited from class org.axiondb.engine.tables.BaseTable
addIndex, addRow, applyDeletesToIndices, applyInsertsToIndices, applyUpdatesToIndices, checkConstraints, checkConstraints, deleteRow, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraints, getIndexedRows, getIndexForColumn, getIndices, getMatchingRows, getName, getRowIterator, getType, hasColumn, hasDeferredConstraint, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, notifyColumnsOfNewLobDir, readColumns, readConstraints, removeConstraint, setName, setType, toString, truncateIndices, updateRow, writeColumns, writeConstraints
 
Methods inherited from class org.axiondb.event.BaseTableModificationPublisher
addTableModificationListener, getTableModificationListeners, publishEvent, removeTableModificationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.ExternalTable
remount
 
Methods inherited from interface org.axiondb.Table
addColumn, addConstraint, addIndex, addRow, addTableModificationListener, applyDeletes, applyInserts, applyUpdates, drop, freeRowId, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraints, getIndexedRows, getIndexForColumn, getIndices, getMatchingRows, getName, getNextRowId, getRowCount, getRowIterator, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, populateIndex, remount, removeConstraint, removeIndex, removeTableModificationListener, rename, shutdown, truncate, updateRow
 
Methods inherited from interface org.axiondb.RowSource
getRow
 

Field Detail

PROP_FIELDDELIMITER

public static final String PROP_FIELDDELIMITER
See Also:
Constant Field Values

PROP_QUALIFIER

public static final String PROP_QUALIFIER
See Also:
Constant Field Values
Constructor Detail

DelimitedFlatfileTable

public DelimitedFlatfileTable(String name,
                              Database db)
                       throws AxionException
Method Detail

getDefaultDataFileExtension

protected String getDefaultDataFileExtension()
Overrides:
getDefaultDataFileExtension in class BaseFlatfileTable

getQualifier

protected String getQualifier()

getQualifierLength

protected int getQualifierLength()

getRowByOffset

protected Row getRowByOffset(int idToAssign,
                             long ptr)
                      throws AxionException
Specified by:
getRowByOffset in class BaseFlatfileTable
Throws:
AxionException

isQuoted

protected boolean isQuoted()

isEndOfRecord

protected boolean isEndOfRecord(int recLength,
                                int nextChar,
                                RandomAccessFile data)
                         throws IOException
Specified by:
isEndOfRecord in class BaseFlatfileTable
Throws:
IOException

setTableProperties

public boolean setTableProperties(Properties props)
                           throws AxionException
Description copied from interface: ExternalTable
Sets collection of configuration properties for this external table to the given Properties instance. This describe how the data is stored the existing data file.

Specified by:
setTableProperties in interface ExternalTable
Overrides:
setTableProperties in class BaseFlatfileTable
Parameters:
props - Properties for Table
Throws:
AxionException - thrown while setting Properties

getTableProperties

public Properties getTableProperties()
Description copied from interface: ExternalTable
Gets Organization Property.

Specified by:
getTableProperties in interface ExternalTable
Returns:
Set of organization property key names;

parseTableProperties

protected void parseTableProperties(ObjectInputStream in)
                             throws AxionException
Overrides:
parseTableProperties in class BaseDiskTable
Throws:
AxionException

writeHeader

protected void writeHeader(RandomAccessFile dataFile)
                    throws AxionException
Specified by:
writeHeader in class BaseFlatfileTable
Throws:
AxionException

writeRow

protected void writeRow(CharArrayWriter buffer,
                        Row row)
                 throws AxionException
Specified by:
writeRow in class BaseFlatfileTable
Throws:
AxionException

writeTableProperties

protected void writeTableProperties(ObjectOutputStream out)
                             throws AxionException
Overrides:
writeTableProperties in class BaseDiskTable
Throws:
AxionException