Package org.jfree.xmlns.common

Examples of org.jfree.xmlns.common.AttributeList


    // All styles have to be processed or you will loose the paragraph-styles and inline text-styles.
    // ..
    performStyleProcessing(attrs);

    final AttributeList attrList = buildAttributeList(attrs);
    xmlWriter.writeTag(namespace, elementType, attrList, XmlWriter.OPEN);
    // System.out.println("elementType = " + elementType);
  }
View Full Code Here


        tableColumnProperties.setNamespace(style.getNamespace());
        tableColumnProperties.setAttribute(style.getNamespace(), "column-width", String.valueOf(columnWidth)
            + getUnitsOfMeasure(null));
        style.addNode(tableColumnProperties);

        final AttributeList myAttrList = new AttributeList();
        myAttrList.setAttribute(OfficeNamespaces.TABLE_NS, "style-name", style.getStyleName());
        xmlWriter.writeTag(OfficeNamespaces.TABLE_NS, "table-column", myAttrList, XmlWriterSupport.CLOSE);
      }
      xmlWriter.writeCloseTag();
    }
    catch (IOException e)
View Full Code Here

    // This is a rather cheap solution to the problem. In a sane world, we would have to feed the
    // footer multiple times. Right now, we simply rely on the balacing, which should make sure that
    // the column's content are evenly distributed.
    final XmlWriter writer = getXmlWriter();
    final AttributeList attrs = new AttributeList();
    attrs.setAttribute(OfficeNamespaces.TEXT_NS, "style-name", generateSectionStyle(numberOfColumns));
    attrs.setAttribute(OfficeNamespaces.TEXT_NS, "name", sectionNames.generateName("Section"));
    writer.writeTag(OfficeNamespaces.TEXT_NS, "section", attrs, XmlWriterSupport.OPEN);
    for (int i = 0; i < numberOfColumns; i++)
    {
      writer.writeStream(contents.getXmlAsReader());
    }
View Full Code Here

    }

    // process the styles as usual
    performStyleProcessing(attrs);

    final AttributeList attrList = buildAttributeList(attrs);
    xmlWriter.writeTag(namespace, elementType, attrList, XmlWriterSupport.OPEN);

    if (ReportTargetUtil.isElementOfType(OfficeNamespaces.TEXT_NS, "p", attrs))
    {
      cellEmpty = false;
View Full Code Here

//      // Anyway, if we are here, we do not create a keep-together style on the table-row ..
//    }
    // process the styles as usual
    performStyleProcessing(attrs);

    final AttributeList attrList = buildAttributeList(attrs);
    getXmlWriter().writeTag(OfficeNamespaces.TABLE_NS, "table-row", attrList, XmlWriterSupport.OPEN);
  }
View Full Code Here

      performStyleProcessing(attrs);
    }

    final String namespace = ReportTargetUtil.getNamespaceFromAttribute(attrs);
    final String elementType = ReportTargetUtil.getElemenTypeFromAttribute(attrs);
    final AttributeList attrList = buildAttributeList(attrs);
    xmlWriter.writeTag(namespace, elementType, attrList, XmlWriterSupport.OPEN);
  }
View Full Code Here

    final Integer columnCount = pageContext.getColumnCount();
    if (columnCount != null)
    {
      if (pageContext.isSectionOpen() == false)
      {
        final AttributeList attrs = new AttributeList();
        attrs.setAttribute(OfficeNamespaces.TEXT_NS, "style-name", generateSectionStyle(columnCount.intValue()));
        attrs.setAttribute(OfficeNamespaces.TEXT_NS, "name", sectionNames.generateName("Section"));
        getXmlWriter().writeTag(OfficeNamespaces.TEXT_NS, "section", attrs, XmlWriterSupport.OPEN);

        pageContext.setSectionOpen(true);
      }
    }
View Full Code Here

    variablesDeclarations = null;

    try
    {
      // Write the settings ..
      final AttributeList rootAttributes = new AttributeList();
      rootAttributes.addNamespaceDeclaration("office", OfficeNamespaces.OFFICE_NS);
      rootAttributes.addNamespaceDeclaration("config", OfficeNamespaces.CONFIG);
      rootAttributes.addNamespaceDeclaration("ooo", OfficeNamespaces.OO2004_NS);
      rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0");
      final OutputStream outputStream = getOutputRepository().createOutputStream("settings.xml","text/xml");
      final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), createTagDescription());
      xmlWriter.setAlwaysAddNamespace(true);
      xmlWriter.writeXmlDeclaration("UTF-8");
      xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-settings", rootAttributes, XmlWriterSupport.OPEN);
      xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "settings", XmlWriterSupport.OPEN);
      xmlWriter.writeTag(OfficeNamespaces.CONFIG, "config-item-set", "name", "ooo:configuration-settings", XmlWriterSupport.OPEN);

      final AttributeList configAttributes = new AttributeList();
      configAttributes.setAttribute(OfficeNamespaces.CONFIG, "name", "TableRowKeep");
      configAttributes.setAttribute(OfficeNamespaces.CONFIG, "type", "boolean");
      xmlWriter.writeTag(OfficeNamespaces.CONFIG, "config-item", configAttributes, XmlWriterSupport.OPEN);
      xmlWriter.writeText("true");
      xmlWriter.writeCloseTag();

      xmlWriter.writeCloseTag();
View Full Code Here

      final Writer writer = new OutputStreamWriter(outputStream, "UTF-8");

      this.rootXmlWriter = new XmlWriter(writer, tagDescription);
      this.rootXmlWriter.setAlwaysAddNamespace(true);

      final AttributeList rootAttributes = new AttributeList();
      rootAttributes.addNamespaceDeclaration("office", OfficeNamespaces.OFFICE_NS);
      rootAttributes.addNamespaceDeclaration("style", OfficeNamespaces.STYLE_NS);
      rootAttributes.addNamespaceDeclaration("text", OfficeNamespaces.TEXT_NS);
      rootAttributes.addNamespaceDeclaration("table", OfficeNamespaces.TABLE_NS);
      rootAttributes.addNamespaceDeclaration("draw", OfficeNamespaces.DRAWING_NS);
      rootAttributes.addNamespaceDeclaration("fo", OfficeNamespaces.FO_NS);
      rootAttributes.addNamespaceDeclaration("xlink", OfficeNamespaces.XLINK_NS);
      rootAttributes.addNamespaceDeclaration("dc", OfficeNamespaces.PURL_NS);
      rootAttributes.addNamespaceDeclaration("meta", OfficeNamespaces.META_NS);
      rootAttributes.addNamespaceDeclaration("number", OfficeNamespaces.DATASTYLE_NS);
      rootAttributes.addNamespaceDeclaration("svg", OfficeNamespaces.SVG_NS);
      rootAttributes.addNamespaceDeclaration("chart", OfficeNamespaces.CHART_NS);
      rootAttributes.addNamespaceDeclaration("dr3d", OfficeNamespaces.DR3D_NS);
      rootAttributes.addNamespaceDeclaration("math", OfficeNamespaces.MATHML_NS);
      rootAttributes.addNamespaceDeclaration("form", OfficeNamespaces.FORM_NS);
      rootAttributes.addNamespaceDeclaration("script", OfficeNamespaces.SCRIPT_NS);
      rootAttributes.addNamespaceDeclaration("ooo", OfficeNamespaces.OO2004_NS);
      rootAttributes.addNamespaceDeclaration("ooow", OfficeNamespaces.OOW2004_NS);
      rootAttributes.addNamespaceDeclaration("oooc", OfficeNamespaces.OOC2004_NS);
      rootAttributes.addNamespaceDeclaration("dom", OfficeNamespaces.XML_EVENT_NS);
      rootAttributes.addNamespaceDeclaration("xforms", OfficeNamespaces.XFORMS_NS);
      rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS);
      rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS);
      rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0");

      this.rootXmlWriter.writeXmlDeclaration("UTF-8");
      this.rootXmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-content", rootAttributes, XmlWriterSupport.OPEN);

      states.push(IntegerCache.getInteger(OfficeDocumentReportTarget.STATE_IN_DOCUMENT));
View Full Code Here

    return null;
  }

  protected AttributeList buildAttributeList(final AttributeMap attrs)
  {
    final AttributeList attrList = new AttributeList();
    final String[] namespaces = attrs.getNameSpaces();
    for (int i = 0; i < namespaces.length; i++)
    {
      final String attrNamespace = namespaces[i];
      if (isFilteredNamespace(attrNamespace))
      {
        continue;
      }

      final Map localAttributes = attrs.getAttributes(attrNamespace);
      final Iterator entries = localAttributes.entrySet().iterator();
      while (entries.hasNext())
      {
        final Map.Entry entry = (Map.Entry) entries.next();
        final String key = String.valueOf(entry.getKey());
        if (OfficeNamespaces.TABLE_NS.equals(attrNamespace) &&
            "name".equals(key))
        {
          final String tableName = String.valueOf(entry.getValue());
          final String saneName = sanitizeName(tableName);
          attrList.setAttribute(attrNamespace, key,
              tableNameGenerator.generateName(saneName));
        }
        else
        {
          attrList.setAttribute
              (attrNamespace, key, String.valueOf(entry.getValue()));
        }
      }
    }
    return attrList;
View Full Code Here

TOP

Related Classes of org.jfree.xmlns.common.AttributeList

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.