edu.unh.sdb.datasource
Class DataBlockProxy

java.lang.Object
  extended by edu.unh.sdb.datasource.DataCollection
      extended by edu.unh.sdb.datasource.DataBlock
          extended by edu.unh.sdb.datasource.DataBlockProxy
All Implemented Interfaces:
Indexable
Direct Known Subclasses:
ARRSCopyDataBlock

public abstract class DataBlockProxy
extends DataBlock

Author:
rdb Created 11/27/05. Not really tested. Not yet really used.

Field Summary
 
Fields inherited from class edu.unh.sdb.datasource.DataCollection
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc
 
Constructor Summary
protected DataBlockProxy()
           
  DataBlockProxy(ISBounds isb, RecordDescriptor recordDesc)
           
  DataBlockProxy(ISBounds isb, RecordDescriptor recordDesc, AxisOrdering ordering)
           
 
Method Summary
 void datum(Datum dtm, IndexSpaceID did)
          Given an IndexSpaceID, copy the values of the Datum at that position to the argument Datum.
 void datum(Datum dtm, IndexSpaceID did, FieldIDMapper mp)
          Given an IndexSpaceID and FieldIDMapper, copy the values of the Datum at that position to the argument Datum.
protected  DataBlock getDataBlock()
          DataBlock getDataBlock()
protected abstract  DataBlock loadData()
          loadData() - responsibility of the child class to implement code to load the true DataBlock object.
protected  void setDataBlock(DataBlock blk)
          setDataBlock( DataBlock blk )
 void setDatum(IndexSpaceID isid, Datum d)
          Set the location specified by the IndexSpaceID to the given datum.
 void subblock(DataBlock dstBlock, ISBounds srcBounds, FieldIDMapper fmap)
          Reads a subblock defined by srcBounds into the Datablock argument.
 void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds)
          Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.
 void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper fmap)
          Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.
 
Methods inherited from class edu.unh.sdb.datasource.DataBlock
getValues, setByAttribute, setByte, setBytes, setBytes, setBytesByAttribute, setBytesByPoint, setDouble, setDoubles, setDoubles, setDoublesByAttribute, setDoublesByPoint, setFloat, setFloats, setFloats, setFloatsByAttribute, setFloatsByPoint, setInt, setInts, setInts, setIntsByAttribute, setIntsByPoint, setShort, setShorts, setShorts, setShortsByAttribute, setShortsByPoint, setValues, setValues, setValuesByAttribute, setValuesByPoint, toString
 
Methods inherited from class edu.unh.sdb.datasource.DataCollection
byteSize, computeOffset, computeOffset, copyBounds, createDataBlock, createDataBlock, createDataBlock, createDatum, createDatum, createDatum, createDatum, createDatum, createDatum, datum, datum, datum, datum, datum, dim, getAxisOrdering, getAxisWeight, getAxisWeights, getBounds, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytesByAttribute, getBytesByAttribute, getBytesByPoint, getBytesByPoint, getDataOrder, getDimensionsArray, getDouble, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoublesByAttribute, getDoublesByAttribute, getDoublesByPoint, getDoublesByPoint, getFloat, getFloats, getFloats, getFloats, getFloats, getFloats, getFloats, getFloatsByAttribute, getFloatsByAttribute, getFloatsByPoint, getFloatsByPoint, getInt, getInts, getInts, getInts, getInts, getInts, getInts, getIntsByAttribute, getIntsByAttribute, getIntsByPoint, getIntsByPoint, getLowerBoundsArray, getNumAttributes, getRecordDescriptor, getShort, getShorts, getShorts, getShorts, getShorts, getShorts, getShorts, getShortsByAttribute, getShortsByAttribute, getShortsByPoint, getShortsByPoint, getStorageType, getValues, getValuesByAttribute, getValuesByPoint, longVolume, setAxisOrdering, setBounds, setRecordDescriptor, size, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, useBytesOnly, volume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataBlockProxy

protected DataBlockProxy()

DataBlockProxy

public DataBlockProxy(ISBounds isb,
                      RecordDescriptor recordDesc,
                      AxisOrdering ordering)
Parameters:
isb -
recordDesc -
axisOrdering -

DataBlockProxy

public DataBlockProxy(ISBounds isb,
                      RecordDescriptor recordDesc)
Parameters:
isb -
recordDesc -
Method Detail

loadData

protected abstract DataBlock loadData()
loadData() - responsibility of the child class to implement code to load the true DataBlock object.

Returns:

setDataBlock

protected void setDataBlock(DataBlock blk)
setDataBlock( DataBlock blk )


getDataBlock

protected DataBlock getDataBlock()
DataBlock getDataBlock()


setDatum

public void setDatum(IndexSpaceID isid,
                     Datum d)
Description copied from class: DataBlock
Set the location specified by the IndexSpaceID to the given datum.

Specified by:
setDatum in class DataBlock
See Also:
DataBlock.setDatum(edu.unh.sdb.datasource.IndexSpaceID, edu.unh.sdb.common.Datum)

datum

public void datum(Datum dtm,
                  IndexSpaceID did)
Description copied from class: DataCollection
Given an IndexSpaceID, copy the values of the Datum at that position to the argument Datum. TODO Define error conditions

Specified by:
datum in interface Indexable
Overrides:
datum in class DataCollection
See Also:
DataCollection.datum(edu.unh.sdb.common.Datum, edu.unh.sdb.datasource.IndexSpaceID)

datum

public void datum(Datum dtm,
                  IndexSpaceID did,
                  FieldIDMapper mp)
Description copied from class: DataCollection
Given an IndexSpaceID and FieldIDMapper, copy the values of the Datum at that position to the argument Datum. TODO Define error conditions

Specified by:
datum in interface Indexable
Specified by:
datum in class DataCollection
See Also:
DataCollection.datum(edu.unh.sdb.common.Datum, edu.unh.sdb.datasource.IndexSpaceID, edu.unh.sdb.common.FieldIDMapper)

subblock

public void subblock(DataBlock dstBlock,
                     ISBounds dstBounds,
                     ISBounds srcBounds)
Description copied from class: DataCollection
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.

Specified by:
subblock in interface Indexable
Specified by:
subblock in class DataCollection
See Also:
DataCollection.subblock(edu.unh.sdb.datasource.DataBlock, edu.unh.sdb.datasource.ISBounds, edu.unh.sdb.datasource.ISBounds)

subblock

public void subblock(DataBlock dstBlock,
                     ISBounds srcBounds,
                     FieldIDMapper fmap)
Description copied from class: DataCollection
Reads a subblock defined by srcBounds into the Datablock argument. If the size and shape of the DataBlock argument does not match the source bounds, the source bounds will be modified to match the destination shape and size, if there is enough data in the source; otherwise, only the portion of the destination is changed for which there is source data. Only the attributes identified by the FieldIDMapper are included. It is valid for the FieldIDMapper argument to be null; this specifies that all attributes are to be extracted.

Overrides:
subblock in class DataCollection
See Also:
edu.unh.sdb.datasource.DataCollection#subblock(edu.unh.sdb.common.DataBlock, edu.unh.sdb.datasource.ISBounds, edu.unh.sdb.datasource.FieldIDMapper)

subblock

public void subblock(DataBlock dstBlock,
                     ISBounds dstBounds,
                     ISBounds srcBounds,
                     FieldIDMapper fmap)
Description copied from class: DataCollection
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. The FieldIDMapper argument determines the mapping between datums in this DataBlock and datums in the argument DataBlock. It is legal to pass a null for the FieldIDMapper argument which means that all attributes are to be extracted.

Specified by:
subblock in interface Indexable
Specified by:
subblock in class DataCollection
See Also:
edu.unh.sdb.datasource.DataCollection#subblock(edu.unh.sdb.common.DataBlock, edu.unh.sdb.datasource.ISBounds, edu.unh.sdb.datasource.FieldIDMapper)