/* (non-Javadoc)
* @see com.dtrules.admin.IRulesAdminService#updateEntity(java.lang.String, com.dtrules.entity.REntity)
*/
public void saveEDD(RSession session, String rulesetname) throws RulesException {
RuleSet rs = rd.getRuleSet(RName.getRName(rulesetname));
EntityFactory ef = rs.getEntityFactory(session);
String filepath = rs.getFilepath();
String filename = rs.getEDD_XMLName();
OutputStream out;
try {
out = new FileOutputStream(filepath+filename);
} catch (FileNotFoundException e) {
throw new RulesException(
"OutputFileCreationError",
"saveDecisionTables",
"An error occured openning the file: "+filepath+filename+"\n"+e
);
}
PrintStream ps = new PrintStream(out);
Iterator<RName> entities = ef.getEntityRNameIterator();
ps.println("<entity_data_dictionary>");
while(entities.hasNext()){
RName ename = entities.next();
ef.findRefEntity(ename).writeXML(ps);
}
ps.println("\n</entity_data_dictionary>");
}