its.backbone.domain.tms
Class TmsDataFactory

java.lang.Object
  extended byits.backbone.domain.DataFactory
      extended byits.backbone.domain.tms.TmsDataFactory
All Implemented Interfaces:
java.io.Serializable

public class TmsDataFactory
extends DataFactory
implements java.io.Serializable

Extends DataFactory (@see its.backbone.domain.DataFactory) for a TMS implementation. Based loosely on the original TmsDataFactory by Kint. This DataFactory supports three types of sensors:

The public method (@see getExtractionHashtable(Schema,ContentsData,ContentsData)) produces a Hashtable of ContentsData objects, each corresponding to one of the above sensors. The schema data table names serve as the hash keys. It is the responsibility of the DataFactory application developer to make sure the input ContentsData objects are legal, i.e. they contain the needed information. The sensors ContentsData input to this method specifies which sensors to extract from the blobs contained in the data ContentsData object.

Author:
Noah S Friedland Last change: NSF 28 Jan 98 10:53 am
See Also:
Serialized Form

Constructor Summary
TmsDataFactory()
          constructor
 
Method Summary
 java.lang.String getDataOffsetTableName()
          This method returns the name of the data offset table within the datastream schema.
 java.util.Hashtable getExtractionHashtable(Schema schema, ContentsData cd, ContentsData data)
          getExtractionHashtable This method takes the blob data schema and a ContentsData object specifying which sensors to extract and a ContentsData object containing blobs represented as byte arrays, and produces a hashtable of ContentsData objects, hashed on their associated data blob schema table names.
 boolean hasDataOffsetTable()
          Implements abstract method from DataFactory, indicating that the TMS data stream has a data offset table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TmsDataFactory

public TmsDataFactory()
constructor

Method Detail

hasDataOffsetTable

public boolean hasDataOffsetTable()
Implements abstract method from DataFactory, indicating that the TMS data stream has a data offset table.

Specified by:
hasDataOffsetTable in class DataFactory
Returns:
true-- TMS has a data offset table

getDataOffsetTableName

public java.lang.String getDataOffsetTableName()
This method returns the name of the data offset table within the datastream schema. Please see comments above.

Specified by:
getDataOffsetTableName in class DataFactory
Returns:
"LOOPS"-- the TMS datastream's data offset table name

getExtractionHashtable

public java.util.Hashtable getExtractionHashtable(Schema schema,
                                                  ContentsData cd,
                                                  ContentsData data)
                                           throws java.lang.IllegalArgumentException,
                                                  BadOffsetException
getExtractionHashtable

This method takes the blob data schema and a ContentsData object specifying which sensors to extract and a ContentsData object containing blobs represented as byte arrays, and produces a hashtable of ContentsData objects, hashed on their associated data blob schema table names.

Specified by:
getExtractionHashtable in class DataFactory
Parameters:
schema - the blob data's schema
data - the ContentsData object with the blob data
cd - the table named by getDataOffsetTableName, taken from the Contents frame in the SDD datastream, or null if hasDataOffsetTable returns false.
Throws:
java.lang.IllegalArgumentException - thrown if any input is invalid
BadOffsetException - thrown if bad offsets into a blob are detected