Package it.eng.spagobi.engines.documentcomposition.configuration

Examples of it.eng.spagobi.engines.documentcomposition.configuration.DocumentCompositionConfiguration$Document


    {
        URL url;
        SAXBuilder builder = new SAXBuilder();
        builder.setValidation( false );
        builder.setEntityResolver( new LocalEntityResolver() );
        Document doc = null;
        if ( m_engine.getServletContext() == null )
        {
            ClassLoader cl = WebContainerAuthorizer.class.getClassLoader();
            url = cl.getResource( "WEB-INF/web.xml" );
            if( url != null )
View Full Code Here


          String versionOverride = System.getProperty("version.override");
            if (versionOverride != null) {
                getLog().info("changing version of pom file and save it to target/pom.xml");
                SAXBuilder builder = new SAXBuilder();
                Document doc = builder.build(pomFile);
                Element versionElem = findElement(doc.getRootElement().getChildren(), "version");
                if (versionElem == null) {
                 
                  //version inherited from parent, so get it from there
                  Element parentElem = findElement(doc.getRootElement().getChildren(), "parent");
                  versionElem = findElement(parentElem.getChildren(), "version");
                }
               
                versionElem.setText(versionOverride);
                File targetDir = new File(pomFile.getParent() + "/target");
View Full Code Here

  /**
   * Método responsável pelo carregamento do arquivo .cody.
   * @return  Retorna a tag root do documento carregado.
   */
  public Element importarArquivoXML(){
    Document doc = null;
        SAXBuilder builder = new SAXBuilder();
        try {

              doc = builder.build(path);

        } catch (Exception e) {
         
              e.printStackTrace();

        }
        Element raiz = doc.getRootElement();
        return raiz;
       
  }
View Full Code Here

     */
  public boolean exportarArquivo(String path){ 
    config.setNovaMensagemNoLog("exportarArquivo: "+path);
    this.setArquivoAberto(path);
   
    Document doc;
    doc = instituicao.getInstituicaoXML();
   
    Arquivo SalvarArquivo = new Arquivo(path);
    return SalvarArquivo.exportarArquivoXML(doc);
  }
View Full Code Here

 
  public Document getInstituicaoXML(){
    int i;
   
    Element instXML = new Element("instituicao");
    Document doc = new Document(instXML);
   
    Element instNome = new Element("nome");
    instNome.setText(nome);
   
    Element instCnpj = new Element("cnpj");
View Full Code Here

           
            httpclient.executeMethod(get);
           
            final String xml = get.getResponseBodyAsString();
            final SAXBuilder builder = new SAXBuilder();
            Document doc = builder.build(new StringReader(xml));
            Element root = doc.getRootElement();
            String lat = root.getChild("result").getChild("geometry").getChild("location").getChildTextTrim("lat");
            String lon = root.getChild("result").getChild("geometry").getChild("location").getChildTextTrim("lng");
            return Location.fromString(lat + ";" + lon);
        } catch (Exception ex) {
            return null;
View Full Code Here

                String cleanScmUrl = "not defined";
                try
                {
                    String content = ReleaseUtil.readXmlFile(pomFile, ls);
                    SAXBuilder builder = new SAXBuilder();
                    Document document = builder.build(new StringReader( content ));
                    Element root = document.getRootElement();

                    Element scmElement = root.getChild("scm", getNamespaceOrNull(root));

                    if(null != scmElement)
                    {
View Full Code Here

                String cleanScmUrl = "not defined";
                try
                {
                    String content = ReleaseUtil.readXmlFile(pomFile, ls);
                    SAXBuilder builder = new SAXBuilder();
                    Document document = builder.build(new StringReader( content ));
                    Element root = document.getRootElement();

                    Element scmElement = root.getChild("scm", getNamespaceOrNull(root));

                    if(null != scmElement)
                    {
View Full Code Here

    SAXBuilder builder = new SAXBuilder();
    String imsFNm = IMAGE_DIR + fnm;
    logger.info("Reading file: " + imsFNm);
    InputStream in = this.getClass().getResourceAsStream(imsFNm);
    try {
      Document document = builder.build(in);
      Element rootNode = document.getRootElement(); // images
      List<Element> imageList = rootNode.getChildren("image");
      for (Element image : imageList) {
        String name = image.getAttributeValue("name");
        ECrop crop;
        int maxCrop;
View Full Code Here

    }

    private LinkedList<String> doFilter(String in, Set<String> xpaths) throws IOException {
        LinkedList<String> result = new LinkedList<String>();
        try {
            Document doc = new SAXBuilder(XMLReaders.NONVALIDATING).build(new StringReader(in));
            XMLOutputter out = new XMLOutputter();

            for (String xp : xpaths) {
                XPathExpression<Content> xpath = XPathFactory.instance().compile(xp, Filters.content());
                for (Content node : xpath.evaluate(doc)) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.documentcomposition.configuration.DocumentCompositionConfiguration$Document

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.