Class RDFXMLSerializer

  • All Implemented Interfaces:
    XMPSerializer

    public class RDFXMLSerializer
    extends java.lang.Object
    implements XMPSerializer
    Implementation of XMPSerializer to serialize RDF/XML.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void serialize​(XMPMetadata xmp, java.io.OutputStream out, java.util.Map<java.lang.String,​java.lang.Object> serializeContext)
      Serialize XMP data as RDF/XML to an OutputStream
      byte[] serializeToBuffer​(XMPMetadata xmp, java.util.Map<java.lang.String,​java.lang.Object> serializeContext)
      Serialize XMP data as RDF/XML UTF-8 encoded into a byte buffer
      java.lang.String serializeToString​(XMPMetadata xmp, java.util.Map<java.lang.String,​java.lang.Object> serializeContext)
      Serialize XMP data as RDF/XML into a String
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RDFXMLSerializer

        public RDFXMLSerializer()
    • Method Detail

      • serialize

        public void serialize​(XMPMetadata xmp,
                              java.io.OutputStream out,
                              java.util.Map<java.lang.String,​java.lang.Object> serializeContext)
                       throws java.io.IOException,
                              XMPException
        Description copied from interface: XMPSerializer
        Serialize XMP data as RDF/XML to an OutputStream
        Specified by:
        serialize in interface XMPSerializer
        Parameters:
        xmp - the XMP object to serialize
        out - the stream to write to. Client has to open/close the stream.
        serializeContext - an optional serialization context that can contains additional information to configure the serialization.
        Throws:
        java.io.IOException - If an error occurred writing to the stream
        XMPException - This exception is thrown if the data model contains portions that can't be serialized by a specific serializer or if the options are inconsistent.
        See Also:
        XMPSerializer.serialize(XMPMetadata, OutputStream, Map)
      • serializeToString

        public java.lang.String serializeToString​(XMPMetadata xmp,
                                                  java.util.Map<java.lang.String,​java.lang.Object> serializeContext)
                                           throws java.io.IOException,
                                                  XMPException
        Description copied from interface: XMPSerializer
        Serialize XMP data as RDF/XML into a String
        Specified by:
        serializeToString in interface XMPSerializer
        Parameters:
        xmp - the XMP object to serialize
        serializeContext - an optional serialization context that can contains additional information to configure the serialization.
        Returns:
        String containing the XMP data as RDF/XML
        Throws:
        java.io.IOException - If an error occurred writing to the internal stream or out of memory
        XMPException - This exception is thrown if the data model contains portions that can't be serialized by a specific serializer or if the options are inconsistent.
        See Also:
        XMPSerializer.serializeToString(XMPMetadata, Map)
      • serializeToBuffer

        public byte[] serializeToBuffer​(XMPMetadata xmp,
                                        java.util.Map<java.lang.String,​java.lang.Object> serializeContext)
                                 throws java.io.IOException,
                                        XMPException
        Description copied from interface: XMPSerializer
        Serialize XMP data as RDF/XML UTF-8 encoded into a byte buffer
        Specified by:
        serializeToBuffer in interface XMPSerializer
        Parameters:
        xmp - the XMP object to serialize
        serializeContext - an optional serialization context that can contains additional information to configure the serialization.
        Returns:
        Buffer containing the XMP data as RDF/XML
        Throws:
        java.io.IOException - If an error occurred writing to the stream
        XMPException - This exception is thrown if the data model contains portions that can't be serialized by a specific serializer or if the options are inconsistent.
        See Also:
        XMPSerializer.serializeToBuffer(XMPMetadata, Map)