Package org.fcrepo.server.storage.translation

Examples of org.fcrepo.server.storage.translation.AtomDODeserializer$UpdatedIdComparator


public class TestAtomDODeserializer
        extends TestXMLDODeserializer
        implements FedoraTestConstants {

    public TestAtomDODeserializer() {
        super(new AtomDODeserializer(), new AtomDOSerializer());
    }
View Full Code Here


                       "utf-8",
                       DOTranslationUtility.SERIALIZE_EXPORT_ARCHIVE);

        // 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

                 "atom/local-server-demos/formatting-objects-demo/obj_demo_26.xml"};
        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

        Datastream.autoChecksum = true;
        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

        Datastream.autoChecksum = false;
        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

Related Classes of org.fcrepo.server.storage.translation.AtomDODeserializer$UpdatedIdComparator

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.