Package org.fcrepo.server.storage.translation

Examples of org.fcrepo.server.storage.translation.DOTranslatorImpl


        serializers.put(FORMAT_2, new MockDOSerializer(FORMAT_2));
        Map<String, DODeserializer> deserializers =
                new HashMap<String, DODeserializer>();
        deserializers.put(FORMAT_1, new MockDODeserializer(FORMAT_1));
        deserializers.put(FORMAT_2, new MockDODeserializer(FORMAT_2));
        m_trans = new DOTranslatorImpl(serializers, deserializers);
    }
View Full Code Here


                    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.");
View Full Code Here

TOP

Related Classes of org.fcrepo.server.storage.translation.DOTranslatorImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.