Package org.fcrepo.server.storage

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()


    protected AbstractPolicy loadObjectPolicy(PolicyParser policyParser, String pid, boolean validate) throws ServerException {
        try {
            DOReader reader = m_repoReader.getReader(Server.USE_DEFINITIVE_STORE,
                                                     ReadOnlyContext.EMPTY,
                                                     pid);
            Datastream ds = reader.GetDatastream("POLICY", null);
            if (ds != null) {
                logger.debug("Using POLICY for " + pid);
                return policyParser.parse(ds.getContentStream(), validate);
            } else {
                return null;
View Full Code Here


                                         asOfDateTime);

            DOReader r =
                    m_manager.getReader(Server.GLOBAL_CHOICE, context, pid);

            return r.GetDatastream(datastreamID, asOfDateTime);
        } finally {
            // Logger completion
            if (logger.isInfoEnabled()) {
                StringBuilder logMsg =
                        new StringBuilder("Completed getDatastream(");
View Full Code Here

            DOReader r =
                    m_manager.getReader(Server.GLOBAL_CHOICE, context, pid);
            Date[] versionDates = r.getDatastreamVersions(datastreamID);
            Datastream[] versions = new Datastream[versionDates.length];
            for (int i = 0; i < versionDates.length; i++) {
                versions[i] = r.GetDatastream(datastreamID, versionDates[i]);
            }
            // sort, ascending
            Arrays.sort(versions, new DatastreamDateComparator());
            // reverse it (make it descend, so most recent date is element 0)
            Datastream[] out = new Datastream[versions.length];
View Full Code Here

            logger.debug("Getting Reader");
            r = m_manager.getReader(Server.USE_DEFINITIVE_STORE, context, pid);
            logger.debug("Getting datastream:" + datastreamID + "date: "
                         + versionDate);
            Datastream ds = r.GetDatastream(datastreamID, versionDate);
            logger.debug("Got Datastream, comparing checksum");
            boolean check = ds.compareChecksum();
            logger.debug("compared checksum = " + check);

            return check ? ds.getChecksum() : "Checksum validation error";
View Full Code Here

                    dsBindRule.pid == null ? dObj.GetObjectPID()
                                           : dsBindRule.pid;
            String dsId = dsBindRule.bindingKeyName;

            DOReader reader = m_manager.getReader(false, context, dsPid);
            Datastream ds = reader.GetDatastream(dsId, versDateTime);

            if (ds != null) {
                DisseminationBindingInfo bindingInfo =
                        new DisseminationBindingInfo();
                bindingInfo.DSBindKey = dsId;
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.