Package com.adobe.xmp.core.serializer
Class RDFXMLSerializer
java.lang.Object
com.adobe.xmp.core.serializer.RDFXMLSerializer
- All Implemented Interfaces:
XMPSerializer
Implementation of XMPSerializer to serialize RDF/XML.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidserialize(XMPMetadata xmp, OutputStream out, Map<String, Object> serializeContext) Serialize XMP data as RDF/XML to an OutputStreambyte[]serializeToBuffer(XMPMetadata xmp, Map<String, Object> serializeContext) Serialize XMP data as RDF/XML UTF-8 encoded into a byte bufferserializeToString(XMPMetadata xmp, Map<String, Object> serializeContext) Serialize XMP data as RDF/XML into a String
-
Constructor Details
-
RDFXMLSerializer
public RDFXMLSerializer()
-
-
Method Details
-
serialize
public void serialize(XMPMetadata xmp, OutputStream out, Map<String, Object> serializeContext) throws IOException, XMPExceptionDescription copied from interface:XMPSerializerSerialize XMP data as RDF/XML to an OutputStream- Specified by:
serializein interfaceXMPSerializer- Parameters:
xmp- the XMP object to serializeout- 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:
IOException- If an error occurred writing to the streamXMPException- 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:
-
serializeToString
public String serializeToString(XMPMetadata xmp, Map<String, Object> serializeContext) throws IOException, XMPExceptionDescription copied from interface:XMPSerializerSerialize XMP data as RDF/XML into a String- Specified by:
serializeToStringin interfaceXMPSerializer- Parameters:
xmp- the XMP object to serializeserializeContext- an optional serialization context that can contains additional information to configure the serialization.- Returns:
- String containing the XMP data as RDF/XML
- Throws:
IOException- If an error occurred writing to the internal stream or out of memoryXMPException- 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:
-
serializeToBuffer
public byte[] serializeToBuffer(XMPMetadata xmp, Map<String, Object> serializeContext) throws IOException, XMPExceptionDescription copied from interface:XMPSerializerSerialize XMP data as RDF/XML UTF-8 encoded into a byte buffer- Specified by:
serializeToBufferin interfaceXMPSerializer- Parameters:
xmp- the XMP object to serializeserializeContext- an optional serialization context that can contains additional information to configure the serialization.- Returns:
- Buffer containing the XMP data as RDF/XML
- Throws:
IOException- If an error occurred writing to the streamXMPException- 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:
-