Package org.fcrepo.server.storage.translation

Examples of org.fcrepo.server.storage.translation.AtomDOSerializer.serialize()


        // some sanity checks
        setObjectDefaults(obj);

        DOSerializer serializer = new AtomDOSerializer();
        serializer.serialize(obj, out, "UTF-8", SERIALIZE_EXPORT_ARCHIVE);
    }

    @Test
    public void testSerialize() throws Exception {
        DigitalObject obj = createTestObject(Models.FEDORA_OBJECT_3_0);
View Full Code Here


        obj.addDatastreamVersion(ds1, true);

        OutputStream out = new ByteArrayOutputStream();

        DOSerializer serializer = new AtomDOSerializer();
        serializer.serialize(obj, out, "UTF-8", SERIALIZE_EXPORT_ARCHIVE);
        // TODO
        //validateWithISOSchematron(out.toString());
    }

    @Test
View Full Code Here

        File f = File.createTempFile("atom", ".zip");
        OutputStream out = new FileOutputStream(f);

        DOSerializer serializer = new AtomDOSerializer(Constants.ATOM_ZIP1_1);
        serializer.serialize(obj, out, "UTF-8", SERIALIZE_EXPORT_ARCHIVE);
        out.close();

        ZipInputStream zip = new ZipInputStream(new FileInputStream(f));
        ZipEntry entry;
        int count = 0;
View Full Code Here

        // serialize the object as Atom
        DOSerializer serA = new AtomDOSerializer();
        File f = File.createTempFile("test", null);
        OutputStream out = new FileOutputStream(f);
        serA.serialize(original,
                       out,
                       "utf-8",
                       DOTranslationUtility.SERIALIZE_EXPORT_ARCHIVE);

        // deserialize the object
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.