org.axiondb.engine.tables
Class DelimitedFlatfileTable
java.lang.Object
org.axiondb.event.BaseTableModificationPublisher
org.axiondb.engine.tables.AbstractBaseTable
org.axiondb.engine.tables.BaseTable
org.axiondb.engine.tables.BaseDiskTable
org.axiondb.engine.tables.BaseFlatfileTable
org.axiondb.engine.tables.DelimitedFlatfileTable
- All Implemented Interfaces:
- ExternalTable, RowSource, Table
public class DelimitedFlatfileTable
- extends BaseFlatfileTable
A disk-resident Delimited Flatfile Table
.
TODO: Support for multiple delimiter for field and record
TODO: Support for treating consecutive delimiter as one
- Version:
- $Revision: 1.18 $ $Date: 2006/01/10 21:02:36 $
Fields inherited from class org.axiondb.engine.tables.BaseFlatfileTable |
_fileName, _isFirstLineHeader, _lineSep, _maxFaults, _rowsToSkip, context, EOF, FILLER, PROP_FILENAME, PROP_ISFIRSTLINEHEADER, PROP_MAXFAULTS, PROP_RECORDDELIMITER, PROP_ROWSTOSKIP |
Fields inherited from class org.axiondb.engine.tables.BaseDiskTable |
_dataFile, _dbdir, _freeIds, _readOnly, _rowCount, CURRENT_META_VERSION, FRID_FILE_EXT, FS, INDICES_DIR_NAME, INVALID_OFFSET, META_FILE_EXT, PIDX_FILE_EXT, SEQ_FILE_EXT, TYPE_FILE_EXT |
Fields inherited from interface org.axiondb.ExternalTable |
COLUMNS_ARE_CASE_SENSITIVE, DELIMITED_TABLE_TYPE, EXTERNAL_DB_TABLE_TYPE, FW_TABLE_TYPE, PROP_CATALOG, PROP_CREATE_IF_NOT_EXIST, PROP_DB, PROP_LOADTYPE, PROP_ORDERBY, PROP_REMOTETABLE, PROP_SCHEMA, PROP_VENDOR, PROP_WHERE, TAGGED_EBCDIC_TABLE_TYPE |
Methods inherited from class org.axiondb.engine.tables.BaseFlatfileTable |
addColumn, addEscapeSequence, createOrLoadDataFile, createOrLoadDataFile, evaluateForNull, fixEscapeSequence, getDataFile, getLobDir, ignoreRowsToSkip, initializeTable, isEOF, isNullString, nextLineLength, reloadFilesAfterTruncate, remount, renameTableFiles, trySettingColumn |
Methods inherited from class org.axiondb.engine.tables.BaseDiskTable |
addColumn, addConstraint, applyDeletes, applyInserts, applyUpdates, checkpoint, clearDataFileReference, closeFiles, createOrLoadFreeIdsFile, drop, freeRowId, getInputStream, getNextRowId, getOutputStream, getPidxList, getRootDir, getRow, getRowCount, getRowIterator, getTableFile, initFiles, initializeRowCount, isReadOnly, loadOrMigrateMetaFile, migrate, parsePidxFile, populateIndex, remount, removeIndex, rename, resetLobColumns, saveIndicesAfterTruncate, setSequence, shutdown, truncate, tryToRemove, writeFridFile, writeMetaFile, writeNameToFile |
Methods inherited from class org.axiondb.engine.tables.BaseTable |
addIndex, addRow, applyDeletesToIndices, applyInsertsToIndices, applyUpdatesToIndices, clearCache, deleteRow, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraint, getConstraints, getIndexedRows, getIndexedRows, getIndexForColumn, getIndices, getName, getRowIterator, getSequence, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, notifyColumnsOfNewLobDir, readColumns, readConstraints, recreateIndices, removeConstraint, setName, setType, toString, truncateIndices, updateRow, writeColumns, writeConstraints |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.axiondb.Table |
addColumn, addConstraint, addIndex, addRow, addTableModificationListener, applyDeletes, applyInserts, applyUpdates, checkpoint, deleteRow, drop, freeRowId, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraint, getConstraints, getIndexedRows, getIndexedRows, getIndexForColumn, getIndices, getMatchingRows, getName, getNextRowId, getRowCount, getRowIterator, getSequence, getTableModificationListeners, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, migrate, populateIndex, remount, removeConstraint, removeIndex, removeTableModificationListener, rename, setDeferAllConstraints, setSequence, shutdown, truncate, updateRow |
PROP_FIELDDELIMITER
public static final java.lang.String PROP_FIELDDELIMITER
- See Also:
- Constant Field Values
PROP_QUALIFIER
public static final java.lang.String PROP_QUALIFIER
- See Also:
- Constant Field Values
DelimitedFlatfileTable
public DelimitedFlatfileTable(java.lang.String name,
Database db)
throws AxionException
- Throws:
AxionException
getDefaultDataFileExtension
protected java.lang.String getDefaultDataFileExtension()
- Overrides:
getDefaultDataFileExtension
in class BaseFlatfileTable
getQualifier
protected java.lang.String getQualifier()
getQualifierLength
protected int getQualifierLength()
getRowByOffset
protected Row getRowByOffset(int idToAssign,
long ptr)
throws AxionException
- Specified by:
getRowByOffset
in class BaseDiskTable
- Throws:
AxionException
isQuoted
protected boolean isQuoted()
isEndOfRecord
protected boolean isEndOfRecord(int recLength,
int nextChar,
BufferedDataInputStream data)
throws java.io.IOException
- Specified by:
isEndOfRecord
in class BaseFlatfileTable
- Throws:
java.io.IOException
loadExternalTable
public boolean loadExternalTable(java.util.Properties props)
throws AxionException
- Description copied from class:
BaseFlatfileTable
- Loads external data using the given properties table - should be called only once
by the table factory.
- Specified by:
loadExternalTable
in interface ExternalTable
- Overrides:
loadExternalTable
in class BaseFlatfileTable
- Parameters:
props
- Properties for Table
- Throws:
AxionException
- thrown while setting Properties
getTableProperties
public java.util.Properties getTableProperties()
- Description copied from interface:
ExternalTable
- Gets Organization Property.
- Returns:
- Set of organization property key names;
parseTableProperties
protected void parseTableProperties(java.io.ObjectInputStream in)
throws AxionException
- Overrides:
parseTableProperties
in class BaseDiskTable
- Throws:
AxionException
writeHeader
protected void writeHeader(BufferedDataOutputStream dataFile)
throws AxionException
- Specified by:
writeHeader
in class BaseFlatfileTable
- Throws:
AxionException
writeRow
protected void writeRow(BufferedDataOutputStream buffer,
Row row)
throws AxionException
- Specified by:
writeRow
in class BaseDiskTable
- Throws:
AxionException
writeTableProperties
protected void writeTableProperties(java.io.ObjectOutputStream out)
throws AxionException
- Overrides:
writeTableProperties
in class BaseDiskTable
- Throws:
AxionException
isNewLine
protected boolean isNewLine(int nextChar)