public class FieldDefn extends Object
The FieldDefn class is a binding for the C++ OGRFieldDefn class.
Constructor and Description |
---|
FieldDefn()
Constructor.
|
FieldDefn(String name)
Constructor.
|
FieldDefn(String name,
int field_type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
delete() |
boolean |
equals(Object obj) |
int |
GetFieldType()
Return the field type
|
String |
GetFieldTypeName(int type)
Fetch human readable name for a field type.
|
int |
GetJustify()
Get the justification for this field.
|
String |
GetName()
Fetch name of this field.
|
String |
GetNameRef()
Fetch name of this field.
|
int |
GetPrecision()
Get the formatting precision for this field.
|
String |
GetTypeName()
Fetch human readable name for the field
|
int |
GetWidth()
Get the formatting width for this field.
|
int |
hashCode() |
int |
IsIgnored()
Return whether this field should be omitted when fetching features.
|
void |
SetIgnored(int bIgnored)
Set whether this field should be omitted when fetching features.
|
void |
SetJustify(int justify)
Set the justification for this field.
|
void |
SetName(String name)
Reset the name of this field.
|
void |
SetPrecision(int precision)
Set the formatting precision for this field in characters.
|
void |
SetType(int type)
Set the type of this field.
|
void |
SetWidth(int width)
Set the formatting width for this field in characters.
|
public FieldDefn(String name, int field_type)
name
- the name of the new field.field_type
- the type of the new field.public FieldDefn(String name)
The new field will be of type OFTString
name
- the name of the new field.public FieldDefn()
The new field will be named "unnamed" and of type OFTString
public void delete()
public String GetName()
public String GetNameRef()
public void SetName(String name)
name
- the new name to apply.public int GetFieldType()
public void SetType(int type)
This should never be done to an FieldDefn that is already part of an FeatureDefn.
type
- the new field type.public int GetJustify()
public void SetJustify(int justify)
justify
- the new justification.public int GetWidth()
public void SetWidth(int width)
width
- the new width.public int GetPrecision()
This should normally be zero for fields of types other than OFTReal.
public void SetPrecision(int precision)
This should normally be zero for fields of types other than OFTReal.
precision
- the new precision.public String GetTypeName()
public String GetFieldTypeName(int type)
type
- the field type to get name for.public int IsIgnored()
public void SetIgnored(int bIgnored)
bIgnored
- ignore state (1 to ignore, 0 otherwise)