org.axiondb.engine.tables
Class TaggedEBCDICTable

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

public class TaggedEBCDICTable
extends BaseFlatfileTable

A disk-resident Fixed Width Flatfile Table.

Example: create external table test1( col1 datatype, col2 datatype, ...) organization(loadtype='taggedebcdic' RecordLength='213', HeaderBytesOffset='24', tagLength='4', minTagCount='1', maxTagCount='48', tagByteCount='0', recordTrailerByteCount='54' FileName='C:/hawaii/stcdb/test/input_data.txt', TagByteCount='2', en='cp037')

Version:
$Revision: 1.6 $ $Date: 2004/08/31 02:34:40 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.axiondb.engine.tables.BaseFlatfileTable
BaseFlatfileTable.BaseFlatfileTableOrganizationContext
 
Field Summary
protected  int _count
           
protected  int _index
           
protected  long _pos
           
static String PROP_ENCODING
           
static String PROP_HEADERBYTESOFFSET
           
static String PROP_MAXTAGCOUNT
           
static String PROP_MINTAGCOUNT
           
static String PROP_RECORDLENGTH
           
static String PROP_RECORDTRAILERBYTECOUNT
           
static String PROP_TAGBYTECOUNT
           
static String PROP_TAGLENGTH
           
 
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
TaggedEBCDICTable(String name, Database db)
           
 
Method Summary
 long getCurrentParsePosition()
           
protected  Row getRowByOffset(int idToAssign, long ptr)
           
 Properties getTableProperties()
          Gets Organization Property.
protected  long ignoreRowsToSkip()
           
protected  void initializeTable()
           
protected  boolean isEndOfRecord(int recLength, int nextChar, RandomAccessFile data)
           
protected  void parseTableProperties(ObjectInputStream in)
           
protected  void renameTableFiles(String oldName, String name)
           
 boolean setTableProperties(Properties props)
          Sets the properties for the given text table this is only called once by create command get executed
protected  void writeHeader(RandomAccessFile dataFile)
           
protected  void writeRow(CharArrayWriter out, Row row)
           
protected  void writeTableProperties(ObjectOutputStream out)
           
 
Methods inherited from class org.axiondb.engine.tables.BaseFlatfileTable
addColumn, addEscapeSequence, applyInserts, applyUpdates, createOrLoadDataFile, fixEscapeSequence, getDataFile, getDefaultDataFileExtension, getLobDir, getRowIterator, isCarriageReturn, isEOF, isNewLine, isNullString, nextLineLength, reloadDataFile, remount, 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.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_HEADERBYTESOFFSET

public static final String PROP_HEADERBYTESOFFSET
See Also:
Constant Field Values

PROP_RECORDLENGTH

public static final String PROP_RECORDLENGTH
See Also:
Constant Field Values

PROP_TAGLENGTH

public static final String PROP_TAGLENGTH
See Also:
Constant Field Values

PROP_MINTAGCOUNT

public static final String PROP_MINTAGCOUNT
See Also:
Constant Field Values

PROP_MAXTAGCOUNT

public static final String PROP_MAXTAGCOUNT
See Also:
Constant Field Values

PROP_RECORDTRAILERBYTECOUNT

public static final String PROP_RECORDTRAILERBYTECOUNT
See Also:
Constant Field Values

PROP_TAGBYTECOUNT

public static final String PROP_TAGBYTECOUNT
See Also:
Constant Field Values

PROP_ENCODING

public static final String PROP_ENCODING
See Also:
Constant Field Values

_pos

protected long _pos

_index

protected int _index

_count

protected int _count
Constructor Detail

TaggedEBCDICTable

public TaggedEBCDICTable(String name,
                         Database db)
                  throws AxionException
Throws:
AxionException
Method Detail

getRowByOffset

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

ignoreRowsToSkip

protected long ignoreRowsToSkip()
                         throws AxionException
Overrides:
ignoreRowsToSkip in class BaseFlatfileTable
Throws:
AxionException

initializeTable

protected void initializeTable()
                        throws AxionException
Overrides:
initializeTable in class BaseFlatfileTable
Throws:
AxionException

getCurrentParsePosition

public long getCurrentParsePosition()

setTableProperties

public boolean setTableProperties(Properties props)
                           throws AxionException
Description copied from class: BaseFlatfileTable
Sets the properties for the given text table this is only called once by create command get executed

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.

Returns:
Set of organization property key names;

parseTableProperties

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

renameTableFiles

protected void renameTableFiles(String oldName,
                                String name)
Overrides:
renameTableFiles in class BaseFlatfileTable

writeTableProperties

protected void writeTableProperties(ObjectOutputStream out)
                             throws AxionException
Overrides:
writeTableProperties 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 out,
                        Row row)
                 throws AxionException
Specified by:
writeRow in class BaseFlatfileTable
Throws:
AxionException

isEndOfRecord

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