|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.AbleObject
com.ibm.able.beans.AbleAbstractImport
com.ibm.able.beans.AbleImport
This class provides Able beans with access to external text-file data.
An AbleImport will read data from a flat text file. It knows how to create an AbleDataSet which is used by its super-class to handle the file I/O and cacheing logic.
The AbleImport object requires the name of a *.dfn meta-data definition file This definition file is used by the AbleDataSet to create field variables and scan the source data, computing min/mean/max values for continuous fields, creating symbol to index mappings for categorical fields, and creating number to index mappings for discrete fields.
An AbleImport can be used to generate an AbleFilter bean which will translate the data in the manner specified in the meta-data definition file.
An example of a *dfn file follows:
fieldName type usage ------------------------------------- field1 continuous input field2 discrete output field3 categorical input field4 continuous ignore field5 continuous inputwhere:
| Field Summary | |
|---|---|
protected java.lang.String |
dataFileName
The dataFileName is the file name with no file extension. |
static java.lang.String |
defaultName
|
static java.util.Vector |
DelimiterChars
A vector of String elements where each element represents a supported character used to delimit fields in the data source. |
static java.util.Vector |
DelimiterNames
A vector of String names for the DelimiterChars Vector. |
| Fields inherited from class com.ibm.able.beans.AbleAbstractImport |
|---|
bufferRecordIndex, bufferSize, computeStatistics, cycleRelative, cycleSize, eof, fieldList, importData, numEpochs, numericData, numFieldsPerRecord, numRecords, outNum, outSym, randomIndices, randomizeData, recordIndex, recordsRead, textData |
| Fields inherited from class com.ibm.able.AbleObject |
|---|
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
| Constructor Summary | |
|---|---|
AbleImport()
Construct a default AbleImport object. |
|
AbleImport(java.lang.String name)
Construct an AbleImport object with specified name. |
|
AbleImport(java.lang.String name,
java.lang.String dataFileName)
Construct an AbleImport object with specified name and file. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDataFileName()
Return the data file name - has no extension. |
java.lang.String |
getDelimiter()
Get the current delimiter value. |
void |
open()
Open the file specfied by dataFileName. |
void |
setDataFileName(java.lang.String newName)
Set the name of the text data file to read. |
void |
setDelimiter(java.lang.String delim)
Set the current delimiter value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.able.AbleBean |
|---|
getComment, getLogger, getName, getParent, getProperties, getProperty, getState, getTraceLogger, init, isChanged, process, removeAllConnections, removeProperty, resumeAll, setChanged, setComment, setLogger, setName, setParent, setProperties, setProperty, setState, setTraceLogger, suspendAll |
| Methods inherited from interface com.ibm.able.AbleEventListener |
|---|
handleAbleEvent |
| Methods inherited from interface com.ibm.able.AbleEventListenerManager |
|---|
addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener |
| Methods inherited from interface com.ibm.able.AbleEventQueueProcessor |
|---|
processNoEventProcessingEnabledSituation |
| Methods inherited from interface com.ibm.able.AblePropertyChangeManager |
|---|
addPropertyChangeListener, addPropertyConnection, getPropertyChangeListeners, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection |
| Methods inherited from interface com.ibm.able.AbleSerializable |
|---|
getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName |
| Field Detail |
public static final java.lang.String defaultName
public static final java.util.Vector DelimiterChars
public static final java.util.Vector DelimiterNames
protected java.lang.String dataFileName
| Constructor Detail |
public AbleImport()
throws AbleException
public AbleImport(java.lang.String name)
throws AbleException
name - A String containing the name used to identify this bean.
public AbleImport(java.lang.String name,
java.lang.String dataFileName)
throws AbleException
name - A String containing the name used to identify this bean.dataFileName - A String containing the name of the file with no file extension.| Method Detail |
public void open()
throws AbleException
open in class AbleAbstractImportAbleExceptionAbleAbstractImport.open()public void setDelimiter(java.lang.String delim)
StringTokenizer.StringTokenizer(String).
public java.lang.String getDelimiter()
public void setDataFileName(java.lang.String newName)
throws AbleException
AbleExceptionpublic java.lang.String getDataFileName()
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||