Package org.jfree.xmlns.common

Examples of org.jfree.xmlns.common.AttributeList


                tableColumnProperties.setType("table-column-properties");
                tableColumnProperties.setNamespace(style.getNamespace());
                tableColumnProperties.setAttribute(style.getNamespace(), "column-width", columnWidth + getUnitsOfMeasure(null));
                style.addNode(tableColumnProperties);

                final AttributeList myAttrList = new AttributeList();
                myAttrList.setAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME, style.getStyleName());
                xmlWriter.writeTag(OfficeNamespaces.TABLE_NS, OfficeToken.TABLE_COLUMN, myAttrList, XmlWriterSupport.CLOSE);
            }
            xmlWriter.writeCloseTag();
        }
        catch (IOException e)
View Full Code Here


    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

    // 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

  private void writeElement (final Element element)
      throws IOException
  {
    final String type = element.getType();
    final String namespace = element.getNamespace();
    final AttributeList attrList = buildAttributeList(element.getAttributeMap());
    xmlWriter.writeTag(namespace, type, attrList, XmlWriterSupport.CLOSE);
  }
View Full Code Here

  private void writeSection (final Section section)
      throws IOException
  {
    final String type = section.getType();
    final String namespace = section.getNamespace();
    final AttributeList attrList = buildAttributeList(section.getAttributeMap());
    if (section.getNodeCount() == 0)
    {
      xmlWriter.writeTag(namespace, type, attrList, XmlWriterSupport.CLOSE);
      return;
    }
View Full Code Here

    }
  }

  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());
        attrList.setAttribute(attrNamespace, key, String.valueOf(entry.getValue()));
      }
    }
    return attrList;
  }
View Full Code Here

  }

  private void performWriteRootTag()
      throws IOException
  {
    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.xmlWriter.writeXmlDeclaration("UTF-8");
    this.xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS,
          "document-content", rootAttributes, XmlWriterSupport.OPEN);
  }
View Full Code Here

                       final boolean close)
      throws IOException
  {
    if (attributeName != null)
    {
      final AttributeList attr = new AttributeList();
      attr.setAttribute(namespace, attributeName, attributeValue);
      writeTag(w, namespace, name, attr, close);
    }
    else
    {
      writeTag(w, namespace, name, null, close);
View Full Code Here

      for (int i = 0; i < XHTML_HEADER.length; i++)
      {
        xmlWriter.writeText(XHTML_HEADER[i]);
        xmlWriter.writeNewLine();
      }
      final AttributeList htmlAttList = new AttributeList();
      htmlAttList.addNamespaceDeclaration("", Namespaces.XHTML_NAMESPACE);

      xmlWriter.writeTag(Namespaces.XHTML_NAMESPACE, "html",  XmlWriter.OPEN);
      xmlWriter.writeTag(Namespaces.XHTML_NAMESPACE, "head", XmlWriter.OPEN);
      xmlWriter.writeTag(Namespaces.XHTML_NAMESPACE, "title", XmlWriter.OPEN);
      xmlWriter.writeText("Yeah, sure, I *should* grab a sensible title from somewhere");
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.