com.splunk
Class DataModelField

java.lang.Object
  extended by com.splunk.DataModelField

public class DataModelField
extends java.lang.Object

Represents a field of a data model object.


Method Summary
 java.lang.String getComment()
           
 java.lang.String getDisplayName()
           
 java.lang.String getFieldSearch()
           
 java.lang.String getName()
           
 java.lang.String[] getOwnerLineage()
          Return the lineage of the data model object on which this field is defined.
 java.lang.String getOwnerName()
          Return the name of the data model object on which this field is defined.
 FieldType getType()
           
 boolean isEditable()
          Some fields are part of system objects such as BaseEvent or are part of the structure of the object, such as a field with the same name as the object.
 boolean isHidden()
           
 boolean isMultivalued()
           
 boolean isRequired()
           
static DataModelField parse(com.google.gson.JsonElement fieldJson)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFieldSearch

public java.lang.String getFieldSearch()
Returns:
a search query fragment for this field.

getName

public java.lang.String getName()
Returns:
The name of this field.

getOwnerName

public java.lang.String getOwnerName()
Return the name of the data model object on which this field is defined. That need not be the data model object you accessed it from. It can be one of its ancestors.

Returns:
The name of the DataModelObject that owns this field.

getOwnerLineage

public java.lang.String[] getOwnerLineage()
Return the lineage of the data model object on which this field is defined. That need not be the data model object you accessed it from. It can be one of its ancestors.

Returns:
An array of names of DataModelObjects representing the lineage of this field's owner.

getType

public FieldType getType()
Returns:
The type of this field.

isEditable

public boolean isEditable()
Some fields are part of system objects such as BaseEvent or are part of the structure of the object, such as a field with the same name as the object. Those fields cannot be edited. This method returns whether the field is one of these protected fields.

Returns:
whether this field can be edited.

isRequired

public boolean isRequired()
Returns:
whether this field is required on events in the object.

isMultivalued

public boolean isMultivalued()
Returns:
whether this field is can be multivalued.

isHidden

public boolean isHidden()
Returns:
whether this field should be displayed in a data model UI.

getDisplayName

public java.lang.String getDisplayName()
Returns:
a human readable name for this field.

getComment

public java.lang.String getComment()
Returns:
a comment on this field (if there is one), or null.

parse

public static DataModelField parse(com.google.gson.JsonElement fieldJson)