com.splunk
Class DataModel

java.lang.Object
  extended by com.splunk.Resource
      extended by com.splunk.Entity
          extended by com.splunk.DataModel
All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>

public class DataModel
extends Entity

DataModel represents a data model on the server. Data models contain data model objects, which specify structured views on Splunk data.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Method Summary
 boolean containsObject(java.lang.String name)
          Returns whether there is an object of the given name in this data model.
 java.lang.String getAccelerationCronSchedule()
          Return the cron schedule on which the cached data for acceleration should be updated.
 java.lang.String getAccelerationNamespace()
          Returns the tsidx namespace which holds global acceleration events for this data model.
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
 java.lang.String getEarliestAcceleratedTime()
          Return the earliest time of the window over which the data model is accelerated.
 DataModelObject getObject(java.lang.String name)
          Retrieve an object by name from this data model.
 java.util.Collection<DataModelObject> getObjects()
           
 java.lang.String getRawJson()
           
 boolean isAccelerated()
           
 void setAcceleration(boolean enabled)
          Enable or disable global acceleration on this data model.
 void setAccelerationCronSchedule(java.lang.String accelerationCronSchedule)
          Set the cron schedule on which the cached data for the acceleration should be updated.
 void setEarliestAcceleratedTime(java.lang.String earliestAcceleratedTime)
          Set the size of the window (from the specified earliest time to now) over which the data model should be accelerated.
 void update()
          Updates the entity with the accumulated arguments, established by the individual setter methods for each specific entity class.
 
Methods inherited from class com.splunk.Entity
clear, containsKey, containsValue, disable, enable, entrySet, get, getMetadata, isDisabled, isEmpty, keySet, put, putAll, refresh, remove, remove, size, update, validate, values
 
Methods inherited from class com.splunk.Resource
getName, getPath, getService, getTitle, invalidate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

containsObject

public boolean containsObject(java.lang.String name)
Returns whether there is an object of the given name in this data model.

Parameters:
name - Name of the object to check for.
Returns:
true if there is an object with that name; false otherwise.

getObject

public DataModelObject getObject(java.lang.String name)
Retrieve an object by name from this data model.

Parameters:
name - Name of the object to retrieve.
Returns:
a DataModelObject if there is such an object; null otherwise.

getObjects

public java.util.Collection<DataModelObject> getObjects()
Returns:
a collection of all objects in this data model.

getAccelerationNamespace

public java.lang.String getAccelerationNamespace()
Returns the tsidx namespace which holds global acceleration events for this data model. The namespace will be returned whether acceleration is enabled or not.

Returns:
The tsidx namespace for global acceleration of this data model.

isAccelerated

public boolean isAccelerated()
Returns:
whether global acceleration is enabled for this data model.

getDescription

public java.lang.String getDescription()
Returns:
A human readable description of this data model.

getRawJson

public java.lang.String getRawJson()
Returns:
The raw JSON describing this data model and its objects.

getDisplayName

public java.lang.String getDisplayName()
Returns:
the human readable name of this data model.

setAcceleration

public void setAcceleration(boolean enabled)
Enable or disable global acceleration on this data model.

Parameters:
enabled - true enabled, false disables.

getEarliestAcceleratedTime

public java.lang.String getEarliestAcceleratedTime()
Return the earliest time of the window over which the data model is accelerated. Times are represented relative to now, given by a minus sign, a number, and a suffix indicating the time unit (e.g., "-2mon", "-1day").

Returns:
a string representing the earliest accelerated time.

setEarliestAcceleratedTime

public void setEarliestAcceleratedTime(java.lang.String earliestAcceleratedTime)
Set the size of the window (from the specified earliest time to now) over which the data model should be accelerated. Times are represented relative to now, given by a minus sign, a number, and a suffix indicating the time unit (e.g., "-2mon", "-1day").

Parameters:
earliestAcceleratedTime - a string specifying a time.

getAccelerationCronSchedule

public java.lang.String getAccelerationCronSchedule()
Return the cron schedule on which the cached data for acceleration should be updated.

Returns:
a string containing a crontab style schedule specification.

setAccelerationCronSchedule

public void setAccelerationCronSchedule(java.lang.String accelerationCronSchedule)
Set the cron schedule on which the cached data for the acceleration should be updated.

Parameters:
accelerationCronSchedule - a crontab style schedule to use.

update

public void update()
Description copied from class: Entity
Updates the entity with the accumulated arguments, established by the individual setter methods for each specific entity class.

Overrides:
update in class Entity