* @param outputXMLName
* @throws Exception
*/
public void convertEDDs(RuleSet rs, String excelName, String outputXMLName) throws Exception {
EntityFactory ef = new EntityFactory(rs);
Iterator<String> includes = rs.getIncludedRuleSets().iterator();
while(excelName != null ){
File excel = new File(rs.getSystemPath()+"/"+excelName);
if(excel.isDirectory()){
File files[] = excel.listFiles();
for(File file : files){
String filename = file.getName().toLowerCase();
if( !file.isDirectory() && (filename.endsWith(".xls")||filename.endsWith(".xml"))){
convertEDD(ef, rs,file.getAbsolutePath());
}
}
}else{
convertEDD(ef,rs,excelName);
}
if(includes.hasNext()){
String includedSet = includes.next();
excelName = rs.getRulesDirectory().getRuleSet(includedSet).getExcel_edd();
}else{
excelName = null;
}
}
XMLPrinter xptr = new XMLPrinter(new FileOutputStream(outputXMLName));
xptr.opentag("entity_data_dictionary","version","2","xmlns:xs","http://www.w3.org/2001/XMLSchema");
ef.writeAttributes(xptr);
xptr.close();
}