MetaTF API

MetaTF.Runtime
Class TraceField

java.lang.Object
  |
  +--MetaTF.Runtime.TraceField
Direct Known Subclasses:
IndexTraceField, NumTraceField, StringTraceField

public abstract class TraceField
extends java.lang.Object

A TraceField representing a field. For each record of each section, we construct an array of TraceFields, one for each named fields. This is essentially a flattening of the definition in the DTD of the record. As we read each field of the record, we consult this array for the width and encoding. The array is modified by metadata records.

Version:
rel-1-2 ($Revision: 1.1 $, $Date: 2000/12/15 16:35:32 $),
Author:
Richard Jones

Field Summary
protected  int encodingType
          The encoding of the named field
protected  java.lang.String name
          The name of the named field
 
Constructor Summary
TraceField(java.lang.String n)
          Allocate a new object representing the encoding of a named field
 
Method Summary
 int getInterpretationType()
          Get the encodingType
(package private) abstract  void setInterpretationType(int i)
          Set the encoding type of this field (none, default, ...)
(package private) abstract  void setValue(long i)
          Set the first encoding value
(package private) abstract  void setValue(java.lang.String s)
          Set the first encoding value
(package private) abstract  void setValue2(long i)
          Set the second encoding value
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name
The name of the named field

encodingType

protected int encodingType
The encoding of the named field
Constructor Detail

TraceField

public TraceField(java.lang.String n)
Allocate a new object representing the encoding of a named field
Method Detail

getInterpretationType

public int getInterpretationType()
Get the encodingType

setInterpretationType

abstract void setInterpretationType(int i)
                             throws BadRecordException
Set the encoding type of this field (none, default, ...)
Parameters:
i - the encoding
Throws:
BadRecordException - IF the encoding does not match the type of the field

setValue

abstract void setValue(long i)
                throws BadRecordException
Set the first encoding value
Parameters:
i - the value
Throws:
BadRecordException - IF the value is inappropriate for this type of field

setValue

abstract void setValue(java.lang.String s)
                throws BadRecordException
Set the first encoding value
Parameters:
s - the value (a string)
Throws:
BadRecordException - IF the value is inappropriate for this type of field

setValue2

abstract void setValue2(long i)
                 throws BadRecordException
Set the second encoding value
Parameters:
i - the value
Throws:
BadRecordException - IF the value is inappropriate for this type of field

MetaTF API

Copyright © 2001 - Richard Jones     MetaTF