public class DDFFieldDefinition extends java.lang.Object implements DDFConstants
Modifier and Type | Class and Description |
---|---|
static class |
DDFFieldDefinition.DataStructCode |
static class |
DDFFieldDefinition.DataTypeCode |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_arrayDescr |
protected DDFFieldDefinition.DataStructCode |
_data_struct_code |
protected DDFFieldDefinition.DataTypeCode |
_data_type_code |
protected java.lang.String |
_fieldName |
protected java.lang.String |
_formatControls |
protected boolean |
bRepeatingSubfields |
protected int |
nFixedWidth |
protected java.util.Vector |
paoSubfieldDefns |
protected DDFModule |
poModule |
protected java.lang.String |
pszTag |
DDF_FIELD_TERMINATOR, DDF_LEADER_SIZE, DDF_UNIT_TERMINATOR
Constructor and Description |
---|
DDFFieldDefinition() |
DDFFieldDefinition(DDFModule poModuleIn,
java.lang.String pszTagIn,
byte[] pachFieldArea) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
applyFormats(java.lang.String _formatControls)
This method parses the format string partially, and then
applies a subfield format string to each subfield object.
|
protected boolean |
buildSubfieldDefns(java.lang.String pszSublist)
Based on the list contained in the string, build a set of
subfield definitions.
|
protected java.lang.String |
expandFormat(java.lang.String pszSrc)
Given a string that contains a coded size symbol, expand it
out.
|
protected java.lang.String |
extractSubstring(java.lang.String pszSrc)
Extract a substring terminated by a comma (or end of string).
|
DDFSubfieldDefinition |
findSubfieldDefn(java.lang.String pszMnemonic)
Find a subfield definition by it's mnemonic tag.
|
java.lang.String |
getDescription()
Fetch a longer descriptio of this field.
|
int |
getFixedWidth()
Get the width of this field.
|
java.lang.String |
getName()
Fetch a pointer to the field name (tag).
|
int |
getSubfieldCount()
Get the number of subfields.
|
DDFSubfieldDefinition |
getSubfieldDefn(int i)
Fetch a subfield by index.
|
boolean |
initialize(DDFModule poModuleIn,
java.lang.String pszTagIn,
byte[] pachFieldArea)
Initialize the field definition from the information in the DDR
record.
|
boolean |
isRepeating()
Fetch repeating flag.
|
void |
setRepeating(boolean val)
this is just for an S-57 hack for swedish data
|
java.lang.String |
toString()
Write out field definition info.
|
protected DDFModule poModule
protected java.lang.String pszTag
protected java.lang.String _fieldName
protected java.lang.String _arrayDescr
protected java.lang.String _formatControls
protected boolean bRepeatingSubfields
protected int nFixedWidth
protected DDFFieldDefinition.DataStructCode _data_struct_code
protected DDFFieldDefinition.DataTypeCode _data_type_code
protected java.util.Vector paoSubfieldDefns
public DDFFieldDefinition()
public DDFFieldDefinition(DDFModule poModuleIn, java.lang.String pszTagIn, byte[] pachFieldArea)
public java.lang.String getName()
public java.lang.String getDescription()
public int getSubfieldCount()
public int getFixedWidth()
public boolean isRepeating()
public void setRepeating(boolean val)
public boolean initialize(DDFModule poModuleIn, java.lang.String pszTagIn, byte[] pachFieldArea)
poModuleIn
- DDFModule representing file being read.pszTagIn
- the name of this field.pachFieldArea
- the data bytes in the file representing
the field from the header.public java.lang.String toString()
toString
in class java.lang.Object
protected boolean buildSubfieldDefns(java.lang.String pszSublist)
protected java.lang.String extractSubstring(java.lang.String pszSrc)
Given a string like "(A,3(B,C),D),X,Y)" return "A,3(B,C),D". Give a string like "3A,2C" return "3A".
protected java.lang.String expandFormat(java.lang.String pszSrc)
protected boolean applyFormats(java.lang.String _formatControls)
public DDFSubfieldDefinition findSubfieldDefn(java.lang.String pszMnemonic)
pszMnemonic
- The name of the field.public DDFSubfieldDefinition getSubfieldDefn(int i)
i
- The index subfield index. (Between 0 and
GetSubfieldCount()-1)Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details