Package org.fcrepo.server.storage.translation

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


            "src/main/resources/schematron/iso_schematron_skeleton.xsl";

    private static final String atom_tron = "src/main/resources/schematron/atom.sch";

    public TestAtomDOSerializer() {
        super(new AtomDOSerializer());
    }
View Full Code Here


        deser.deserialize(in, obj, "UTF-8", DESERIALIZE_INSTANCE);

        // some sanity checks
        setObjectDefaults(obj);

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

        ds1.DSCreateDT = new Date();
        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());
    }
View Full Code Here

        obj.addDatastreamVersion(ds1, true);

        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

public class TestAtomDODeserializer
        extends TestXMLDODeserializer
        implements FedoraTestConstants {

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

        DatastreamXMLMetadata ds1 = createXDatastream("DS1");
        ds1.DSCreateDT = new Date();
        original.addDatastreamVersion(ds1, true);

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

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

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.