Package org.fcrepo.server.storage.translation

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


                                " with impl " + llstore.getClass().getName());
                    }
                    Iterator<String> pids = ((IListable) llstore).listObjects();
                    int total = 0;
                    int errors = 0;
                    DODeserializer deser = new FOXML1_1DODeserializer();

                    while (pids.hasNext()) {
                        total++;
                        String pid = pids.next();
                        System.out.println("Adding object #" + total + ": " +
View Full Code Here


                "src/main/resources/demo/demo-objects/foxml/local-server-demos/formatting-objects-demo/obj_demo_26.xml";
        InputStream in = new FileInputStream(source);
        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

                       "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.DODeserializer

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.