This commit is contained in:
Lucio Lelii 2008-12-04 03:12:52 +00:00
parent ca13d8a57f
commit 526ec9b66e
1 changed files with 25 additions and 26 deletions

View File

@ -318,33 +318,32 @@ public class XMLUtil {
ResultSet csRes=DBInterface.queryDB("select * from cs;");
boolean notEntered= true;
StringBuilder temp= new StringBuilder();
temp.append("<CS id=\"-1\" name=\"Workflows\" ");
//if(selectedFunct.contains(res.getInt(1))) temp+="selected=\"true\">";
//else
temp.append("selected=\"false\">");
temp.append("<CSDescription>This class of functions contains compound functions defined by aggregating existing functions in structured workflows as to deliver advanced features.</CSDescription>");
if (csRes.next()){
do{
temp.append("<child><CS id=\"");
temp.append(csRes.getString(1));
temp.append("\" name=\"");
temp.append(csRes.getString(2));
temp.append("\" ");
if(selectedCS.contains(csRes.getString(1))) temp.append("selected=\"true\">");
else temp.append("selected=\"false\">");
temp.append("<CSDescription>");
temp.append(csRes.getString(3));
temp.append("</CSDescription>");
temp.append("</CS></child>");
}while (csRes.next());
}
temp.append("</CS>");
toReturn.append(temp);
StringBuilder temp= new StringBuilder();
temp.append("<CS id=\"-1\" name=\"Workflows\" ");
//if(selectedFunct.contains(res.getInt(1))) temp+="selected=\"true\">";
//else
temp.append("selected=\"false\">");
temp.append("<CSDescription>This class of functions contains compound functions defined by aggregating existing functions in structured workflows as to deliver advanced features.</CSDescription>");
if (csRes.next()){
do{
temp.append("<child><CS id=\"");
temp.append(csRes.getString(1));
temp.append("\" name=\"");
temp.append(csRes.getString(2));
temp.append("\" ");
if(selectedCS.contains(csRes.getString(1))) temp.append("selected=\"true\">");
else temp.append("selected=\"false\">");
temp.append("<CSDescription>");
temp.append(csRes.getString(3));
temp.append("</CSDescription>");
temp.append("</CS></child>");
}while (csRes.next());
}
if notEntered
temp.append("</CS>");
toReturn.append(temp);
} catch (SQLException e) {
logger.error("VDLModelService: DB error retreiving CS");
e.printStackTrace();