org.fcrepo.server.storage.translation
Interface DOSerializer

All Known Implementing Classes:
Atom1_1DOSerializer, AtomDOSerializer, AtomZip1_1DOSerializer, FOXML1_0DOSerializer, FOXML1_1DOSerializer, FOXMLDOSerializer, METSFedoraExt1_0DOSerializer, METSFedoraExt1_1DOSerializer, METSFedoraExtDOSerializer

public interface DOSerializer

Writes a Fedora object to some format.

Implementations of this interface MUST implement a public, no-arg constructor.

Author:
Chris Wilper

Method Summary
 DOSerializer getInstance()
          Creates a new serializer that writes the same format as this one.
 void serialize(DigitalObject obj, OutputStream out, String encoding, int transContext)
          Serializes the given object.
 

Method Detail

getInstance

DOSerializer getInstance()
Creates a new serializer that writes the same format as this one.


serialize

void serialize(DigitalObject obj,
               OutputStream out,
               String encoding,
               int transContext)
               throws ObjectIntegrityException,
                      StreamIOException,
                      UnsupportedEncodingException
Serializes the given object.

Parameters:
obj - the object to serialize.
out - where to send the output to (auto-closed when finished).
encoding - the character encoding if the format is text-based.
transContext - the translation context.
Throws:
ObjectIntegrityException - if the given object is in such a state that serialization can't be performed.
StreamIOException - if there is an error writing to the stream.
UnsupportedEncodingException - if the encoding is not supported by the JVM.
See Also:
DOTranslationUtility.SERIALIZE_EXPORT_ARCHIVE, DOTranslationUtility.SERIALIZE_EXPORT_PUBLIC, DOTranslationUtility.SERIALIZE_EXPORT_MIGRATE, DOTranslationUtility.SERIALIZE_STORAGE_INTERNAL


Copyright © 2011 DuraSpace. All Rights Reserved.