|
|||||||||
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
edu.iris.Fissures.seed.container.CachedBlocketteDecorator
public class CachedBlocketteDecorator
Decorator class for Blockette objects. Cooperates with an ObjectContainer to manage Blockettes through a persistence cache. Serves as an indirect interface to the assigned Blockette. Since this must be serializable, we cannot keep a persistent link to the ObjectContainer. Instead, we track container association by volume number, which is mapped by the BlocketteDecoratorFactory. The BlocketteDecoratorFactory is authorized to create new instances of this class.
Field Summary |
---|
Fields inherited from class edu.iris.Fissures.seed.container.Blockette |
---|
blocketteType, childBlocketteVec, defaultSEEDVersion, fieldValue, incompleteFlag, lookupId, lookupMap, maxSEEDVersion, minSEEDVersion, numBytes, parentBlockette, version, 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 |
assignBlockette(Blockette blk)
Assign the indicated blockette to this decorator. |
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. |
Blockette |
getBlockette()
Get the blockette object assigned to this decorator...either attached directly to this object or extracted from the supporting SeedObjectContainer |
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. |
SeedObjectContainer |
getContainer()
Get the SeedObjectContainer assigned to this decorator. |
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. |
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. |
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. |
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. |
boolean |
isCached()
Get the state of caching for blockettes assigned to this decorator. |
boolean |
isIncomplete()
Return true if this blockette was not completely specified. |
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. |
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. |
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 |
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. |
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 |
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.Blockette |
---|
getDefaultVersion, getFieldRepeat, getLookupId, getStageNumber, getType, getVersion, instanceInit, isPunctuation, isResponseBlockette, setByteStream, setFieldString, setFieldString, setLookupId, setStageNumber, setStageNumber, setTokenString, setType, setType, setVersion, toBlkFldString, toString |
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 |
Method Detail |
---|
public void assignBlockette(Blockette blk) throws SeedException
assignBlockette
in interface BlocketteDecorator
blk
- Blockette to represent
SeedException
public Blockette getBlockette()
getBlockette
in interface BlocketteDecorator
public SeedObjectContainer getContainer()
public boolean isCached()
public void initialize(byte[] blocketteStream, boolean swapFlag, boolean isData, float version) throws SeedException
Blockette
initialize
in class Blockette
SeedException
public void initialize(byte[] blocketteStream, boolean swapFlag, boolean isData) throws SeedException
Blockette
initialize
in class Blockette
SeedException
public void initialize(java.lang.String inputString, java.lang.String delimiter, java.lang.String blank, float version) throws SeedException
Blockette
initialize
in class Blockette
SeedException
public void initialize(java.lang.String inputString, java.lang.String delimiter, java.lang.String blank) throws SeedException
Blockette
initialize
in class Blockette
SeedException
public void initialize(java.lang.String inputString) throws SeedException
Blockette
initialize
in class Blockette
SeedException
public void initialize(java.lang.String inputString, float version) throws SeedException
Blockette
initialize
in class Blockette
SeedException
public void setValuesFrom(java.lang.String inputString, java.lang.String delimiter, java.lang.String blank) throws SeedException
Blockette
setValuesFrom
in class Blockette
SeedException
public void setValuesFrom(java.lang.String inputString) throws SeedException
Blockette
setValuesFrom
in class Blockette
SeedException
public boolean isIncomplete()
Blockette
isIncomplete
in class Blockette
public int getNumBytes() throws SeedException
Blockette
getNumBytes
in class Blockette
SeedException
public java.lang.String toString(int fieldNum, int fieldIndex)
Blockette
toString
in class Blockette
public java.lang.String toString(int fieldNum)
Blockette
toString
in class Blockette
public java.lang.String toString(java.lang.String delimiter, java.lang.String blank)
Blockette
toString
in class Blockette
public java.lang.String toString()
Blockette
toString
in class Blockette
public java.lang.String getName() throws SeedException
Blockette
getName
in class Blockette
SeedException
public java.lang.String getCategory() throws SeedException
Blockette
getCategory
in class Blockette
SeedException
public int getNumFields() throws SeedException
Blockette
getNumFields
in class Blockette
SeedException
public java.lang.String getFieldName(int fieldNum) throws SeedException
Blockette
getFieldName
in class Blockette
SeedException
public java.lang.String getFieldType(int fieldNum) throws SeedException
Blockette
getFieldType
in class Blockette
SeedException
public java.lang.String getFieldLength(int fieldNum) throws SeedException
Blockette
getFieldLength
in class Blockette
SeedException
public java.lang.String getFieldMask(int fieldNum) throws SeedException
Blockette
getFieldMask
in class Blockette
SeedException
public java.lang.String getDefinition() throws SeedException
Blockette
getDefinition
in class Blockette
SeedException
public java.lang.Object getFieldVal(int fieldNum, int fieldIndex) throws SeedException
Blockette
getFieldVal
in class Blockette
SeedException
public java.lang.Object getFieldVal(int fieldNum) throws SeedException
Blockette
getFieldVal
in class Blockette
SeedException
public java.util.Vector getFieldGrp(int fieldNum, int fieldIndex) throws SeedException
Blockette
getFieldGrp
in class Blockette
SeedException
public java.lang.Object getFieldObject(int fieldNum)
Blockette
getFieldObject
in class Blockette
fieldNum
- field number to return the assigned object from
public java.lang.String translate(int fieldNum) throws SeedException
Blockette
translate
in class Blockette
SeedException
public Blockette getChildBlockette(int index)
Blockette
getChildBlockette
in class Blockette
public int numberofChildBlockettes()
Blockette
numberofChildBlockettes
in class Blockette
public boolean hasParent()
Blockette
hasParent
in class Blockette
public Blockette getParentBlockette()
Blockette
getParentBlockette
in class Blockette
public Waveform getWaveform()
Blockette
getWaveform
in class Blockette
public int getDictionaryLookup(int index)
Blockette
getDictionaryLookup
in class Blockette
public int numberofDictionaryLookups()
Blockette
numberofDictionaryLookups
in class Blockette
public void setFieldVal(int fieldNum, int fieldIndex, java.lang.Object value, boolean lenient) throws SeedException
Blockette
setFieldVal
in class Blockette
SeedException
public void setFieldVal(int fieldNum, int fieldIndex, java.lang.Object value) throws SeedException
Blockette
setFieldVal
in class Blockette
SeedException
public void setFieldVal(int fieldNum, java.lang.Object value) throws SeedException
Blockette
setFieldVal
in class Blockette
SeedException
public void setFieldObject(int fieldNum, java.lang.Object fieldObj)
Blockette
setFieldObject
in class Blockette
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
Blockette
addFieldGrp
in class Blockette
SeedException
public void insertFieldGrp(int fieldNum, int fieldIndex, java.util.Vector valueVec) throws SeedException
Blockette
insertFieldGrp
in class Blockette
SeedException
public void deleteFieldGrp(int fieldNum, int fieldIndex) throws SeedException
Blockette
deleteFieldGrp
in class Blockette
SeedException
public int purgeFieldGrp(int fieldNum) throws SeedException
Blockette
purgeFieldGrp
in class Blockette
SeedException
public int addChildBlockette(Blockette addBlockette)
Blockette
addChildBlockette
in class Blockette
addBlockette
- the blockette to be added as a child to this blockette
public void removeChildBlockette(int index)
Blockette
removeChildBlockette
in class Blockette
public void replaceChildBlockette(int index, Blockette newBlockette)
Blockette
replaceChildBlockette
in class Blockette
public void attachParent(Blockette parent)
Blockette
attachParent
in class Blockette
public void removeParent()
Blockette
removeParent
in class Blockette
public void attachWaveform(Waveform data)
Blockette
attachWaveform
in class Blockette
public void removeWaveform()
Blockette
removeWaveform
in class Blockette
public int addDictionaryLookupIfNeeded(int abbrevLookupId)
Blockette
addDictionaryLookupIfNeeded
in class Blockette
public int addDictionaryLookup(int abbrevLookupId)
Blockette
addDictionaryLookup
in class Blockette
public void setDictionaryLookup(int index, int abbrevLookupId)
Blockette
setDictionaryLookup
in class Blockette
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |