edu.unh.sdb.datasource
Class CompositeDataSource

java.lang.Object
  extended by edu.unh.sdb.datasource.DataCollection
      extended by edu.unh.sdb.datasource.DataSource
          extended by edu.unh.sdb.datasource.CompositeDataSource
All Implemented Interfaces:
Indexable
Direct Known Subclasses:
AttributeJoinDataSource, BlockedDataSource, OverlapBlockedDataSource

public abstract class CompositeDataSource
extends DataSource

This class is a parent class for AttributeJoinDataSoure and BlockedDataSource. It provides access methods concerned with arrays of ComponentInfo objects.


Field Summary
protected  ComponentInfo[] componentInfos
          Information for every component.
 
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
CompositeDataSource(java.lang.String aname, ComponentInfo[] cinfo)
          Create a CompositeDataSource defined by the ComponentInfo array.
 
Method Summary
 void activate()
          Calls the activate method of all component datasources.
protected abstract  boolean check(ComponentInfo[] cpnInfo)
          Check the array of componentInfo
 void deactivate()
          Calls the deactivate method of all component datasources.
 boolean equals(java.lang.Object obj)
          Return true if parameter equals this object, false otherwise.
 ISBounds[] getComponentBounds()
          Returns the array of component ISBoundses corresponding to the array this.componentInfos[].
 DataSource[] getComponentDataSources()
          Returns the array of component DataSources that are corresponding to the array this.componentInfos[].
 int[][] getComponentFieldIDs()
          Returns the array of componentFieldNumbers for each ComponentInfo's FieldIDMapper.
 ComponentInfo[] getComponentInfos()
          Returns the reference to the array this.componentInfos[].
 ISBounds[] getCompositeBounds()
          Returns the array of destination ISBoundses corresponding to the array this.componentInfos[].
 int[][] getCompositeFieldIDs()
          Returns the array of compositeFieldNumbers for each ComponentInfo's FieldIDMapper.
 FieldIDMapper[] getFIDMappers()
          Returns the array of FieldIDMappers that are corresponding to the array this.componentInfos[].
protected abstract  void initializeComponents(ComponentInfo[] cpnInfo)
           
static void main(java.lang.String[] args)
           
 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.DataSource
checkActivated, clearCache, copyBestID, create, create, create, createRemote, createRemote, createRemoteClient, createRemoteClient, createRemoteDataSource, createRemoteDataSource, createRemoteDataSourceUDP, createRemoteUDP, createRemoteUDP, dumpData, getName, getValues, isActivated, 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, 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, subblock, subblock, subblock, useBytesOnly, volume
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

componentInfos

protected ComponentInfo[] componentInfos
Information for every component.

Constructor Detail

CompositeDataSource

public CompositeDataSource(java.lang.String aname,
                           ComponentInfo[] cinfo)
Create a CompositeDataSource defined by the ComponentInfo array.

Method Detail

initializeComponents

protected abstract void initializeComponents(ComponentInfo[] cpnInfo)

check

protected abstract boolean check(ComponentInfo[] cpnInfo)
Check the array of componentInfo


getComponentInfos

public ComponentInfo[] getComponentInfos()
Returns the reference to the array this.componentInfos[].


activate

public void activate()
Calls the activate method of all component datasources.

Overrides:
activate in class DataSource

deactivate

public void deactivate()
Calls the deactivate method of all component datasources.

Overrides:
deactivate in class DataSource

getComponentDataSources

public DataSource[] getComponentDataSources()
Returns the array of component DataSources that are corresponding to the array this.componentInfos[]. The DataSources may or may not be distinct.


getFIDMappers

public FieldIDMapper[] getFIDMappers()
Returns the array of FieldIDMappers that are corresponding to the array this.componentInfos[].


getComponentFieldIDs

public int[][] getComponentFieldIDs()
Returns the array of componentFieldNumbers for each ComponentInfo's FieldIDMapper.


getCompositeFieldIDs

public int[][] getCompositeFieldIDs()
Returns the array of compositeFieldNumbers for each ComponentInfo's FieldIDMapper.


getComponentBounds

public ISBounds[] getComponentBounds()
Returns the array of component ISBoundses corresponding to the array this.componentInfos[].


getCompositeBounds

public ISBounds[] getCompositeBounds()
Returns the array of destination ISBoundses corresponding to the array this.componentInfos[].


equals

public boolean equals(java.lang.Object obj)
Return true if parameter equals this object, false otherwise.

Overrides:
equals in class DataSource

toString

public java.lang.String toString()
Print the data members of the DataSource in an easy to read fashion.

Overrides:
toString in class DataSource

main

public static void main(java.lang.String[] args)