de.cau.cs.kieler.uml2.sim.kiem
Class DataComponentModelCheck

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
      extended by de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
          extended by de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
              extended by de.cau.cs.kieler.uml2.sim.kiem.DataComponent
                  extended by de.cau.cs.kieler.uml2.sim.kiem.DataComponentModelCheck
All Implemented Interfaces:
IDataComponent, IJSONObjectDataComponent, IKiemEventListener, IExecutableExtension

public class DataComponentModelCheck
extends DataComponent
implements IJSONObjectDataComponent, IKiemEventListener

The Class DataComponent.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
JSONObjectSimulationDataComponent.M2MProgressMonitor
 
Field Summary
 
Fields inherited from class de.cau.cs.kieler.uml2.sim.kiem.DataComponent
blaaa, errorMsg, MAUDEERROR, MAUDENOACTION, MAUDENOEVENT, MAUDEPARSESTATESTARTER
 
Fields inherited from class de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
activePage, activePageFlag, exception, modelEditor
 
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
DataComponentModelCheck()
          Instantiates a new data component.
 
Method Summary
 KiemProperty[] doProvideProperties()
           
 JSONObject doStep(JSONObject signals)
          Implements the real step method for this simulation datacomponent.
 void initialize()
          Initialize.
 void notifyEvent(KiemEvent event)
          This is the basic notify method that is called by KIEM whenever an event occurs for which this DataComponent is registered (see AbstractDataComponent.provideEventOfInterest()).
 KiemEvent provideEventOfInterest()
          Return a KiemEvent type (integer value) that represents a number of events this component wants to listen to.

A KiemEvent can be a combination of several events.
 String[] selectCurrentState(List<String[]> currentStatesChoicesParam)
           
 void writeAndReloadSelectedEvents(JSONObject signals)
           
 
Methods inherited from class de.cau.cs.kieler.uml2.sim.kiem.DataComponent
checkModelValidation, clearConsole, doModel2ModelTransform, doProvideInitialVariables, extractActions, extractActiveStates, getAllActions, getAllEvents, getCurrentStateIds, getEMFId, getInitialStates, getInputEditor, getInputModelEObject, getMaudeBaseCodeLocation, getMaudeGenCodeLocation, getNotationElement, getXtendFacade, isWindows, printConsole, refreshWorkspace, resetAllEventsAndActions, resetMappingHashmap, transformToCygwinPath, wrapup
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
bringProblemsViewToFront, checkProperties, getActivePage, getEditor, getInputModel, getInputModelAsURI, getInputResourceSet, getInputWorkspaceModel, getModelRootElement, isObserver, isProducer, isTransformationCompleted, isTransformationError, provideFilterKeysJSON, provideInitialVariables, provideProperties, resolveBundelFile, step
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
getInitialVariables, setInitialVariables
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
finalize, getConfigurationElement, getCurrentComponentID, getDataComponentId, getName, getPluginId, getProperties, getShell, isDeltaObserver, isHistoryObserver, isHistoryStep, isInvisible, isMacroStepDone, isMaster, isMasterImplementingGUI, isMultiInstantiable, masterCommand, masterGetAimedStepDuration, masterGUI, masterGUIisEnabled, masterIsPaused, masterIsRunning, masterSetAimedStepDuration, masterSetKIEMInstance, provideFilterKeys, 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
 

Constructor Detail

DataComponentModelCheck

public DataComponentModelCheck()
Instantiates a new data component.

Method Detail

notifyEvent

public void notifyEvent(KiemEvent event)
Description copied from class: AbstractDataComponent
This is the basic notify method that is called by KIEM whenever an event occurs for which this DataComponent is registered (see AbstractDataComponent.provideEventOfInterest()).

Specified by:
notifyEvent in interface IKiemEventListener
Overrides:
notifyEvent in class AbstractDataComponent
Parameters:
event - the KiemEvent with additional attached information, depending on the specific event

provideEventOfInterest

public KiemEvent provideEventOfInterest()
Description copied from class: AbstractDataComponent
Return a KiemEvent type (integer value) that represents a number of events this component wants to listen to.

A KiemEvent can be a combination of several events. The simplest way to register for two events that e.g., indicate a step-command and the save event is to have the following code:

public KiemEvent provideEventOfInterest() {
int[] events = {KiemEvent.CMD_STEP, KiemEvent.SAVE};
KiemEvent event = new KiemEvent(events);
System.out.println(event.getEventCodesAsList());
return (event);
} * }

NOTE: The provision of event types is only read by KIEM once before the execution starts. Hence, changes during the execution are not having any effect. In doubt, this method should return more events than needed. These could dynamically be ignored when temporarily not of interest.

Specified by:
provideEventOfInterest in interface IKiemEventListener
Overrides:
provideEventOfInterest in class AbstractDataComponent
Returns:
the KiemEvent type indicating the events of interest

doProvideProperties

public KiemProperty[] doProvideProperties()
Overrides:
doProvideProperties in class DataComponent

writeAndReloadSelectedEvents

public void writeAndReloadSelectedEvents(JSONObject signals)
                                  throws KiemExecutionException
Throws:
KiemExecutionException

doStep

public JSONObject doStep(JSONObject signals)
                  throws KiemExecutionException
Description copied from class: JSONObjectSimulationDataComponent
Implements the real step method for this simulation datacomponent.

Overrides:
doStep in class DataComponent
Parameters:
signals - the j son object
Returns:
the jSON object
Throws:
KiemExecutionException - the kiem execution exception

selectCurrentState

public String[] selectCurrentState(List<String[]> currentStatesChoicesParam)
Overrides:
selectCurrentState in class DataComponent

initialize

public void initialize()
                throws KiemInitializationException
Description copied from interface: IDataComponent
Initialize. Do some initializing prior to execution. If an error occurs during initialization, the DataComponent should raise a KiemInitializationException.

Specified by:
initialize in interface IDataComponent
Overrides:
initialize in class DataComponent
Throws:
KiemInitializationException - a KiemInitializationException