com.altair.hwm.toolkit.datamodel
Class HWMDataModelXMLImport

java.lang.Object
  extended by com.altair.hwm.toolkit.datamodel.HWMDataModelXMLImport

public class HWMDataModelXMLImport
extends java.lang.Object

Title: HWMDataModelXMLImport

Description: It imports the xml file format, which contains details of data model.

Company: Altair Engineering, Inc.


Field Summary
 java.io.File m_fileXML
          XML file, which contains the data model information
 HWMModelInstance m_hwmModelInstance
          The model instance
 
Constructor Summary
HWMDataModelXMLImport(HWMModelInstance hwmModelInstance, com.jidesoft.grid.TreeTable treeTable, java.io.File fileXMLData)
          Constructor Method : HWMDataModelXMLImport
 
Method Summary
 void ImportXMLFile()
          Method : ImportXMLFile Main method, which is called to import the data model, which is in XML format
 void ReadImportedXMLFile(java.io.File fileXMLDMV)
          Method : ReadImportedXMLFile Main method to read XML File.
 void ReadXMLControlProperties(com.altair.hwm.toolkit.datamodel.HWMCellEntry infoCellChildTaskBean, org.jdom.Element elemTaskBean)
          Method : ReadXMLControlProperties Method to read the properties of each control or bean Method identifies the element "ControlProperties" tag in XML file.
 void ReadXMLDataModelDetails(org.jdom.Element elemRoot)
          Method : ReadXMLDataModelDetails Method reads the data model tag from xml file.
 void ReadXMLDataModelInfo(org.jdom.Element elemDataModel)
          Method : ReadXMLDataModelInfo Method reads the details of data model from xml file.
 void ReadXMLPMTemplate(org.jdom.Element elemRoot)
          Method : ReadXMLPMTemplate Method reads the Template Name in XML file This is also for the User's Information.
 void ReadXMLProductVersion(org.jdom.Element elemRoot)
          Method : ReadXMLProductVersion Method reads the Version Tag in XML file This is just for the Information.
 void ReadXMLTaskControlInfo(com.altair.hwm.toolkit.datamodel.HWMCellEntry infoCellChildTask, org.jdom.Element elemTaskDetails)
          Method : ReadXMLTaskControlInfo Method reads the control / bean information of each task.
 void ReadXMLTaskDetails(org.jdom.Element elemTaskInfo)
          Method : ReadXMLTaskDetails Method reads the details of all tasks.
 void ReadXMLTaskRelatedInfo(org.jdom.Element elemDataModelInfo)
          Method : ReadXMLTaskRelatedInfo Method reads the task information in the XML file.
 void ReadXMLUserDataDetails(org.jdom.Element elemUserDataInfo)
          Method : ReadXMLUserDataDetails Method reads the details of UserData.
 void ReadXMLUserRelatedDataInfo(org.jdom.Element elemDataModelInfo)
          Method : ReadXMLUserRelatedDataInfo Method reads the userdata information in the XML file.
 void SavePropertiesInDataModel(com.altair.hwm.toolkit.datamodel.HWMCellEntry infoTaskBeanProp, java.lang.String strBeanPropertyValue)
          Method : SavePropertiesInDataModel Method to save the property value into data model and update the data model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_hwmModelInstance

public HWMModelInstance m_hwmModelInstance
The model instance


m_fileXML

public java.io.File m_fileXML
XML file, which contains the data model information

Constructor Detail

HWMDataModelXMLImport

public HWMDataModelXMLImport(HWMModelInstance hwmModelInstance,
                             com.jidesoft.grid.TreeTable treeTable,
                             java.io.File fileXMLData)
Constructor Method : HWMDataModelXMLImport

Parameters:
HWMModelInstance - hwmModelInstance - The current model instance
TreeTable - treeTable - Treetable of Data Model Viewer to which all details would be dumped
Method Detail

ImportXMLFile

public void ImportXMLFile()
                   throws java.lang.Exception
Method : ImportXMLFile Main method, which is called to import the data model, which is in XML format

Throws:
java.lang.Exception

ReadImportedXMLFile

public void ReadImportedXMLFile(java.io.File fileXMLDMV)
                         throws java.io.FileNotFoundException,
                                java.lang.Exception
Method : ReadImportedXMLFile Main method to read XML File. Full structuring of Reading XML file

Parameters:
fileXMLDMV - - XML file to read
Throws:
java.io.FileNotFoundException
java.lang.Exception

ReadXMLProductVersion

public void ReadXMLProductVersion(org.jdom.Element elemRoot)
Method : ReadXMLProductVersion Method reads the Version Tag in XML file This is just for the Information. There is no much help while importing. We do not do any thing with this information.

Parameters:
Root - XML Element : elemRoot

ReadXMLPMTemplate

public void ReadXMLPMTemplate(org.jdom.Element elemRoot)
Method : ReadXMLPMTemplate Method reads the Template Name in XML file This is also for the User's Information. There is no much help from this while importing. We do not do any thing with this information.

Parameters:
Root - XML Element : elemRoot

ReadXMLDataModelDetails

public void ReadXMLDataModelDetails(org.jdom.Element elemRoot)
Method : ReadXMLDataModelDetails Method reads the data model tag from xml file. This is the main method which is called and reading of data model details would start from this method. Method identifies the element "DataModel" tag in XML file.

Parameters:
Root - XML Element : elemRoot

ReadXMLDataModelInfo

public void ReadXMLDataModelInfo(org.jdom.Element elemDataModel)
Method : ReadXMLDataModelInfo Method reads the details of data model from xml file. This is one of the main method which is called to read the xml file and would be stored in data model and subsequently the data would be shown in Data Model Viewer. Method identifies the element "DataModel_info" tag in XML file.

Parameters:
XML - Element : elemDataModel - Element next to root

ReadXMLTaskRelatedInfo

public void ReadXMLTaskRelatedInfo(org.jdom.Element elemDataModelInfo)
Method : ReadXMLTaskRelatedInfo Method reads the task information in the XML file. Method identifies the task element "Tasks" tag in XML file.

Parameters:
XML - Element : elemDataModelInfo

ReadXMLTaskDetails

public void ReadXMLTaskDetails(org.jdom.Element elemTaskInfo)
Method : ReadXMLTaskDetails Method reads the details of all tasks. It reads the Task Id, Task Name and Bean Count of the respective tasks from the xml file. Also corresponding to element name "task" of xml file, its respective cell entry in the tree table is identified. Method identifies the task element "Task" tag in XML file.

Parameters:
XML - Element : elemTaskInfo

ReadXMLTaskControlInfo

public void ReadXMLTaskControlInfo(com.altair.hwm.toolkit.datamodel.HWMCellEntry infoCellChildTask,
                                   org.jdom.Element elemTaskDetails)
Method : ReadXMLTaskControlInfo Method reads the control / bean information of each task. Method identifies the element "TaskControl" tag in XML file. It reads the all the Control Ids, Control Names of the task from the xml file. Also corresponding to the element name "control" of xml file, its respective cell entry in the tree table is identified from cell entry HWMCellEntry - infoCellChildTask.

Parameters:
HWMCellEntry - : infoCellChildTask - Treenode of treetable, which gives the location of treetable and would provide the children information
XML - Element : elemTaskDetails

ReadXMLControlProperties

public void ReadXMLControlProperties(com.altair.hwm.toolkit.datamodel.HWMCellEntry infoCellChildTaskBean,
                                     org.jdom.Element elemTaskBean)
Method : ReadXMLControlProperties Method to read the properties of each control or bean Method identifies the element "ControlProperties" tag in XML file. It reads the all the Property Ids, Property Names of each control from the xml file. Also corresponding to the element name "ControlProperties" of xml file, its respective cell entry in the tree table is identified from cell entry HWMCellEntry - infoCellChildTaskBean.

Parameters:
HWMCellEntry - : infoCellChildTaskBean - Treenode of treetable, which gives the location of treetable and would provide the children information
XML - Element : elemTaskBean

ReadXMLUserRelatedDataInfo

public void ReadXMLUserRelatedDataInfo(org.jdom.Element elemDataModelInfo)
Method : ReadXMLUserRelatedDataInfo Method reads the userdata information in the XML file. Method identifies the task element "UserData" tag in XML file.

Parameters:
XML - Element : elemDataModelInfo

ReadXMLUserDataDetails

public void ReadXMLUserDataDetails(org.jdom.Element elemUserDataInfo)
Method : ReadXMLUserDataDetails Method reads the details of UserData. Method identifies the task element "data" tag in XML file. It reads the Userdata Id, Userdata Property Name and its value from the xml file. Also corresponding to element name "data" of xml file, its respective cell entry in the tree table is identified.

Parameters:
XML - Element : elemTaskInfo

SavePropertiesInDataModel

public void SavePropertiesInDataModel(com.altair.hwm.toolkit.datamodel.HWMCellEntry infoTaskBeanProp,
                                      java.lang.String strBeanPropertyValue)
Method : SavePropertiesInDataModel Method to save the property value into data model and update the data model.

Parameters:
HWMCellEntry - : infoTaskBeanProp - Treenode of treetable, which gives the location of treetable and would provide the necessary information
String - - strBeanPropertyValue - Property value of data, which is be added to datamodel