public DatasetMap calculateValue() throws Exception {
logger.debug("IN");
String res=DataSetAccessFunctions.getDataSetResultFromId(profile, getData(),parametersObject);
categories=new HashMap();
DefaultBoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset();
SourceBean sbRows=SourceBean.fromXMLString(res);
List listAtts=sbRows.getAttributeAsList("ROW");
// run all categories (one for each row)
categoriesNumber=0;
boolean first=true;
boolean first2=true;
double temp;
for (Iterator iterator = listAtts.iterator(); iterator.hasNext();) {
SourceBean category = (SourceBean) iterator.next();
List atts=category.getContainedAttributes();
// atts are all the serie, run through them and sets what you need
List values=new ArrayList();
String nameP="";
String value="";
String catValue="";
if(first2){
if (name.indexOf("$F{") >= 0){
setTitleParameter(atts);
}
if (getSubName()!= null && getSubName().indexOf("$F") >= 0){
setSubTitleParameter(atts);
}
first2=false;
}
for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();
nameP=new String(object.getKey());
value=new String((String)object.getValue());
if(nameP.equalsIgnoreCase("x"))
{
catValue=value;
categoriesNumber=categoriesNumber+1;
categories.put(new Integer(categoriesNumber),value);
}
else {
Double valore=Double.valueOf(value);
// set minimum e maximus to avoid auto range of axis
if(first){
min=valore.doubleValue();
max=valore.doubleValue();
first=false;
}
if(min>valore.doubleValue())min=valore.doubleValue();
if(max<valore.doubleValue())max=valore.doubleValue();
values.add(valore);
}
}
dataset.add(values, "serie", catValue);
}
logger.debug("OUT");
DatasetMap datasets=new DatasetMap();
datasets.addDataset("1",dataset);