Package it.eng.spago.base

Examples of it.eng.spago.base.SourceBeanAttribute


      //run all the attributes, to define series!
      int numColumn = 0;
      for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
        numColumn ++;
        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);
View Full Code Here


      List atts=draws.getContainedAttributes();

      String serieName="";
      String serieDraw="";
      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");         
        }

      }   

    }
    else{
      useBars=true;
    }

    if(confParameters.get(SECOND_AXIS_LABEL)!=null){ 
      secondAxis=true;
      secondAxisLabel=(String)confParameters.get(SECOND_AXIS_LABEL);

      // only if second axis is defined 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();
      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);
View Full Code Here

        }
        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;
View Full Code Here

      ListIterator it = params.listIterator();

      while (it.hasNext()) {

    Object par = it.next();
    SourceBeanAttribute p = (SourceBeanAttribute) par;
    String parName = (String) p.getKey();
    logger.debug("got parName=" + parName);
    if (parName.equals("OBJECT_ID")) {
        objId = (String) request.getAttribute("OBJECT_ID");
        logger.debug("got OBJECT_ID from Request=" + objId);
      }
View Full Code Here


      //run all the attributes, to define series!
      int contSer = 0;
      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);
View Full Code Here

      ListIterator it = params.listIterator();

      while (it.hasNext()) {

    Object par = it.next();
    SourceBeanAttribute p = (SourceBeanAttribute) par;
    String parName = (String) p.getKey();
    logger.debug("got parName=" + parName);
    if (parName.equals("OBJECT_ID")) {
        objId = (String) request.getAttribute("OBJECT_ID");
        logger.debug("got OBJECT_ID from Request=" + objId);
      }
View Full Code Here

      List atts=draws.getContainedAttributes();

      String serieName="";
      String serieDraw="";
      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.toUpperCase(), "line");
          useLines=true;
        }
View Full Code Here

      Map dataParameters = new HashMap();
      SourceBean dataSB = (SourceBean)content.getAttribute(CONF);
      List dataAttrsList = dataSB.getContainedSourceBeanAttributes();
      Iterator dataAttrsIter = dataAttrsList.iterator();
      while(dataAttrsIter.hasNext()) {
        SourceBeanAttribute paramSBA = (SourceBeanAttribute)dataAttrsIter.next();
        SourceBean param = (SourceBean)paramSBA.getValue();
        String nameParam = (String)param.getAttribute("name");
        String valueParam = (String)param.getAttribute("value");
        dataParameters.put(nameParam, valueParam);
      }


      if(dataParameters.get(CONF_DATASET)!=null && !(((String)dataParameters.get(CONF_DATASET)).equalsIgnoreCase("") )){ 
        confDataset=(String)dataParameters.get(CONF_DATASET);
        isLovConfDefined=true;
      }
      else {
        isLovConfDefined=false;
      }

      legend=true;
      if(dataParameters.get(LEGEND)!=null && !(((String)dataParameters.get(LEGEND)).equalsIgnoreCase("") )){ 
        String leg=(String)dataParameters.get(LEGEND);
        if(leg.equalsIgnoreCase("false"))
          legend=false;
      }

      legendPosition="bottom";
      if(dataParameters.get(LEGEND_POSITION)!=null && !(((String)dataParameters.get(LEGEND_POSITION)).equalsIgnoreCase("") )){ 
        String leg=(String)dataParameters.get(LEGEND_POSITION);
        if(leg.equalsIgnoreCase("bottom") || leg.equalsIgnoreCase("left") || leg.equalsIgnoreCase("right") || leg.equalsIgnoreCase("top"))
          legendPosition=leg;
      }
     
      filter=true;
      if(dataParameters.get(VIEW_FILTER)!=null && !(((String)dataParameters.get(VIEW_FILTER)).equalsIgnoreCase("") )){ 
        String fil=(String)dataParameters.get(VIEW_FILTER);
        if(fil.equalsIgnoreCase("false"))
          filter=false;
      }

      slider=true;
      if(dataParameters.get(VIEW_SLIDER)!=null && !(((String)dataParameters.get(VIEW_SLIDER)).equalsIgnoreCase("") )){ 
        String sli=(String)dataParameters.get(VIEW_SLIDER);
        if(sli.equalsIgnoreCase("false"))
          slider=false;
      }

      sliderStartFromEnd=false;
      if(dataParameters.get(SLIDER_START_FROM_END)!=null && !(((String)dataParameters.get(SLIDER_START_FROM_END)).equalsIgnoreCase("") )){ 
        String sli=(String)dataParameters.get(SLIDER_START_FROM_END);
        if(sli.equalsIgnoreCase("true"))
          sliderStartFromEnd=true;
      }
     
      positionSlider="top";
      if(dataParameters.get(POSITION_SLIDER)!=null && !(((String)dataParameters.get(POSITION_SLIDER)).equalsIgnoreCase("") )){ 
        positionSlider=(String)dataParameters.get(POSITION_SLIDER);
      }
     
      //reading series orders if present
      SourceBean sbSerieLabels = (SourceBean)content.getAttribute(SERIES_LABELS);
      // back compatibility
      if(sbSerieLabels==null){
        sbSerieLabels = (SourceBean)content.getAttribute("CONF.SERIES_LABELS");
      }
      if(sbSerieLabels!=null){
        seriesLabelsMap=new LinkedHashMap();
        List atts=sbSerieLabels.getContainedAttributes();
        String serieLabel="";
        for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
          SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();
          String serieName=(String)object.getKey();
          serieLabel=new String((String)object.getValue());
          if(serieLabel!=null){
            seriesLabelsMap.put(serieName, serieLabel);
          }
        }   
      }
View Full Code Here

      String tmpTitle=new String(name);
      if (tmpTitle.indexOf("$F{") >= 0){
        String parName = tmpTitle.substring(tmpTitle.indexOf("$F{")+3, tmpTitle.indexOf("}"));
        logger.debug("parName: " + parName);
        for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
          SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();

          String nameP=new String(object.getKey());
          String value=new String((String)object.getValue());
          logger.debug("nameP: " + nameP + " - value: "+ value);
          if(nameP.equalsIgnoreCase(parName))
          {
            int pos = tmpTitle.indexOf("$F{"+parName+"}") + (parName.length()+4);
            name = name.replace("$F{" + parName + "}", value);
View Full Code Here

      String tmpTitle=new String(getSubName());
      if (tmpTitle != null && tmpTitle.indexOf("$F{") >= 0){
        String parName = tmpTitle.substring(tmpTitle.indexOf("$F{")+3, tmpTitle.indexOf("}"));

        for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
          SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();

          String nameP=new String(object.getKey());
          String value=(object.getValue()==null)?" ":new String((String)object.getValue());
          if (nameP.equalsIgnoreCase(parName))
          {
            int pos = tmpTitle.indexOf("$F{"+parName+"}") + (parName.length()+4);
            setSubName(getSubName().replace("$F{" + parName + "}", value));
            tmpTitle = tmpTitle.substring(pos);
View Full Code Here

TOP

Related Classes of it.eng.spago.base.SourceBeanAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.