throws Exception
{
super.initControlContext();
AppData app = (AppData) getDataModels().elementAt(0);
Database db = app.getDatabase();
try
{
XmlToData dataXmlParser = new XmlToData(db, dataDTD);
List data = dataXmlParser.parseFile(dataXmlFile);
context.put("data", data);
}
catch (Exception e)
{
throw new Exception("Exception parsing data XML:");
}
// Place our model in the context.
context.put("appData", app);
// Place the target database in the context.
context.put("targetDatabase", targetDatabase);
Properties p = new Properties();
FileInputStream fis = new FileInputStream(getSqlDbMap());
p.load(fis);
fis.close();
p.setProperty(getOutputFile(), db.getName());
p.store(new FileOutputStream(getSqlDbMap()),"Sqlfile -> Database map");
return context;
}