|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectits.backbone.domain.DataFactory
Defines the interface to a domain-specific data extractor. Extractors must extend this abstract class and implement its methods.
Part of the process of creating a transmitter for a new SDD data stream is creating the Extractor for that data stream. The Extractor is sent over the network to SDD Receivers, which can use it to interpret the incoming data frames.
To create a new extractor,
DataFactory.
package line at the head of the source
files).
javac *.java.
jar cvfM myjarfile.jar *.class.
java its.backbone.domain.ReadJar myjarfile.jar
SddTransmitter.transmitExtractor(java.lang.String),
Serialized Form| Constructor Summary | |
DataFactory()
|
|
| Method Summary | |
abstract java.lang.String |
getDataOffsetTableName()
This method returns the name of the data offset table in the datastream schema. |
abstract java.util.Hashtable |
getExtractionHashtable(Schema schema,
ContentsData dataOffsetTable,
ContentsData data)
To produce the ExtractedData event, the SddReceiver invokes this method on the extractor it has received. |
abstract boolean |
hasDataOffsetTable()
Indicates whether the Extractor needs to be provided with a data offset table from the data dictionary (schema and contents) in order to interpret the data frame. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DataFactory()
| Method Detail |
public abstract boolean hasDataOffsetTable()
Consider a system that produces three types of binary sensor data, all of whom are packaged into a single data frame. The first type is of size 3 bytes, the second type is of 6 bytes and the third type is of 18 bytes. These sensors' readings can appear in arbitrary order within the blob. To gain access to any specific sensor reading a data offset table is required in the SDD data stream's schema. This table should contains columns that describe the following:
For an operational example, consider the "LOOPS" table in the SDD data flow at host sdd.its.washington.edu, port 9033.
public abstract java.lang.String getDataOffsetTableName()
public abstract java.util.Hashtable getExtractionHashtable(Schema schema,
ContentsData dataOffsetTable,
ContentsData data)
throws BadOffsetException
schema - the schema from the SDD datastream.dataOffsetTable - the table named by getDataOffsetTableName,
taken from the Contents frame in the SDD datastream, or null
if hasDataOffsetTable returns false.data - the data frame from the SDD datastream, packaged inside a ContentsData
object. This object contains a single column entry named "data".
The incoming data frame can be retrieved as follows:byte[] databytes = (byte[])data.getItem("data");
BadOffsetException - thrown if the data offset table contains an offset
that is not within the data frame
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||