List atts=draws.getContainedAttributes();
String serieName="";
String serieDraw="";
// Run all the series specified in template and check if they are bar or line, by default will be bar; if not specified but present will be bar
for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();
serieName=new String(object.getKey());
serieDraw=new String((String)object.getValue());
if(serieDraw.equalsIgnoreCase("line")){
seriesDraw.put(serieName, "line");
}
else if(serieDraw.equalsIgnoreCase("line_no_shapes")){
seriesDraw.put(serieName, "line_no_shapes");
}
else{
seriesDraw.put(serieName, "bar");
}
}
}
if(confParameters.get("second_axis_label")!=null){
secondAxisLabel=(String)confParameters.get("second_axis_label");
}
// check wich series has to be mapped to the first axis and wich to the second
SourceBean scales = (SourceBean)content.getAttribute("SERIES_SCALES");
if(scales==null){
scales = (SourceBean)content.getAttribute("CONF.SERIES_SCALES");
}
seriesScale=new LinkedHashMap(); // Maps serie Name to scale Number (1 or 2)
if(scales!=null){
List attsScales=scales.getContainedAttributes();
String serieName="";
Integer serieScale=1;
for (Iterator iterator = attsScales.iterator(); iterator.hasNext();) {
SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();
serieName=new String(object.getKey());
try{
String serieScaleS=(String)object.getValue();
serieScale=Integer.valueOf(serieScaleS);
}
catch (Exception e) {
logger.error("Not correct numebr scale; setting default 1");
serieScale=Integer.valueOf(1);