edu.unh.sdb.datasource
Class DataSink

java.lang.Object
  extended by edu.unh.sdb.datasource.DataSink
Direct Known Subclasses:
OneDDataSink

public class DataSink
extends java.lang.Object


Field Summary
protected  long[] axisWeights
           
protected  ISBounds bounds
           
protected  int datumSize
           
protected  int dimensionality
           
protected  java.lang.String filename
           
protected  int numFields
           
protected  AxisOrdering ordering
           
protected  java.io.RandomAccessFile raFile
           
protected  RecordDescriptor recordDescriptor
           
 
Constructor Summary
protected DataSink(java.lang.String filename, RecordDescriptor rd)
           
  DataSink(java.lang.String filename, RecordDescriptor rd, ISBounds bounds)
           
 
Method Summary
 void activate()
           
protected  void close()
           
protected  int computeOffset(IndexSpaceID dsid)
          Map the IndexSpaceID to a single integer that serves as as an offset into the physical file or network source.
protected  int computeOffset(int[] coordArray)
          Maps an n-dimensional array of coordinates to a a 1d offset
 void deactivate()
           
 ISBounds getBounds()
           
protected  void open()
           
 void write(Datum d, IndexSpaceID id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

raFile

protected java.io.RandomAccessFile raFile

filename

protected java.lang.String filename

axisWeights

protected long[] axisWeights

recordDescriptor

protected RecordDescriptor recordDescriptor

ordering

protected AxisOrdering ordering

bounds

protected ISBounds bounds

dimensionality

protected int dimensionality

numFields

protected int numFields

datumSize

protected int datumSize
Constructor Detail

DataSink

public DataSink(java.lang.String filename,
                RecordDescriptor rd,
                ISBounds bounds)

DataSink

protected DataSink(java.lang.String filename,
                   RecordDescriptor rd)
Method Detail

getBounds

public ISBounds getBounds()

activate

public void activate()

deactivate

public void deactivate()

write

public void write(Datum d,
                  IndexSpaceID id)

open

protected void open()

close

protected void close()

computeOffset

protected final int computeOffset(IndexSpaceID dsid)
Map the IndexSpaceID to a single integer that serves as as an offset into the physical file or network source.


computeOffset

protected final int computeOffset(int[] coordArray)
Maps an n-dimensional array of coordinates to a a 1d offset