de.cau.cs.kieler.sim.kiem
Class JSONObjectDataComponent

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
      extended by de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
All Implemented Interfaces:
IDataComponent, IJSONObjectDataComponent, IExecutableExtension
Direct Known Subclasses:
AbstractTransformationDataComponent, Backhoe, ConfigDataComponent, DataComponent, Elevator, Example_01, Example_02, InputDataComponent, JSONObjectSimulationDataComponent, KaomSimDataComponent, KEVDataObserver, KEVExampleDataProducer, KiemCsvDataProvider, KiemDataProvider, KiViDataComponent, KlotsEditorNXTDataObserver, NXTDataDistributor, OutputDataComponent, SJInstructionsViewNXTDataObserver, SJValidationSimulatorDataComponent, StateMachineKiViDataComponent

public abstract class JSONObjectDataComponent
extends AbstractDataComponent
implements IJSONObjectDataComponent

The Class JSONObjectDataComponent. Implementation for the extension point JSONObjectDataComponent that implements the interface IJSONObjectDataComponent.

Rating yellow
(2009-01-15)

Field Summary
 
Fields inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
MASTER_CMD_MACROSTEP, MASTER_CMD_PAUSE, MASTER_CMD_RUN, MASTER_CMD_STEP, MASTER_CMD_STEPBACK, MASTER_CMD_STOP
 
Constructor Summary
JSONObjectDataComponent()
          Instantiates a new JSONObjectDataComponent.
 
Method Summary
protected  JSONObject getInitialVariables()
          Gets the (global) interface variables.
 JSONObject provideFilterKeysJSON()
          Provide filter keys and default values as a JSONObject.
 JSONObject provideInitialVariables()
          Provide (local) interface variables and possible initial values.
 void setInitialVariables(JSONObject globalInitialVariablesParam)
          Sets the global interface variables and their initial values.
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
checkProperties, finalize, getConfigurationElement, getCurrentComponentID, getDataComponentId, getName, getPluginId, getProperties, getShell, isDeltaObserver, isHistoryObserver, isHistoryStep, isInvisible, isMacroStepDone, isMaster, isMasterImplementingGUI, isMultiInstantiable, masterCommand, masterGetAimedStepDuration, masterGUI, masterGUIisEnabled, masterIsPaused, masterIsRunning, masterSetAimedStepDuration, masterSetKIEMInstance, notifyEvent, provideEventOfInterest, provideFilterKeys, provideProperties, setConfigurationElemenet, setCurrentComponentID, setHistoryStep, setInitializationData, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cau.cs.kieler.sim.kiem.IJSONObjectDataComponent
step
 
Methods inherited from interface de.cau.cs.kieler.sim.kiem.IDataComponent
initialize, isObserver, isProducer, wrapup
 

Constructor Detail

JSONObjectDataComponent

public JSONObjectDataComponent()
Instantiates a new JSONObjectDataComponent.

Method Detail

provideFilterKeysJSON

public JSONObject provideFilterKeysJSON()
Provide filter keys and default values as a JSONObject.

Returns:
the JSONObject

setInitialVariables

public final void setInitialVariables(JSONObject globalInitialVariablesParam)
Sets the global interface variables and their initial values. This method is called by the execution manager during the initialization phase.

Parameters:
globalInitialVariablesParam - the global initial variables

getInitialVariables

protected final JSONObject getInitialVariables()
Gets the (global) interface variables. Can be used by the DataComponent itself to retrieve information about global interface variables.

Returns:
the global initial variables

provideInitialVariables

public JSONObject provideInitialVariables()
                                   throws KiemInitializationException
Provide (local) interface variables and possible initial values. This is an optional method that will provide some interface variable keys and values that can be used by other DataComponents within and after the initialization phase every DataComponent may receive the union of all those variable keys by calling the getInitialVariables() method.

Returns:
the local initial variables as a JSONObject
Throws:
KiemInitializationException - if a property prevents the execution of this DataComponent this error should be thrown