|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.dataAccess.iso8211.DDFField
public class DDFField
This object represents one field in a DDFRecord. This models an instance of the fields data, rather than it's data definition which is handled by the DDFFieldDefn class. Note that a DDFField doesn't have DDFSubfield children as you would expect. To extract subfield values use GetSubfieldData() to find the right data pointer and then use ExtractIntData(), ExtractFloatData() or ExtractStringData().
Field Summary | |
---|---|
protected int |
dataLength
|
protected int |
dataPosition
|
protected int |
headerOffset
|
protected byte[] |
pachData
|
protected DDFFieldDefinition |
poDefn
|
protected java.util.Hashtable |
subfields
|
Constructor Summary | |
---|---|
DDFField()
|
|
DDFField(DDFFieldDefinition poDefnIn,
byte[] pachDataIn)
|
|
DDFField(DDFFieldDefinition poDefnIn,
byte[] pachDataIn,
boolean doSubfields)
|
|
DDFField(DDFFieldDefinition poDefnIn,
int dataPositionIn,
int dataLengthIn)
|
Method Summary | |
---|---|
protected void |
addSubfield(DDFSubfield ddfs)
|
void |
buildSubfields()
|
byte[] |
getData()
Return the pointer to the entire data block for this record. |
int |
getDataLength()
If getData() returns null, it'll be your responsibilty to go after the data you need for this field. |
int |
getDataPosition()
If getData() returns null, it'll be your responsibilty to go after the data you need for this field. |
int |
getDataSize()
Return the number of bytes in the data block returned by GetData(). |
DDFFieldDefinition |
getFieldDefn()
Fetch the corresponding DDFFieldDefn. |
int |
getHeaderOffset()
Get how many bytes to add to the data position for absolute position in the data file for the field data. |
int |
getRepeatCount()
How many times do the subfields of this record repeat? This will always be one for non-repeating fields. |
DDFSubfield |
getSubfield(java.lang.String subfieldName)
Will return a DDFSubfield object with the given name, or the first one off the list for a repeating subfield. |
byte[] |
getSubfieldData(DDFSubfieldDefinition poSFDefn,
MutableInt pnMaxBytes,
int iSubfieldIndex)
Fetch raw data pointer for a particular subfield of this field. |
java.util.List |
getSubfields(java.lang.String subfieldName)
Will return an ordered list of DDFSubfield objects. |
void |
initialize(DDFFieldDefinition poDefnIn,
byte[] pachDataIn)
|
protected void |
setHeaderOffset(int headerOffsetIn)
Set how many bytes to add to the data position for absolute position in the data file for the field data. |
java.lang.String |
toString()
Creates a string with variety of information about this field, and all it's subfields is written to the given debugging file handle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected DDFFieldDefinition poDefn
protected byte[] pachData
protected java.util.Hashtable subfields
protected int dataPosition
protected int dataLength
protected int headerOffset
Constructor Detail |
---|
public DDFField()
public DDFField(DDFFieldDefinition poDefnIn, int dataPositionIn, int dataLengthIn)
public DDFField(DDFFieldDefinition poDefnIn, byte[] pachDataIn)
public DDFField(DDFFieldDefinition poDefnIn, byte[] pachDataIn, boolean doSubfields)
Method Detail |
---|
public void initialize(DDFFieldDefinition poDefnIn, byte[] pachDataIn)
protected void setHeaderOffset(int headerOffsetIn)
public int getHeaderOffset()
public byte[] getData()
public int getDataSize()
public DDFFieldDefinition getFieldDefn()
public int getDataPosition()
public int getDataLength()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List getSubfields(java.lang.String subfieldName)
public DDFSubfield getSubfield(java.lang.String subfieldName)
public byte[] getSubfieldData(DDFSubfieldDefinition poSFDefn, MutableInt pnMaxBytes, int iSubfieldIndex)
poSFDefn
- The definition of the subfield for which the
raw data pointer is desired.pnMaxBytes
- The maximum number of bytes that can be
accessed from the returned data pointer is placed in
this int, unless it is null.iSubfieldIndex
- The instance of this subfield to fetch.
Use zero (the default) for the first instance.
public void buildSubfields()
protected void addSubfield(DDFSubfield ddfs)
public int getRepeatCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |