Package org.fcrepo.server.storage.translation

Examples of org.fcrepo.server.storage.translation.DODeserializer.deserialize()


        File f = File.createTempFile("test", null);
        OutputStream out = new FileOutputStream(f);

        DODeserializer deser = new FOXML1_1DODeserializer();
        DigitalObject obj = new BasicDigitalObject();
        deser.deserialize(in, obj, "UTF-8", DESERIALIZE_INSTANCE);

        // some sanity checks
        setObjectDefaults(obj);

        DOSerializer serializer = new AtomDOSerializer();
View Full Code Here


        // deserialize the object
        DigitalObject candidate = new BasicDigitalObject();
        DODeserializer deserA = new AtomDODeserializer();
        InputStream in = new FileInputStream(f);
        deserA.deserialize(in,
                           candidate,
                           "utf-8",
                           DOTranslationUtility.DESERIALIZE_INSTANCE);

        // check the deserialization
View Full Code Here

        for (String source : demoSources) {
            File sourceFile = new File(DEMO_DIR_PREFIX + source);
            InputStream in = new FileInputStream(sourceFile);
            DigitalObject candidate = new BasicDigitalObject();
            DODeserializer deserA = new AtomDODeserializer();
            deserA.deserialize(in,
                               candidate,
                               "utf-8",
                               DOTranslationUtility.DESERIALIZE_INSTANCE);
        }
    }
View Full Code Here

        byte[] demo1001ATOMZip = get_demo1001_zip();

        InputStream in = new ByteArrayInputStream(demo1001ATOMZip);
        DigitalObject obj = new BasicDigitalObject();
        DODeserializer dser = new AtomDODeserializer(Constants.ATOM_ZIP1_1);
        dser.deserialize(in, obj, "UTF-8", DOTranslationUtility.DESERIALIZE_INSTANCE);
        assertEquals("demo:1001", obj.getPid());
        assertEquals(true, Datastream.autoChecksum);

        // RELS-EXT is not marked, so should default
        String id = "RELS-EXT";
View Full Code Here

        byte[] demo1001ATOMZip = get_demo1001_zip();

        InputStream in = new ByteArrayInputStream(demo1001ATOMZip);
        DigitalObject obj = new BasicDigitalObject();
        DODeserializer dser = new AtomDODeserializer(Constants.ATOM_ZIP1_1);
        dser.deserialize(in, obj, "UTF-8", DOTranslationUtility.DESERIALIZE_INSTANCE);
        assertEquals("demo:1001", obj.getPid());
        assertEquals(false, Datastream.autoChecksum);

        String id = "RELS-EXT";
        for (Datastream version : obj.datastreams(id)) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.