Package org.fcrepo.server.storage.translation

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


                                " 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


    static String DCEND = "                </oai_dc:dc>";


    public static DigitalObject producefedoraObject30()
            throws FileNotFoundException, ObjectIntegrityException, StreamIOException, UnsupportedEncodingException {
        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream(
                "src/main/resources/utilities/server/org/fcrepo/server/resources/fedora-system_FedoraObject-3.0.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;

    }
View Full Code Here

    }

    public static DigitalObject produceContentModel30()
            throws FileNotFoundException, ObjectIntegrityException, StreamIOException, UnsupportedEncodingException {
        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream(
                "src/main/resources/utilities/server/org/fcrepo/server/resources/fedora-system_ContentModel-3.0.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;

    }
View Full Code Here

    }

    public static DigitalObject produceServiceDef30()
            throws FileNotFoundException, ObjectIntegrityException, StreamIOException, UnsupportedEncodingException {
        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream(
                "src/main/resources/utilities/server/org/fcrepo/server/resources/fedora-system_ServiceDefinition-3.0.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;

    }
View Full Code Here

    }

    public static DigitalObject produceServiceDep30()
            throws FileNotFoundException, ObjectIntegrityException, StreamIOException, UnsupportedEncodingException {
        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream(
                "src/main/resources/utilities/server/org/fcrepo/server/resources/fedora-system_ServiceDeployment-3.0.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;

    }
View Full Code Here


    public static DigitalObject produceContentModel1()
            throws ObjectIntegrityException, StreamIOException, UnsupportedEncodingException, FileNotFoundException {

        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream("src/test/resources/ecm/contentmodel1.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;

    }
View Full Code Here

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        FOXML1_1DOSerializer ser = new FOXML1_1DOSerializer();
        ser.serialize(obj, out, charEncoding, transContext);

        FOXML1_1DODeserializer deser = new FOXML1_1DODeserializer();
        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
        DigitalObject objCopy = new BasicDigitalObject();
        deser.deserialize(in, objCopy, charEncoding, transContext);

        // make sure dates of any to-be-added new components differ
        try {
            Thread.sleep(100);
        } catch (Exception e) {
View Full Code Here

    }


    public static DigitalObject produceContentModel2()
            throws FileNotFoundException, ObjectIntegrityException, StreamIOException, UnsupportedEncodingException {
        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream("src/test/resources/ecm/contentmodel2.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;
    }
View Full Code Here

    }


    public static DigitalObject produceContentModel3()
            throws FileNotFoundException, ObjectIntegrityException, StreamIOException, UnsupportedEncodingException {
        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream("src/test/resources/ecm/contentmodel3.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;
    }
View Full Code Here

    }


    public static DigitalObject produceDataObject1()
            throws FileNotFoundException, ObjectIntegrityException, StreamIOException, UnsupportedEncodingException {
        FOXML1_1DODeserializer deserialiser = new FOXML1_1DODeserializer();
        BasicDigitalObject object = new BasicDigitalObject();
        FileInputStream in = new FileInputStream("src/test/resources/ecm/dataobject1.xml");
        deserialiser.deserialize(in, object, "UTF-8", DOTranslationUtility.AS_IS);
        return object;
    }
View Full Code Here

TOP

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

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.