Package org.pentaho.reporting.libraries.xmlns.writer

Examples of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter


    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription =
        new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(), Olap4JDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "simple-denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final SimpleDenormalizedMDXDataFactory pmdDataFactory = (SimpleDenormalizedMDXDataFactory) dataFactory;
    writeBody(pmdDataFactory, xmlWriter);

    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here


    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription = new DefaultTagDescription(
        ClassicEngineBoot.getInstance().getGlobalConfig(), MondrianDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", MondrianDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(MondrianDataFactoryModule.NAMESPACE, "simple-legacy-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final SimpleLegacyBandedMDXDataFactory mdxDataFactory = (SimpleLegacyBandedMDXDataFactory) dataFactory;
    writeBody(bundle, state, mdxDataFactory, xmlWriter);
    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription =
        new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(), Olap4JDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "banded-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final BandedMDXDataFactory pmdDataFactory = (BandedMDXDataFactory) dataFactory;
    writeBody(pmdDataFactory, xmlWriter);

    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

      throw new IOException("Unable to generate unique name for Mondrian-Data-Source");
    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription = new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(), MondrianDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", MondrianDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(MondrianDataFactoryModule.NAMESPACE, "simple-denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final SimpleDenormalizedMDXDataFactory mdxDataFactory = (SimpleDenormalizedMDXDataFactory) dataFactory;
    writeBody(bundle, state, mdxDataFactory, xmlWriter);
    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription =
        new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(), Olap4JDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final DenormalizedMDXDataFactory pmdDataFactory = (DenormalizedMDXDataFactory) dataFactory;
    writeBody(pmdDataFactory, xmlWriter);

    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription =
        new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(), XPathDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", XPathDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(XPathDataFactoryModule.NAMESPACE, "xpath-datasource", rootAttrs, XmlWriter.OPEN);

    final XPathDataFactory pmdDataFactory = (XPathDataFactory) dataFactory;
    final AttributeList configAttrs = new AttributeList();
    configAttrs.setAttribute(XPathDataFactoryModule.NAMESPACE,
        "source-file", String.valueOf(pmdDataFactory.getXqueryDataFile()));
    xmlWriter.writeTag(XPathDataFactoryModule.NAMESPACE, "config", configAttrs, XmlWriterSupport.CLOSE);

    final String[] queryNames = pmdDataFactory.getQueryNames();
    for (int i = 0; i < queryNames.length; i++)
    {
      final String queryName = queryNames[i];
      final String query = pmdDataFactory.getQuery(queryName);
      xmlWriter.writeTag(XPathDataFactoryModule.NAMESPACE, "query", "name", queryName, XmlWriterSupport.OPEN);
      xmlWriter.writeTextNormalized(query, false);
      xmlWriter.writeCloseTag();
    }
    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

      throw new IOException("Unable to generate unique name for Mondrian-Data-Source");
    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription = new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(), MondrianDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", MondrianDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(MondrianDataFactoryModule.NAMESPACE, "banded-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final BandedMDXDataFactory mdxDataFactory = (BandedMDXDataFactory) dataFactory;
    writeBody(bundle, state, mdxDataFactory, xmlWriter);
    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

      throw new IOException("Unable to generate unique name for Mondrian-Data-Source");
    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription = new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(), MondrianDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", MondrianDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(MondrianDataFactoryModule.NAMESPACE, "denormalized-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final DenormalizedMDXDataFactory mdxDataFactory = (DenormalizedMDXDataFactory) dataFactory;
    writeBody(bundle, state, mdxDataFactory, xmlWriter);
    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription =
        new DefaultTagDescription(ClassicEngineBoot.getInstance().getGlobalConfig(),
            Olap4JDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");

    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", Olap4JDataFactoryModule.NAMESPACE);

    xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "simple-legacy-banded-mdx-datasource", rootAttrs, XmlWriter.OPEN);

    final SimpleLegacyBandedMDXDataFactory pmdDataFactory = (SimpleLegacyBandedMDXDataFactory) dataFactory;
    writeBody(pmdDataFactory, xmlWriter);

    xmlWriter.writeCloseTag();
    xmlWriter.close();
    return fileName;
  }
View Full Code Here

    final OutputStream manifestOutputStream =
        outputRepository.createOutputStream("META-INF/manifest.xml", "text/xml");

    final OutputStreamWriter writer = new OutputStreamWriter(manifestOutputStream, "UTF-8");
    final XmlWriter xmlWriter = new XmlWriter(writer, tagDescription);
    xmlWriter.setAlwaysAddNamespace(true);
    xmlWriter.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("manifest", MANIFEST_NS);
    xmlWriter.writeTag(MANIFEST_NS, "manifest", rootAttributes, XmlWriterSupport.OPEN);

    final Iterator iterator = entries.entrySet().iterator();
    while (iterator.hasNext())
    {
      final Map.Entry entry = (Map.Entry) iterator.next();
      final AttributeList entryAttrs = new AttributeList();
      entryAttrs.setAttribute(MANIFEST_NS, "media-type", (String) entry.getValue());
      entryAttrs.setAttribute(MANIFEST_NS, "full-path", (String) entry.getKey());
      xmlWriter.writeTag(MANIFEST_NS, "file-entry", entryAttrs, XmlWriterSupport.CLOSE);
    }

    xmlWriter.writeCloseTag();
    xmlWriter.close();
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.xmlns.writer.XmlWriter

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.