|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.Fissures.seed.container.SeedObject
edu.iris.Fissures.seed.container.Blockette
public class Blockette
Generic class of all SEED blockettes and Fixed Section Data Header (FSDH) contents. Intended to be instantiated by BlocketteFactory class. All of the constructors are protected permissions so that we can keep a rein on how the objects are created and invoked...they really have a dependency on the BlocketteFactory, since that class contains the background information on all of the supported blockette types.
Field Summary | |
---|---|
protected int |
blocketteType
|
protected BlocketteVector |
childBlocketteVec
|
protected static float |
defaultSEEDVersion
|
protected java.util.Vector |
fieldValue
|
protected boolean |
incompleteFlag
|
protected int |
lookupId
|
protected java.util.Vector |
lookupMap
|
protected static float |
maxSEEDVersion
|
protected static float |
minSEEDVersion
|
protected int |
numBytes
|
protected Blockette |
parentBlockette
|
protected float |
version
|
protected Waveform |
waveformData
|
Method Summary | |
---|---|
int |
addChildBlockette(Blockette addBlockette)
Add a child blockette to this blockette. |
int |
addDictionaryLookup(int abbrevLookupId)
Add lookupId value from an outside abbreviation dictionary blockette to the lookupMap Vector in this blockette. |
int |
addDictionaryLookupIfNeeded(int abbrevLookupId)
Add lookupId value from an outside abbreviation dictionary blockette to the lookupMap Vector in this blockette if it is not already there. |
void |
addFieldGrp(int fieldNum,
java.util.Vector valueVec)
Add a new repeat field group starting at the specified field number. |
void |
attachParent(Blockette parent)
Designate the provided Blockette as this Blockette's parent. |
void |
attachWaveform(Waveform data)
Attach waveform object to this blockette. |
void |
deleteFieldGrp(int fieldNum,
int fieldIndex)
Remove a repeat group at the indicated index. |
java.lang.String |
getCategory()
Get the control header type of this blockette. |
Blockette |
getChildBlockette(int index)
Get the child blockette associated with this blockette from the specified Vector index. |
static float |
getDefaultVersion()
Get the default SEED version for Blockettes. |
java.lang.String |
getDefinition()
Return the entire description of this blockette type. |
int |
getDictionaryLookup(int index)
Get the dictionary lookup value from the specified Vector index. |
java.util.Vector |
getFieldGrp(int fieldNum,
int fieldIndex)
Get a repeating field group cross-section in the form of a vector. |
java.lang.String |
getFieldLength(int fieldNum)
Get the length of the field in bytes. |
java.lang.String |
getFieldMask(int fieldNum)
Get the string expression of the mask or flag for this field. |
java.lang.String |
getFieldName(int fieldNum)
Get the full name of the specified field. |
java.lang.Object |
getFieldObject(int fieldNum)
Return the raw object assigned to this field number, regardless of the contents, or whether it is a repeat field or a repeat field with list values. |
int |
getFieldRepeat(int fieldNum)
Get the field number that indicates the number of times this field repeats. |
java.lang.String |
getFieldType(int fieldNum)
Get the letter that represents the field type. |
java.lang.Object |
getFieldVal(int fieldNum)
Returns a single object value at the field number indicated. |
java.lang.Object |
getFieldVal(int fieldNum,
int fieldIndex)
Returns the value at the field number...NOTE that this is an Object. |
int |
getLookupId()
Return the lookupId for this blockette. |
java.lang.String |
getName()
Get the full name of this blockette. |
int |
getNumBytes()
Returns the number of bytes read to generate this blockette. |
int |
getNumFields()
Get the number of available fields in this blockette. |
Blockette |
getParentBlockette()
Return the designated parent Blockette object. |
int |
getStageNumber()
Return the stage number of this blockette IF it is a response blockette. |
int |
getType()
Return the blockette type number. |
float |
getVersion()
Return the SEED version represented in this blockette. |
Waveform |
getWaveform()
Get the attached waveform object. |
boolean |
hasParent()
Return true if this Blockette has a designated parent. |
void |
initialize(byte[] blocketteStream,
boolean swapFlag,
boolean isData)
Resets this Blockette object to initialization state. |
void |
initialize(byte[] blocketteStream,
boolean swapFlag,
boolean isData,
float version)
Resets this Blockette object to initialization state. |
void |
initialize(java.lang.String inputString)
Resets this Blockette object to initialization state. |
void |
initialize(java.lang.String inputString,
float version)
Resets this Blockette object to initialization state. |
void |
initialize(java.lang.String inputString,
java.lang.String delimiter,
java.lang.String blank)
Resets this Blockette object to initialization state. |
void |
initialize(java.lang.String inputString,
java.lang.String delimiter,
java.lang.String blank,
float version)
Resets this Blockette object to initialization state. |
void |
insertFieldGrp(int fieldNum,
int fieldIndex,
java.util.Vector valueVec)
Insert a repeat group before the indicated index. |
protected void |
instanceInit()
Initialize instance variables. |
boolean |
isIncomplete()
Return true if this blockette was not completely specified. |
protected boolean |
isPunctuation(char c)
Indicate TRUE if this is character is some form of punctuation. |
boolean |
isResponseBlockette()
Return true if this is a response blockette -- i.e. |
int |
numberofChildBlockettes()
Return the number of child blockettes stored in this blockette. |
int |
numberofDictionaryLookups()
Return the number of dictionary entries in the lookupMap. |
int |
purgeFieldGrp(int fieldNum)
Completely erase contents of a field group where the first field of the group is fieldNum. |
void |
removeChildBlockette(int index)
Remove child blockette reference at the indicated index. |
void |
removeParent()
Remove the parent reference in this Blockette. |
void |
removeWaveform()
Remove the attached waveform object from this blockette. |
void |
replaceChildBlockette(int index,
Blockette newBlockette)
Replace child blockette at the indicated index with a new blockette. |
protected int |
setByteStream(byte[] blocketteStream,
boolean swapFlag,
boolean isData)
Establish the blockette contents through a byte stream written in SEED blockette format. |
void |
setDictionaryLookup(int index,
int abbrevLookupId)
Set the lookupId value of an abbreviation dictionary blockette for a corresponding index value, replacing an existing entry at that index. |
void |
setFieldObject(int fieldNum,
java.lang.Object fieldObj)
Similar to setFieldVal, except that the provided object can be whatever construct is needed to reflect the field contents. |
protected void |
setFieldString(int blkType,
int fieldNum,
int fieldIndex,
java.lang.String addVal)
Set a specific blockette field to a value specified as a String. |
protected void |
setFieldString(int blkType,
int fieldNum,
int fieldIndex,
java.lang.String addVal,
boolean lenient)
Set a specific blockette field to a value specified as a String. |
void |
setFieldVal(int fieldNum,
int fieldIndex,
java.lang.Object value)
Apply value contained in the provided object to the indicated field position in the blockette. |
void |
setFieldVal(int fieldNum,
int fieldIndex,
java.lang.Object value,
boolean lenient)
Apply value contained in the provided object to the indicated field position in the blockette. |
void |
setFieldVal(int fieldNum,
java.lang.Object value)
Apply value contained in the provided object to the indicated field position in the blockette. |
void |
setLookupId(int idValue)
Set the lookupId value of this blockette. |
void |
setStageNumber(int stageNum)
|
void |
setStageNumber(java.lang.Integer stageNum)
Set the stage number of this blockette to the indicated value, but only if it is a response blockette. |
protected void |
setTokenString(java.lang.String inputString,
java.lang.String delimiter,
java.lang.String blank)
Initialize the blockette with a character-delimited string. |
protected void |
setType()
update/set the blockette type |
protected void |
setType(int i)
allow explicit setting of the type -- use with caution! |
void |
setValuesFrom(java.lang.String inputString)
Like initialize() except that the Blockette is not fully reset. |
void |
setValuesFrom(java.lang.String inputString,
java.lang.String delimiter,
java.lang.String blank)
Like initialize() except that the Blockette is not fully reset. |
void |
setVersion(float ver)
Set the SEED version that this blockette represents. |
java.lang.String |
toBlkFldString()
Convert entire Blockette contents into a block/field string. |
java.lang.String |
toString()
Convert entire Blockette contents into a tokenized string. |
java.lang.String |
toString(int fieldNum)
Convert Blockette field value to a properly formatted string. |
java.lang.String |
toString(int fieldNum,
int fieldIndex)
Convert Blockette field value to a properly formatted string. |
java.lang.String |
toString(java.lang.String delimiter,
java.lang.String blank)
Convert entire Blockette contents into a tokenized string. |
java.lang.String |
toString(java.lang.String delimiter,
java.lang.String blank,
java.lang.String blkFldSpace)
Convert entire Blockette contents into a tokenized string. |
java.lang.String |
translate(int fieldNum)
Translate the value located at the blockette's field number, if there is one. |
Methods inherited from class edu.iris.Fissures.seed.container.SeedObject |
---|
compareTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector fieldValue
protected BlocketteVector childBlocketteVec
protected Blockette parentBlockette
protected Waveform waveformData
protected java.util.Vector lookupMap
protected int lookupId
protected int blocketteType
protected float version
protected static final float minSEEDVersion
protected static final float maxSEEDVersion
protected static final float defaultSEEDVersion
protected int numBytes
protected boolean incompleteFlag
Method Detail |
---|
public void initialize(byte[] blocketteStream, boolean swapFlag, boolean isData, float version) throws SeedException
SeedException
public void initialize(byte[] blocketteStream, boolean swapFlag, boolean isData) throws SeedException
SeedException
public void initialize(java.lang.String inputString, java.lang.String delimiter, java.lang.String blank, float version) throws SeedException
SeedException
public void initialize(java.lang.String inputString, java.lang.String delimiter, java.lang.String blank) throws SeedException
SeedException
public void initialize(java.lang.String inputString) throws SeedException
SeedException
public void initialize(java.lang.String inputString, float version) throws SeedException
SeedException
public void setValuesFrom(java.lang.String inputString, java.lang.String delimiter, java.lang.String blank) throws SeedException
SeedException
public void setValuesFrom(java.lang.String inputString) throws SeedException
SeedException
public int getType()
getType
in class SeedObject
public float getVersion() throws SeedException
SeedException
public boolean isIncomplete()
public boolean isResponseBlockette() throws SeedException
SeedException
public int getNumBytes() throws SeedException
SeedException
public java.lang.String toString(int fieldNum, int fieldIndex)
public java.lang.String toString(int fieldNum)
public java.lang.String toString(java.lang.String delimiter, java.lang.String blank)
public java.lang.String toString(java.lang.String delimiter, java.lang.String blank, java.lang.String blkFldSpace)
public java.lang.String toBlkFldString()
public java.lang.String toString()
toString
in class SeedObject
public java.lang.String getName() throws SeedException
SeedException
public java.lang.String getCategory() throws SeedException
SeedException
public int getNumFields() throws SeedException
SeedException
public java.lang.String getFieldName(int fieldNum) throws SeedException
SeedException
public java.lang.String getFieldType(int fieldNum) throws SeedException
SeedException
public java.lang.String getFieldLength(int fieldNum) throws SeedException
SeedException
public java.lang.String getFieldMask(int fieldNum) throws SeedException
SeedException
public int getFieldRepeat(int fieldNum) throws SeedException
SeedException
public java.lang.String getDefinition() throws SeedException
SeedException
public java.lang.Object getFieldVal(int fieldNum, int fieldIndex) throws SeedException
SeedException
public java.lang.Object getFieldVal(int fieldNum) throws SeedException
SeedException
public java.util.Vector getFieldGrp(int fieldNum, int fieldIndex) throws SeedException
SeedException
public java.lang.Object getFieldObject(int fieldNum)
fieldNum
- field number to return the assigned object from
public java.lang.String translate(int fieldNum) throws SeedException
SeedException
public Blockette getChildBlockette(int index)
public int numberofChildBlockettes()
public boolean hasParent()
public Blockette getParentBlockette()
public Waveform getWaveform()
public int getDictionaryLookup(int index)
public int numberofDictionaryLookups()
public int getLookupId()
getLookupId
in class SeedObject
public int getStageNumber() throws SeedException
SeedException
public void setStageNumber(java.lang.Integer stageNum) throws SeedException
SeedException
public void setStageNumber(int stageNum) throws SeedException
SeedException
public void setVersion(float ver) throws SeedException
SeedException
public void setFieldVal(int fieldNum, int fieldIndex, java.lang.Object value, boolean lenient) throws SeedException
SeedException
public void setFieldVal(int fieldNum, int fieldIndex, java.lang.Object value) throws SeedException
SeedException
public void setFieldVal(int fieldNum, java.lang.Object value) throws SeedException
SeedException
public void setFieldObject(int fieldNum, java.lang.Object fieldObj)
fieldNum
- field number to apply this object tofieldObj
- object to apply to the indicated field numberpublic void addFieldGrp(int fieldNum, java.util.Vector valueVec) throws SeedException
SeedException
public void insertFieldGrp(int fieldNum, int fieldIndex, java.util.Vector valueVec) throws SeedException
SeedException
public void deleteFieldGrp(int fieldNum, int fieldIndex) throws SeedException
SeedException
public int purgeFieldGrp(int fieldNum) throws SeedException
SeedException
public int addChildBlockette(Blockette addBlockette)
addBlockette
- the blockette to be added as a child to this blockette
public void removeChildBlockette(int index)
public void replaceChildBlockette(int index, Blockette newBlockette)
public void attachParent(Blockette parent)
public void removeParent()
public void attachWaveform(Waveform data)
public void removeWaveform()
public int addDictionaryLookup(int abbrevLookupId)
public int addDictionaryLookupIfNeeded(int abbrevLookupId)
public void setDictionaryLookup(int index, int abbrevLookupId)
public void setLookupId(int idValue)
public static float getDefaultVersion()
protected int setByteStream(byte[] blocketteStream, boolean swapFlag, boolean isData) throws SeedException
SeedException
protected void setFieldString(int blkType, int fieldNum, int fieldIndex, java.lang.String addVal, boolean lenient) throws SeedException
SeedException
protected void setFieldString(int blkType, int fieldNum, int fieldIndex, java.lang.String addVal) throws SeedException
SeedException
protected void setTokenString(java.lang.String inputString, java.lang.String delimiter, java.lang.String blank) throws SeedException
SeedException
protected boolean isPunctuation(char c)
protected void setType() throws SeedException
SeedException
protected void setType(int i)
SeedException
protected void instanceInit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |