Package org.gdal.ogr
Class FieldDefn
java.lang.Object
org.gdal.ogr.FieldDefn
Definition of an attribute of a FeatureDefn.
The FieldDefn class is a binding for the C++ OGRFieldDefn class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()booleanintReturn the field typeGetFieldTypeName(int type) Fetch human readable name for a field type.intGet the justification for this field.GetName()Fetch name of this field.Fetch name of this field.intGet the formatting precision for this field.intintGetType()Fetch human readable name for the fieldintintGetWidth()Get the formatting width for this field.inthashCode()intintReturn whether this field should be omitted when fetching features.intintIsUnique()voidSetAlternativeName(String alternativeName) voidSetComment(String comment) voidSetDefault(String pszValue) voidSetDomainName(String name) voidSetIgnored(int bIgnored) Set whether this field should be omitted when fetching features.voidSetJustify(int justify) Set the justification for this field.voidReset the name of this field.voidSetNullable(int bNullable) voidSetPrecision(int precision) Set the formatting precision for this field in characters.voidSetSubType(int type) voidSetType(int type) Set the type of this field.voidSetTZFlag(int tzflag) voidSetUnique(int bUnique) voidSetWidth(int width) Set the formatting width for this field in characters.
-
Constructor Details
-
FieldDefn
Constructor.- Parameters:
name- the name of the new field.field_type- the type of the new field.
-
FieldDefn
Constructor.The new field will be of type OFTString
- Parameters:
name- the name of the new field.- Since:
- Java bindings 1.7.0
-
FieldDefn
public FieldDefn()Constructor.The new field will be named "unnamed" and of type OFTString
- Since:
- Java bindings 1.7.0
-
-
Method Details
-
delete
public void delete() -
equals
-
hashCode
-
GetName
-
GetNameRef
-
SetName
Reset the name of this field.- Parameters:
name- the new name to apply.
-
GetAlternativeName
-
GetAlternativeNameRef
-
SetAlternativeName
-
GetType
public int GetType() -
SetType
public void SetType(int type) Set the type of this field.This should never be done to an FieldDefn that is already part of an FeatureDefn.
- Parameters:
type- the new field type.
-
GetFieldType
public int GetFieldType()Return the field type- Returns:
- the field type
-
GetSubType
public int GetSubType() -
SetSubType
public void SetSubType(int type) -
GetJustify
public int GetJustify()Get the justification for this field.- Returns:
- the justification.
-
SetJustify
public void SetJustify(int justify) Set the justification for this field.- Parameters:
justify- the new justification.
-
GetWidth
public int GetWidth()Get the formatting width for this field.- Returns:
- the width, zero means no specified width.
-
SetWidth
public void SetWidth(int width) Set the formatting width for this field in characters.- Parameters:
width- the new width.
-
GetPrecision
public int GetPrecision()Get the formatting precision for this field.This should normally be zero for fields of types other than OFTReal.
- Returns:
- the precision.
-
SetPrecision
public void SetPrecision(int precision) Set the formatting precision for this field in characters.This should normally be zero for fields of types other than OFTReal.
- Parameters:
precision- the new precision.
-
GetTZFlag
public int GetTZFlag() -
SetTZFlag
public void SetTZFlag(int tzflag) -
GetTypeName
-
GetFieldTypeName
Fetch human readable name for a field type.- Parameters:
type- the field type to get name for.- Returns:
- field type name
-
IsIgnored
public int IsIgnored()Return whether this field should be omitted when fetching features.- Returns:
- ignore state (1 if ignored, 0 otherwise)
- Since:
- OGR 1.8.0
-
SetIgnored
public void SetIgnored(int bIgnored) Set whether this field should be omitted when fetching features.- Parameters:
bIgnored- ignore state (1 to ignore, 0 otherwise)- Since:
- OGR 1.8.0
-
IsNullable
public int IsNullable() -
SetNullable
public void SetNullable(int bNullable) -
IsUnique
public int IsUnique() -
SetUnique
public void SetUnique(int bUnique) -
GetDefault
-
SetDefault
-
IsDefaultDriverSpecific
public int IsDefaultDriverSpecific() -
GetDomainName
-
SetDomainName
-
GetComment
-
SetComment
-