xmlgraphics-commons 1.3.1

org.apache.xmlgraphics.xmp
Class XMPSerializer

java.lang.Object
  extended by org.apache.xmlgraphics.xmp.XMPSerializer

public class XMPSerializer
extends java.lang.Object

Serializes an XMP tree to XML or to an XMP packet.


Constructor Summary
XMPSerializer()
           
 
Method Summary
static void writeXML(Metadata meta, javax.xml.transform.Result res)
          Writes the in-memory representation of the XMP metadata to a JAXP Result.
static void writeXMPPacket(Metadata meta, java.io.OutputStream out, boolean readOnlyXMP)
          Writes the in-memory representation of the XMP metadata to an OutputStream as an XMP packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMPSerializer

public XMPSerializer()
Method Detail

writeXML

public static void writeXML(Metadata meta,
                            javax.xml.transform.Result res)
                     throws javax.xml.transform.TransformerConfigurationException,
                            org.xml.sax.SAXException
Writes the in-memory representation of the XMP metadata to a JAXP Result.

Parameters:
meta - the metadata
res - the JAXP Result to write to
Throws:
javax.xml.transform.TransformerConfigurationException - if an error occurs setting up the XML infrastructure.
org.xml.sax.SAXException - if a SAX-related problem occurs while writing the XML

writeXMPPacket

public static void writeXMPPacket(Metadata meta,
                                  java.io.OutputStream out,
                                  boolean readOnlyXMP)
                           throws javax.xml.transform.TransformerConfigurationException,
                                  org.xml.sax.SAXException
Writes the in-memory representation of the XMP metadata to an OutputStream as an XMP packet.

Parameters:
meta - the metadata
out - the stream to write to
readOnlyXMP - true if the generated XMP packet should be read-only
Throws:
javax.xml.transform.TransformerConfigurationException - if an error occurs setting up the XML infrastructure.
org.xml.sax.SAXException - if a SAX-related problem occurs while writing the XML

xmlgraphics-commons 1.3.1

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.