Examples of AttributeList


Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (element == null)
    {
      throw new NullPointerException();
    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "text-field", attList, XmlWriterSupport.OPEN);
    writeElementBody(bundle, state, element, xmlWriter);
    xmlWriter.writeCloseTag();

  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

   * @throws ReportWriterException if the report serialisation failed.
   */
  public void write()
      throws IOException, ReportWriterException
  {
    final AttributeList attList = new AttributeList();
    if (template.getName() != null)
    {
      // dont copy the parent name for anonymous templates ...
      if (template.getName().equals(parent.getName()) == false)
      {
        attList.setAttribute(ExtParserModule.NAMESPACE, "name", template.getName());
      }
    }
    attList.setAttribute(ExtParserModule.NAMESPACE, "references", parent.getName());

    boolean tagWritten = false;
    final XmlWriter writer = getXmlWriter();
    final Iterator it = template.getParameterNames();
    while (it.hasNext())
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (element == null)
    {
      throw new NullPointerException();
    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "group-header", XmlWriterSupport.OPEN);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "root-level-content", attList, XmlWriterSupport.OPEN);
    writeElementBody(bundle, state, element, xmlWriter);
    writeChildElements(bundle, state, xmlWriter, (Band) element);
    xmlWriter.writeCloseTag();
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (element == null)
    {
      throw new NullPointerException();
    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "crosstab-row-group", attList, XmlWriterSupport.OPEN);

    final CrosstabRowGroup group = (CrosstabRowGroup) element;
    if (group.getField() != null)
    {
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (element == null)
    {
      throw new NullPointerException();
    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "details", XmlWriterSupport.OPEN);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "root-level-content", attList, XmlWriterSupport.OPEN);
    writeElementBody(bundle, state, element, xmlWriter);
    writeChildElements(bundle, state, xmlWriter, (Band) element);
    xmlWriter.writeCloseTag();
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

  public void save(final OutputStream out, final String encoding)
      throws IOException
  {
    // This print-writer will be flushed, but not closed, as closing the underlying stream is not desired here.
    final PrintWriter writer = new PrintWriter(new OutputStreamWriter(out, encoding));
    final AttributeList attList = new AttributeList();
    attList.addNamespaceDeclaration("", ConfigEditorBoot.NAMESPACE); //$NON-NLS-1$

    final DefaultTagDescription tagDescription = new DefaultTagDescription();
    tagDescription.configure
        (ConfigEditorBoot.getInstance().getGlobalConfig(), "org.pentaho.reporting.tools.configeditor.writer.");
    final XmlWriter dwriter = new XmlWriter(writer, tagDescription);


    dwriter.writeXmlDeclaration(encoding);
    dwriter.writeTag(ConfigEditorBoot.NAMESPACE,
        "config-description", attList, XmlWriterSupport.OPEN); //$NON-NLS-1$

    final CharacterEntityParser parser = CharacterEntityParser.createXMLEntityParser();
    for (int i = 0; i < getSize(); i++)
    {
      final ConfigDescriptionEntry entry = get(i);
      final AttributeList p = new AttributeList();
      p.setAttribute(ConfigEditorBoot.NAMESPACE, "name", entry.getKeyName()); //$NON-NLS-1$
      p.setAttribute(ConfigEditorBoot.NAMESPACE, "global", String.valueOf(entry.isGlobal())); //$NON-NLS-1$
      p.setAttribute(ConfigEditorBoot.NAMESPACE, "hidden", String.valueOf(entry.isHidden())); //$NON-NLS-1$
      dwriter.writeTag(ConfigEditorBoot.NAMESPACE, "key", p, XmlWriterSupport.OPEN); //$NON-NLS-1$
      if (entry.getDescription() != null)
      {
        dwriter.writeTag(ConfigEditorBoot.NAMESPACE, "description", XmlWriterSupport.OPEN); //$NON-NLS-1$
        writer.write(parser.encodeEntities(entry.getDescription()));
        dwriter.writeCloseTag();
      }
      if (entry instanceof ClassConfigDescriptionEntry)
      {
        final ClassConfigDescriptionEntry ce = (ClassConfigDescriptionEntry) entry;
        if (ce.getBaseClass() != null)
        {
          dwriter.writeTag(ConfigEditorBoot.NAMESPACE, "class", "instanceof", //$NON-NLS-1$ //$NON-NLS-2$
              ce.getBaseClass().getName(), XmlWriterSupport.CLOSE);
        }
        else
        {
          dwriter.writeTag(ConfigEditorBoot.NAMESPACE, "class", "instanceof", //$NON-NLS-1$ //$NON-NLS-2$
              "java.lang.Object", XmlWriterSupport.CLOSE); //$NON-NLS-1$
        }
      }
      else if (entry instanceof TextConfigDescriptionEntry)
      {
        dwriter.writeTag(ConfigEditorBoot.NAMESPACE, "text", //$NON-NLS-1$
            new AttributeList(), XmlWriterSupport.CLOSE);
      }
      else if (entry instanceof EnumConfigDescriptionEntry)
      {
        final EnumConfigDescriptionEntry en = (EnumConfigDescriptionEntry) entry;
        dwriter.writeTag(ConfigEditorBoot.NAMESPACE, "enum", XmlWriterSupport.OPEN); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (element == null)
    {
      throw new NullPointerException();
    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "crosstab-other-group-body", attList, XmlWriterSupport.OPEN);
    writeElementBody(bundle, state, element, xmlWriter);
    writeChildElements(bundle, state, xmlWriter, (Section) element);
    xmlWriter.writeCloseTag();
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (element == null)
    {
      throw new NullPointerException();
    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "crosstab", attList, XmlWriterSupport.OPEN);
    writeElementBody(bundle, state, element, xmlWriter);
    writeChildElements(bundle, state, xmlWriter, (Section) element);
    xmlWriter.writeCloseTag();
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (dataFactoryClass == null)
    {
      return;
    }

    final AttributeList attr = new AttributeList();
    attr.setAttribute(ExtParserModule.NAMESPACE, "type", dataFactoryClass);
    writer.writeTag(ExtParserModule.NAMESPACE, "data-factory", attr, XmlWriterSupport.CLOSE);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.xmlns.common.AttributeList

    if (element == null)
    {
      throw new NullPointerException();
    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "band", attList, XmlWriterSupport.OPEN);
    writeElementBody(bundle, state, element, xmlWriter);
    writeChildElements(bundle, state, xmlWriter, (Band) element);
    xmlWriter.writeCloseTag();
  }
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.