Examples of DocumentContainer


Examples of it.eng.spagobi.engines.documentcomposition.exporterUtils.DocumentContainer

      Document doc=(Document)docMap.get(key);
      String label=doc.getSbiObjLabel();
      logger.debug("Document "+label);

      // get document container information
      DocumentContainer documentContainer=documentsMap.get(label);

      // Recover BIObject     
      IBIObjectDAO dao=DAOFactory.getBIObjectDAO();
      BIObject objectID=dao.loadBIObjectByLabel(label);
      BIObject object=null;

      // get roles
      Collection roles = null;
      roles = ((UserProfile)profile).getRolesForUse();


      for (Iterator iterator2 = roles.iterator(); iterator2.hasNext();) {
        Object role = (Object) iterator2.next();
        try{
          object=dao.loadBIObjectForExecutionByIdAndRole(objectID.getId(), role.toString());
        }
        catch (Exception e) {
          logger.error("error in recovering the role");
        }
        if(object!=null) break;
      }

      // set parameters: from url retrieved by iframe, fill BiObjectParameters with value
      logger.debug("fill parameters from URL");
      fillBIObjectWithParameterValues(object, currentConfs.get(label));
     
      //only for highcharts document is necessary to pass the svg parameter to the engine.
      //At the moment it force the svgContent into description attribute of the object (only for background execution)
      if (currentConfs.get("SVG_"+label) != null){
        Map tmpSvg = currentConfs.get("SVG_"+label).getParameters();
        String tmpContent = tmpSvg.get("SVG_"+label).toString();
        object.setDescription(tmpContent);
      }
      logger.debug("call execution proxy");
      // Calling execution proxy
      ExecutionProxy proxy = new ExecutionProxy();
     
      proxy.setBiObject(object);
     

      // if engine is Birt, export in PDF, elsewhere in JPG
      Engine engine = object.getEngine();
      String driverName = engine.getDriverName();
      if (driverName != null && driverName.endsWith("BirtReportDriver")) {
        output = "PDF";
      } else {
        output = "JPG";
      }
      byte[] returnByteArray = proxy.exec(profile, "EXPORT", output);

      // add content retrieved to Document Container
      logger.debug("add content retrieved to Document Container");
      if( returnByteArray.length==0)logger.warn("empty byte array retrieved for document "+label);
      documentContainer.setContent(returnByteArray);     
      documentContainer.setDocumentLabel(label);
      documentContainer.setDocumentType(object.getBiObjectTypeCode());

//      FileOutputStream fos=null;
//      File dir = new File("C:/zzzEsportazione.pdf");
//      File toReturn=null;
//      if(i==0){
View Full Code Here

Examples of it.eng.spagobi.engines.documentcomposition.exporterUtils.DocumentContainer

      MetadataStyle metadataStyle=MetadataStyle.getMetadataStyle(label,styleString.toString(), docCompConf);
      if(defaultStyle==false){
        defaultStyle=(metadataStyle == null) ? true : false;
      }
     
      DocumentContainer documentContainer=new DocumentContainer();
      documentContainer.setStyle(metadataStyle);
      documents.put(label, documentContainer);

      // get its parameters configuration
      logger.debug("Get parametrs configuration for document "+label);     
      Object urlO=sb.getAttribute("TRACE_PAR_"+label);
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.util.DocumentContainer



    this.statusBar = new StatusBar();

    this.documentContainer = new DocumentContainer(this);
    this.ruleContainer = new RuleContainer(this);


    this.treePane = new TreePane(this, this.documentContainer);
View Full Code Here

Examples of org.apache.commons.jxpath.xml.DocumentContainer

        string = "string";
        bean = new TestBean();
        map = new HashMap();
        list = new ArrayList();

        container = new DocumentContainer(getClass().getResource("Vendor.xml"));
        document = (Document) container.getValue();
        element = document.getDocumentElement();

        map.put("string", string);
        map.put("bean", bean);
View Full Code Here

Examples of org.apache.commons.jxpath.xml.DocumentContainer

    public void setObject(Object object) {
        this.object = object;
    }

    public static TestBeanWithNode createTestBeanWithDOM() {
        DocumentContainer docCtr =
            new DocumentContainer(
                JXPathTestCase.class.getResource("Vendor.xml"));
        Document doc = (Document) docCtr.getValue();
        TestBeanWithNode tbwdom = new TestBeanWithNode();
        tbwdom.setVendor(doc.getDocumentElement());
        tbwdom.setObject(docCtr);
        return tbwdom;
    }
View Full Code Here

Examples of org.apache.commons.jxpath.xml.DocumentContainer

    /**
     * @param  URL is a URL for an XML file. Use getClass().getResource
     * (resourceName) to load XML from a resource file.
     */
    public XMLDocumentContainer(URL xmlURL) {
        delegate = new DocumentContainer(xmlURL);
    }
View Full Code Here

Examples of org.apache.commons.jxpath.xml.DocumentContainer

        super(name);
    }

    public void setUp() {
        if (context == null) {
            DocumentContainer docCtr = createDocumentContainer();
            context = createContext();
            Variables vars = context.getVariables();
            vars.declareVariable("document", docCtr.getValue());
            vars.declareVariable("container", docCtr);
            vars.declareVariable(
                "element",
                context.getPointer("vendor/location/address/street").getNode());
        }
View Full Code Here

Examples of org.apache.commons.jxpath.xml.DocumentContainer

    }

    protected abstract String getModel();

    protected DocumentContainer createDocumentContainer() {
        return new DocumentContainer(
            JXPathTestCase.class.getResource("Vendor.xml"),
            getModel());
    }
View Full Code Here

Examples of org.apache.commons.jxpath.xml.DocumentContainer

     * @param xmlURL a URL for an XML file. Use getClass().getResource(resourceName)
     *               to load XML from a resource file.
     */
    public XMLDocumentContainer(URL xmlURL) {
        this.xmlURL = xmlURL;
        delegate = new DocumentContainer(xmlURL);
    }
View Full Code Here

Examples of org.apache.commons.jxpath.xml.DocumentContainer

        string = "string";
        bean = new TestBean();
        map = new HashMap();
        list = new ArrayList();

        container = new DocumentContainer(getClass().getResource("Vendor.xml"));
        document = (Document) container.getValue();
        element = document.getDocumentElement();

        map.put("string", string);
        map.put("bean", bean);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.