Package it.eng.spagobi.engines.kpi.bo

Examples of it.eng.spagobi.engines.kpi.bo.KpiLine


        if (this.resources == null || this.resources.isEmpty()) {
          logger.debug("There are no resources assigned to the Model Instance");

          KpiResourceBlock block = new KpiResourceBlock();
          block.setD(this.dateOfKPI);
          KpiLine line = getBlock(mI.getModelInstanceNodeId(), null);       
          block.setRoot(line);
          block.setOptions(options);
          logger.debug("Setted the tree Root.");
          kpiRBlocks.add(block);
        } else {
          Iterator resourcesIt = this.resources.iterator();
          while (resourcesIt.hasNext()) {
            Resource r = (Resource) resourcesIt.next();
            logger.info("-------Resource: " + r.getName());
            KpiResourceBlock block = new KpiResourceBlock();
            block.setR(r);

        block.setD(dateOfKPI);
            block.setOptions(options);
            KpiLine line = getBlock(mI.getModelInstanceNodeId(), r);
            block.setRoot(line);
            logger.debug("Setted the tree Root.");
            kpiRBlocks.add(block);
          }
        }
View Full Code Here


      if (this.resources == null || this.resources.isEmpty()) {
        logger.debug("There are no resources assigned to the Model Instance");
        KpiResourceBlock block = new KpiResourceBlock();
        block.setD(this.dateOfKPI);
        block.setParMap(this.parametersObject);
        KpiLine line = getBlock(mI.getModelInstanceNodeId(), null);
        block.setRoot(line);
        block.setTitle(name);
        block.setSubtitle(subName);
        block.setOptions(options);
        logger.debug("Setted the tree Root.");
        kpiRBlocks.add(block);

      }else {
        Iterator resourcesIt = this.resources.iterator();
        while (resourcesIt.hasNext()) {
          Resource r = (Resource) resourcesIt.next();
          logger.info("Resource: " + r.getName());
          KpiResourceBlock block = new KpiResourceBlock();
          block.setR(r);
          block.setD(dateOfKPI);
          block.setParMap(this.parametersObject);
          KpiLine line = getBlock(mI.getModelInstanceNodeId(), r);
          block.setRoot(line);
          block.setOptions(options);
          logger.debug("Setted the tree Root.");
          kpiRBlocks.add(block);
        }
View Full Code Here

    }
    return line;
  }
  public KpiLine getBlock(Integer miId, Resource r) throws EMFUserError, EMFInternalError, SourceBeanException {
    logger.debug("IN");
    KpiLine line = new KpiLine();
    ModelInstanceNode modI = DAOFactory.getModelInstanceDAO().loadModelInstanceById(miId, dateOfKPI);
    if (modI != null) {
      logger.info("Loaded Model Instance Node with id: " + modI.getModelInstanceNodeId());
    }
    String modelNodeName = modI.getName();
    line.setModelNodeName(modelNodeName);
    line.setModelInstanceNodeId(miId);
    line.setModelInstanceCode(modI.getModelCode());

    List children = new ArrayList();
    List childrenIds = modI.getChildrenIds();
    if (!childrenIds.isEmpty()) {
      Iterator childrenIt = childrenIds.iterator();
      while (childrenIt.hasNext()) {
        Integer id = (Integer) childrenIt.next()
        KpiLine childrenLine = getBlock(id, r);
        if(childrenLine != null){
          children.add(childrenLine);
        }
      }
    }
View Full Code Here

     
     
     
         
          if (actualHeight+separatorHeight+valueHeight+10<maxFirstSubTemplateHeight){
            KpiLine lineRoot=thisBlock.getRoot();
            List sourceBeansToAdd2 = newLine(lineRoot, 0,true);
            if (sourceBeansToAdd2!=null && !sourceBeansToAdd2.isEmpty()){
            Iterator it = sourceBeansToAdd2.iterator();
              while(it.hasNext()){
                SourceBean toAdd = (SourceBean)it.next();
                bandDetailReport.setAttribute(toAdd);
             
            }
          }else{
            //Add last subreport to the List
            increaseHeight(subTemplateBaseContent);
            subreports.add(subTemplateBaseContent);
            actualHeight = new Integer(0);
            subTemplateBaseContent = createNewSubReport(countSubreports);
            countSubreports ++;
            //Get my bandDetailReport from new subreport
            subtitleSB=(SourceBean)subTemplateBaseContent.getAttribute("title");
            bandDetailReport=(SourceBean)subtitleSB.getAttribute("BAND");
            //change subtemplatesummary
            subSummarySB=(SourceBean)subTemplateBaseContent.getAttribute("summary");
            bandSummaryReport=(SourceBean)subSummarySB.getAttribute("BAND")
            //NEW SUBREPORT
            KpiLine lineRoot=thisBlock.getRoot();
            List sourceBeansToAdd2 = newLine(lineRoot, 0,true);
            if (sourceBeansToAdd2!=null && !sourceBeansToAdd2.isEmpty()){
            Iterator it = sourceBeansToAdd2.iterator();
              while(it.hasNext()){
                SourceBean toAdd = (SourceBean)it.next();
View Full Code Here

    children = orderChildren(new ArrayList(),children);
    try {
     
    if(children!=null){
      for (Iterator iterator = children.iterator(); iterator.hasNext();) {
        KpiLine kpiLineChild = (KpiLine) iterator.next()
       
        Iterator it3 = sourceBeansToAdd.iterator();
        while(it3.hasNext()){
          SourceBean toAdd = (SourceBean)it3.next();
          bandDetailReport.setAttribute(toAdd);
View Full Code Here

  protected List orderChildren(List ordered, List notordered) {

    List toReturn = ordered;
    List temp = new ArrayList();
    KpiLine l = null;
    if(notordered!=null && !notordered.isEmpty()){
      Iterator it = notordered.iterator();
      while(it.hasNext()){
        KpiLine k = (KpiLine)it.next();
        if(l==null){
          l = k ;
        }else{
          if (k!=null && k.compareTo(l)<=0){
            temp.add(l);
            l = k;
          }else{
            temp.add(k);
          }
View Full Code Here

    SourceBean toReturn = null;
    Resource res=thisBlock.getR();
     
      try{
        SourceBean bandRes=new SourceBean(resourceBlockS);
        KpiLine lineRoot=thisBlock.getRoot();
        SourceBean modelNodeLine = newLine(lineRoot);
       
        if(res!=null){         
          bandRes.setAttribute("name",res.getName()!=null?res.getName():"");
          bandRes.setAttribute(modelNodeLine);
View Full Code Here

        List<KpiLine> children=line.getChildren();
        children = orderChildren(new ArrayList(),children);
     
        if(children!=null){
          for (Iterator iterator = children.iterator(); iterator.hasNext();) {
            KpiLine kpiLineChild = (KpiLine) iterator.next();
              SourceBean childNode = newLine(kpiLineChild);
              modelNodeL.setAttribute(childNode);
            }
          }
      }
View Full Code Here

  }

  protected List orderChildren(List ordered, List notordered) {
    List toReturn = ordered;
    List temp = new ArrayList();
    KpiLine l = null;
    if(notordered!=null && !notordered.isEmpty()){
      Iterator it = notordered.iterator();
      while(it.hasNext()){
        KpiLine k = (KpiLine)it.next();
        if(l==null){
          l = k ;
        }else{
          if (k!=null && k.compareTo(l)<=0){
            temp.add(l);
            l = k;
          }else{
            temp.add(k);
          }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.kpi.bo.KpiLine

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.