com.esri.core.map
Class Field

java.lang.Object
  extended by com.esri.core.map.Field
All Implemented Interfaces:
Serializable

public class Field
extends Object
implements Serializable

The Field class represents a field of a feature layer. It includes name, alias, type and domain information of the field. Domain is optional.

See Also:
Serialized Form

Constructor Summary
Field()
          Instantiates an empty Field.
Field(String name, String alias, String type)
          Instantiates a Field with the given values.
Field(String name, String alias, String type, Domain domain)
          Instantiates a Field with the given values.
 
Method Summary
static Field fromJson(org.codehaus.jackson.JsonParser parser)
          Decodes objects from JSON representation.
 String getAlias()
          Gets the alias of the Field.
 Domain getDomain()
          Gets the domain of the Field.
 String getFieldType()
          Gets the type of the Field.
 int getLength()
          Gets the length of the Field.
 String getName()
          Gets the name of the Field.
 boolean isEditable()
          Gets the editable of the Field.
 void setLength(int length)
          Sets the length of the Field.
 String toString()
           
static boolean validFieldType(String esriFieldType)
          To check a esriFieldType is valid or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

public Field()
Instantiates an empty Field.


Field

public Field(String name,
             String alias,
             String type)
      throws Exception
Instantiates a Field with the given values.

Parameters:
name - the name of the field.
alias - the alias of the field.
type - the data type.
Throws:
Exception

Field

public Field(String name,
             String alias,
             String type,
             Domain domain)
      throws Exception
Instantiates a Field with the given values.

Parameters:
name - the name of the field.
alias - the alias of the field.
type - the data type.
domain - the domain of the field.
Throws:
Exception
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Gets the name of the Field.

Returns:
Returns the name.

getAlias

public String getAlias()
Gets the alias of the Field.

Returns:
Returns the alias.

getFieldType

public String getFieldType()
Gets the type of the Field.

Returns:
Returns the type.

isEditable

public boolean isEditable()
Gets the editable of the Field.

Returns:
Returns the editable.

getLength

public int getLength()
Gets the length of the Field.

Returns:
Returns the length.

setLength

public void setLength(int length)
Sets the length of the Field.

Parameters:
length - The length to set.

getDomain

public Domain getDomain()
Gets the domain of the Field.

Returns:
Returns the domain.

fromJson

public static Field fromJson(org.codehaus.jackson.JsonParser parser)
                      throws Exception
Decodes objects from JSON representation.

Parameters:
parser - the Jackson parser holding the JSON data.
Returns:
the decoded object from JSON representation.
Throws:
Exception

validFieldType

public static boolean validFieldType(String esriFieldType)
To check a esriFieldType is valid or not.

Parameters:
esriFieldType - eg: Constants.esriFieldTypeInteger
Returns:
true if valid field type, else false


Copyright © 2010. All Rights Reserved.