com.altair.hwm.interfaces
Interface IHWMDataModel

All Superinterfaces:
HWMDataModel
All Known Implementing Classes:
HWMDataModelImpl

public interface IHWMDataModel
extends HWMDataModel

Title: IHWMDataModel

Description: The data model interface. It extends from HWMDataModel to remain compatible with previous versions

Company: Altair Engineering, Inc.


Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
          Add a listener
 void addPropertyChangeListener(java.lang.String strName, java.beans.PropertyChangeListener propChangeListener)
          Add a listener for a particular property
 void ChangePropertyName(java.lang.String strOldName, java.lang.String strNewName)
          Change the name of a property in the datamodel.
 void ClearAll()
          Clears all the properties
 void CopyRun(java.lang.String strRunName, java.lang.String strCopyRunName)
          Create a new run as a copy of an existing run
 java.util.Hashtable CreateRun(java.lang.String strRunName, boolean bCopyScratchPad)
          Create the data for the given run #
 void DeleteRun(java.lang.String strRunName)
          Delete the data for the given run name
 void FireEvent(java.lang.Object objSender, java.lang.String strPropName, java.lang.Object objOldVal, java.lang.Object objNewVal)
          Fire event to all the listeners
 void FireEvent(java.beans.PropertyChangeEvent propChangeEvent)
          Fire event to all the listeners
 void FireEvent(java.lang.String strPropName, java.lang.Object objOldVal, java.lang.Object objNewVal)
          Fire event to all the listeners
 java.lang.String GetActiveRunName()
          Return the active run name
 java.util.Vector GetAllPropertyNames()
          Get a list of all properties avaliable in the datamodel
 java.util.Hashtable GetDataFromScratchPad()
          ADDED DURING DATA MODEL VIEWER DEVELOPMENT Returns the ScratchPad Data that are stored in DataModel
 HWMDataModelViewerMgr GetDataModelViewerMgr()
          Return the HWMDataModelViewerMgr, which manages data model viewer
 boolean GetEnable(java.lang.String strBeanInstance)
          Gets the property "enable".
 java.lang.Object GetProperty(java.lang.String strName)
          Gets the property value
 java.lang.Object GetProperty(java.lang.String strBeanInstance, java.lang.String strName)
          Gets the property value.
 int GetRunCount()
          Return the number of runs
 java.util.Vector GetRunNames()
          Return the names of all runs
 java.lang.Object GetValue(java.lang.String strBeanInstance)
          Gets the property value.
 boolean GetVisible(java.lang.String strBeanInstance)
          Gets the property "visible".
 boolean IsPropertyTransient(java.lang.String strPropName)
          Returns a flag indicating if the property is set as transient
 void ReadDataModel(org.jdom.Element elemDataModel)
          Reads the data model from a XML element
 void RemoveProperty(java.lang.String strName)
          Remove the property value
 void removePropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
          Removes a listener
 void removePropertyChangeListener(java.lang.String strName, java.beans.PropertyChangeListener propChangeListener)
          Remove a listener for a particular property
 void RemovePropertyFromActiveRun(java.lang.String strRunName, java.lang.String strName)
          Remove the property value from run name
 void SetActiveRun(java.lang.String strRunName)
          Set the given run as active
 void SetEnable(java.lang.String strBeanInstance, boolean bEnable)
          Sets the property "enable".
 void SetProperty(java.lang.String strName, java.lang.Object objNewValue)
          Sets the property value
 void SetProperty(java.lang.String strBeanInstance, java.lang.String strName, java.lang.Object objNewValue)
          Sets the property value.
 void SetPropertyAsTransient(java.lang.String strPropName, boolean bTransient)
          Sets the property to be transient or non-transient
 void SetPropertyInActiveRun(java.lang.String strBeanInstance, java.lang.String strName, java.lang.Object objNewValue)
          Sets the property value in the active run.
 void SetPropertyUsingSender(java.lang.Object objSender, java.lang.String strName, java.lang.Object objNewValue)
          Sets the property value.
 void SetPropertyUsingSender(java.lang.Object objSender, java.lang.String strBeanInstance, java.lang.String strName, java.lang.Object objNewValue)
          Sets the property value.
 void SetValue(java.lang.String strBeanInstance, java.lang.Object objNewValue)
          Sets the property value.
 void SetValueInActiveRun(java.lang.String strBeanInstance, java.lang.Object objNewValue)
          Sets the property value in active run.
 void SetVisible(java.lang.String strBeanInstance, boolean bVisible)
          Sets the property "visible".
 void ShowDataViewer()
          Show the Data Model Viewer
 void WriteDataModel(org.jdom.Element elemDataModel)
          Writes the data model to a XML element
 

Method Detail

SetPropertyAsTransient

void SetPropertyAsTransient(java.lang.String strPropName,
                            boolean bTransient)
Sets the property to be transient or non-transient

Specified by:
SetPropertyAsTransient in interface HWMDataModel
Parameters:
strPropName - The name of the property
bTransient - If true, this property is set to transient i.e. not saved. Else, it is saved.

IsPropertyTransient

boolean IsPropertyTransient(java.lang.String strPropName)
Returns a flag indicating if the property is set as transient

Specified by:
IsPropertyTransient in interface HWMDataModel
Parameters:
strPropName - The name of the property
Returns:
boolean Returns true if this property is set as transient else returns false.

SetProperty

void SetProperty(java.lang.String strName,
                 java.lang.Object objNewValue)
Sets the property value

Specified by:
SetProperty in interface HWMDataModel
Parameters:
strName - The name of the property
objNewValue - The value for the given property

SetPropertyUsingSender

void SetPropertyUsingSender(java.lang.Object objSender,
                            java.lang.String strName,
                            java.lang.Object objNewValue)
Sets the property value. The sender object is not fired an event about the change

Parameters:
objSender - The sender who should not be notified (can be null)
strName - The name of the property
objNewValue - The value for the given property

SetProperty

void SetProperty(java.lang.String strBeanInstance,
                 java.lang.String strName,
                 java.lang.Object objNewValue)
Sets the property value. The datamodel will concatenate and store the data as "BeanInstance.PropertyName". It is will also fire an event to the bean whose property is being changed strBeanInstance The Bean instance whose property is being set

Parameters:
strName - The name of the property
objNewValue - The value for the given property

SetPropertyUsingSender

void SetPropertyUsingSender(java.lang.Object objSender,
                            java.lang.String strBeanInstance,
                            java.lang.String strName,
                            java.lang.Object objNewValue)
Sets the property value. The datamodel will concatenate and store the data as "BeanInstance.PropertyName". It is will also fire an event to the bean whose property is being changed except to the Sender object

Parameters:
objSender - The sender who should not be notified (can be null)
strBeanInstance - The Bean instance whose property is being set
strName - The name of the property
objNewValue - The value for the given property

GetProperty

java.lang.Object GetProperty(java.lang.String strName)
Gets the property value

Specified by:
GetProperty in interface HWMDataModel
Parameters:
strName - The name of the property
Returns:
Object The value for the given property. If such a property does not exist, then null

GetProperty

java.lang.Object GetProperty(java.lang.String strBeanInstance,
                             java.lang.String strName)
Gets the property value. The datamodel will concatenate and get the data "BeanInstance.PropertyName". strBeanInstance The Bean instance whose property is being set

Parameters:
strName - The name of the property
Returns:
Object The value for the given property. If such a property does not exist, then null

SetValue

void SetValue(java.lang.String strBeanInstance,
              java.lang.Object objNewValue)
Sets the property value. The datamodel will concatenate and store the data as "BeanInstance.value". It is will also fire an event to the bean whose property is being changed

Parameters:
strBeanInstance - The Bean instance whose property is being set
objNewValue - The value for the given property

GetValue

java.lang.Object GetValue(java.lang.String strBeanInstance)
Gets the property value. The datamodel will concatenate and get the data "BeanInstance.value".

Parameters:
strBeanInstance - The Bean instance whose property is being set
Returns:
Object The value for the given property. If such a property does not exist, then null

SetEnable

void SetEnable(java.lang.String strBeanInstance,
               boolean bEnable)
Sets the property "enable". The datamodel will concatenate and store the data as "BeanInstance.enable". It is will also fire an event to the bean whose property is being changed

Parameters:
strBeanInstance - The Bean instance whose property is being set
bEnable - The enable state

GetEnable

boolean GetEnable(java.lang.String strBeanInstance)
Gets the property "enable". The datamodel will concatenate and get the data "BeanInstance.enable".

Parameters:
strBeanInstance - The Bean instance whose property is being set
Returns:
boolean The enable state (true by default)

SetVisible

void SetVisible(java.lang.String strBeanInstance,
                boolean bVisible)
Sets the property "visible". The datamodel will concatenate and store the data as "BeanInstance.visible". It is will also fire an event to the bean whose property is being changed

Parameters:
strBeanInstance - The Bean instance whose property is being set
bVisible - The visible state

GetVisible

boolean GetVisible(java.lang.String strBeanInstance)
Gets the property "visible". The datamodel will concatenate and get the data "BeanInstance.visible".

Parameters:
strBeanInstance - The Bean instance whose property is being set
Returns:
boolean The enable state (true by default)

RemoveProperty

void RemoveProperty(java.lang.String strName)
Remove the property value

Specified by:
RemoveProperty in interface HWMDataModel
Parameters:
strName - The name of the property to remove

ChangePropertyName

void ChangePropertyName(java.lang.String strOldName,
                        java.lang.String strNewName)
Change the name of a property in the datamodel. The datamodel will do nothing if a property by the old name does not exist in the datamodel

Parameters:
strOldName - The old name of the property
strNewName - The new name of the property.

FireEvent

void FireEvent(java.beans.PropertyChangeEvent propChangeEvent)
Fire event to all the listeners

Specified by:
FireEvent in interface HWMDataModel
Parameters:
propChangeEvent - The property change event.

FireEvent

void FireEvent(java.lang.String strPropName,
               java.lang.Object objOldVal,
               java.lang.Object objNewVal)
Fire event to all the listeners

Specified by:
FireEvent in interface HWMDataModel
Parameters:
strPropName - The property name.
objOldVal - The old value for the property.
objNewVal - The new value for the property. NOTE: If the oldValue = newValue, then the event is not fired

FireEvent

void FireEvent(java.lang.Object objSender,
               java.lang.String strPropName,
               java.lang.Object objOldVal,
               java.lang.Object objNewVal)
Fire event to all the listeners

Parameters:
objSender - The sender who should not be notified (can be null)
strPropName - The property name.
objOldVal - The old value for the property.
objNewVal - The new value for the property. NOTE: If the oldValue = newValue, then the event is not fired

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
Add a listener

Specified by:
addPropertyChangeListener in interface HWMDataModel
Parameters:
propChangeListener - The listener object which will be notified.

addPropertyChangeListener

void addPropertyChangeListener(java.lang.String strName,
                               java.beans.PropertyChangeListener propChangeListener)
Add a listener for a particular property

Specified by:
addPropertyChangeListener in interface HWMDataModel
Parameters:
strName - Name of the property to listen to.
propChangeListener - The listener object which will be notified.

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener propChangeListener)
Removes a listener

Specified by:
removePropertyChangeListener in interface HWMDataModel
Parameters:
propChangeListener - The listener object which will be removed.

removePropertyChangeListener

void removePropertyChangeListener(java.lang.String strName,
                                  java.beans.PropertyChangeListener propChangeListener)
Remove a listener for a particular property

Specified by:
removePropertyChangeListener in interface HWMDataModel
Parameters:
strName - Name of the property.
propChangeListener - The listener object which should be removed.

ClearAll

void ClearAll()
Clears all the properties

Specified by:
ClearAll in interface HWMDataModel

GetAllPropertyNames

java.util.Vector GetAllPropertyNames()
Get a list of all properties avaliable in the datamodel

Returns:
Vector A vector of the property names in the datamodel

GetDataFromScratchPad

java.util.Hashtable GetDataFromScratchPad()
ADDED DURING DATA MODEL VIEWER DEVELOPMENT Returns the ScratchPad Data that are stored in DataModel

Returns:
Hashtable - The Data from ScratchPad

ReadDataModel

void ReadDataModel(org.jdom.Element elemDataModel)
                   throws java.io.IOException,
                          java.lang.ClassNotFoundException
Reads the data model from a XML element

Specified by:
ReadDataModel in interface HWMDataModel
Parameters:
elemDataModel - The element representing the datamodel
Throws:
IOException, - ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException

WriteDataModel

void WriteDataModel(org.jdom.Element elemDataModel)
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException
Writes the data model to a XML element

Specified by:
WriteDataModel in interface HWMDataModel
Parameters:
elemDataModel - The element representing the datamodel
Throws:
IOException, - ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException

SetPropertyInActiveRun

void SetPropertyInActiveRun(java.lang.String strBeanInstance,
                            java.lang.String strName,
                            java.lang.Object objNewValue)
Sets the property value in the active run. The datamodel will concatenate and store the data as "BeanInstance.PropertyName".

Parameters:
strBeanInstance - The Bean instance whose property is being set
strName - The name of the property
objNewValue - The value for the given property

SetValueInActiveRun

void SetValueInActiveRun(java.lang.String strBeanInstance,
                         java.lang.Object objNewValue)
Sets the property value in active run. The datamodel will concatenate and store the data as "BeanInstance.value".

Parameters:
strBeanInstance - The Bean instance whose property is being set
objNewValue - The value for the given property

RemovePropertyFromActiveRun

void RemovePropertyFromActiveRun(java.lang.String strRunName,
                                 java.lang.String strName)
Remove the property value from run name

Parameters:
strName - The name of the property to remove

CreateRun

java.util.Hashtable CreateRun(java.lang.String strRunName,
                              boolean bCopyScratchPad)
                              throws java.lang.Exception
Create the data for the given run #

Parameters:
strRunName - The run name to create
bCopyScratchPad - If true, scratchpad is copied into the new run
Returns:
Hahstable Map from name to value
Throws:
java.lang.Exception

CopyRun

void CopyRun(java.lang.String strRunName,
             java.lang.String strCopyRunName)
             throws java.lang.Exception
Create a new run as a copy of an existing run

Parameters:
strRunName - The run name to create
strCopyRunName - The name of the run to copy
Throws:
java.lang.Exception

DeleteRun

void DeleteRun(java.lang.String strRunName)
               throws java.lang.Exception
Delete the data for the given run name

Parameters:
strRunName - The run to delete
Throws:
java.lang.Exception

GetRunCount

int GetRunCount()
Return the number of runs

Returns:
int # of runs

SetActiveRun

void SetActiveRun(java.lang.String strRunName)
                  throws java.lang.Exception
Set the given run as active

Parameters:
strRunName - Run name to activate
Throws:
java.lang.Exception

GetRunNames

java.util.Vector GetRunNames()
Return the names of all runs

Returns:
Vector Vector of available run names

GetActiveRunName

java.lang.String GetActiveRunName()
Return the active run name

Returns:
String Active run name

ShowDataViewer

void ShowDataViewer()
Show the Data Model Viewer


GetDataModelViewerMgr

HWMDataModelViewerMgr GetDataModelViewerMgr()
Return the HWMDataModelViewerMgr, which manages data model viewer