new METSFedoraExt1_1DOSerializer();
HashMap<String, DODeserializer> desers = new HashMap<String, DODeserializer>();
HashMap<String, DOSerializer> sers = new HashMap<String, DOSerializer>();
desers.put(METS_EXT1_1.uri, deser);
sers.put(METS_EXT1_1.uri, ser);
DOTranslatorImpl trans = new DOTranslatorImpl(sers, desers);
DigitalObject obj = new BasicDigitalObject();
System.out.println("Deserializing...");
trans.deserialize(in,
obj,
METS_EXT1_1.uri,
"UTF-8",
DOTranslationUtility.DESERIALIZE_INSTANCE);
System.out.println("Done.");
ByteArrayOutputStream out = new ByteArrayOutputStream();
System.out.println("Re-serializing for STORAGE...");
trans.serialize(obj,
out,
METS_EXT1_1.uri,
"UTF-8",
DOTranslationUtility.SERIALIZE_STORAGE_INTERNAL);
System.out.println("Done.");