|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.datasource.DataCollection
edu.unh.sdb.datasource.DataSource
edu.unh.sdb.datasource.PhysicalDataSource
edu.unh.sdb.datasource.TextFileDataSource
public class TextFileDataSource
This class will read from a file of numeric ASCII data, providing an n-dimensional datasource view of that file. At the moment, it should only be used for small files, since it reads the entire file into an array.
Field Summary | |
---|---|
protected java.io.FileInputStream |
dataFile
|
protected java.io.StreamTokenizer |
dataTokens
|
protected Datum[] |
theData
|
Fields inherited from class edu.unh.sdb.datasource.PhysicalDataSource |
---|
BIG_ENDIAN, bufferBounds, bufferDimension, bufferSteps, byteBuffers, directMemoryLimit, endian, LITTLE_ENDIAN, maxBufferSize, maxGapSize, readCounter, readLength, url |
Fields inherited from class edu.unh.sdb.datasource.DataSource |
---|
fdlDescriptor, isActivated, name, wsName |
Fields inherited from class edu.unh.sdb.datasource.DataCollection |
---|
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc |
Constructor Summary | |
---|---|
TextFileDataSource(java.lang.String name,
RecordDescriptor recordDesc,
ISBounds ISBounds,
AxisOrdering ordering,
java.lang.String URL)
|
Method Summary | |
---|---|
void |
activate()
Reads the contents of the file into an array. |
void |
datum(Datum dtm,
IndexSpaceID did)
Return by reference the Datum corresponding to the given IndexSpaceID. |
void |
datum(Datum dtm,
IndexSpaceID did,
FieldIDMapper mp)
Get the Datum and fill its values in the passed Datum at positions specified by the corresponding FieldIDMapper. |
void |
datum(Datum dtm,
IndexSpaceID did,
RecordSpec recSpec)
Get the Datum and fill its values in the passed Datum at positions specified by the corresponding RecordSpec. |
Datum |
datum(IndexSpaceID did)
Return the Datum corresponding to the given IndexSpaceID. |
Datum |
datum(IndexSpaceID did,
RecordSpec spec)
Return the Datum corresponding to the given IndexSpaceID. |
void |
deactivate()
Releases the datum array. |
static void |
main(java.lang.String[] args)
|
void |
subblock(DataBlock theBlock,
ISBounds dstBounds,
ISBounds srcBounds)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
void |
subblock(DataBlock theBlock,
ISBounds dstBounds,
ISBounds srcBounds,
FieldIDMapper mp)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
void |
subblock(DataBlock theBlock,
ISBounds dstBounds,
ISBounds srcBounds,
RecordSpec rs)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
DataBlock |
subblock(FloatDatum[] data,
ISBounds srcdb)
|
DataBlock |
subblock(ISBounds srcdb)
Returns a spatial subset of the DataSource as delimited by the ISBounds argument. |
DataSource |
subset(ISBounds db)
|
DataSource |
subset(RecordDescriptor rd)
|
DataSource |
subset(RecordDescriptor rd,
ISBounds db)
|
java.lang.String |
toString()
Print the data members of the DataSource in an easy to read fashion. |
Methods inherited from class edu.unh.sdb.datasource.PhysicalDataSource |
---|
allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, deleteBuffer, deleteBuffer, deleteBuffers, equals, getBuffer, getBuffer, getBufferSize, getBufferSize, getByteOrder, getDataFileString, getMaxBufferSize, getReadCounter, getReadLength, getURL, initializeBuffers, isBigEndian, makeBestBuffer, resetReadCounter, setBufferByteOrder, setMaxBufferSize, setMaxGapSize, toString |
Methods inherited from class edu.unh.sdb.datasource.DataSource |
---|
checkActivated, clearCache, copyBestID, create, create, create, createRemote, createRemote, createRemoteClient, createRemoteClient, createRemoteDataSource, createRemoteDataSource, createRemoteDataSourceUDP, createRemoteUDP, createRemoteUDP, dumpData, getName, getValues, isActivated |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.io.StreamTokenizer dataTokens
protected Datum[] theData
protected java.io.FileInputStream dataFile
Constructor Detail |
---|
public TextFileDataSource(java.lang.String name, RecordDescriptor recordDesc, ISBounds ISBounds, AxisOrdering ordering, java.lang.String URL)
Method Detail |
---|
public void activate()
activate
in class DataSource
public void deactivate()
deactivate
in class PhysicalDataSource
public Datum datum(IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public Datum datum(IndexSpaceID did, RecordSpec spec)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum dtm, IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum dtm, IndexSpaceID did, FieldIDMapper mp)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum dtm, IndexSpaceID did, RecordSpec recSpec)
datum
in interface Indexable
datum
in class DataCollection
public void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds)
subblock
in interface Indexable
subblock
in class PhysicalDataSource
public void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper mp)
subblock
in interface Indexable
subblock
in class PhysicalDataSource
public void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds, RecordSpec rs)
subblock
in interface Indexable
subblock
in class PhysicalDataSource
public DataBlock subblock(ISBounds srcdb)
subblock
in interface Indexable
subblock
in class DataCollection
public DataBlock subblock(FloatDatum[] data, ISBounds srcdb)
public DataSource subset(RecordDescriptor rd)
public DataSource subset(ISBounds db)
public DataSource subset(RecordDescriptor rd, ISBounds db)
public java.lang.String toString()
toString
in class PhysicalDataSource
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |