Package org.fcrepo.server.storage.types

Examples of org.fcrepo.server.storage.types.Datastream


     */
    @Override
    public Datastream GetDatastream(String datastreamID, Date versDateTime) {
        // get the one with the closest creation date
        // without going over
        Datastream result = null;
        long bestTimeDifference = Long.MAX_VALUE;
        long latestCreateTime = -1;
        long vTime = -1;
        if (versDateTime != null) {
            vTime = versDateTime.getTime();
View Full Code Here


    @Override
    public Datastream[] GetDatastreams(Date versDateTime, String state) {
        String[] ids = ListDatastreamIDs(null);
        ArrayList<Datastream> al = new ArrayList<Datastream>();
        for (String element : ids) {
            Datastream ds = GetDatastream(element, versDateTime);
            if (ds != null && (state == null || ds.DSState.equals(state))) {
                al.add(ds);
            }
        }
        Datastream[] out = new Datastream[al.size()];
View Full Code Here

        assertFalse(checksum1.equals(checkSum2));
    }
    @Test
    public void testDatastreamContentSerialization()
        throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        Datastream dsc = createMDatastream("DS1", TestBase64.FOO_BYTES);
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        PrintWriter pw = new PrintWriter(bos);
        Method testMethod = METSFedoraExtDOSerializer.class.getDeclaredMethod("serializeDatastreamContent", Datastream.class, PrintWriter.class);
        boolean accessible = testMethod.isAccessible();
        if ( !accessible ) testMethod.setAccessible(true);
View Full Code Here

        m_obj.setLastModDate(m_startTime);
        m_obj.setOwnerId("userId1");
        m_obj.setPid("test:1");
        m_obj.setState("A");
        // add some datastreams
        m_ds1_0 = new Datastream();
        m_ds1_0.DatastreamID = "DS1.0";
        m_ds1_0.DSVersionID = "DS1";
        m_ds1_1 = new Datastream();
        m_ds1_1.DatastreamID = "DS1.1";
        m_ds1_1.DSVersionID = "DS1";
        m_ds2_0 = new Datastream();
        m_ds2_0.DatastreamID = "DS2.0";
        m_ds2_0.DSVersionID = "DS2";
        // ... and some audit records
        m_audit1 = new AuditRecord();
        m_audit1.id = "AUDIT1";
View Full Code Here

TOP

Related Classes of org.fcrepo.server.storage.types.Datastream

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.