Package org.fcrepo.server

Examples of org.fcrepo.server.RecoveryContext


        }

        // If the datastream ID is not specified directly, see
        // if we can get it from the RecoveryContext
        if (dsID == null && context instanceof RecoveryContext) {
            RecoveryContext rContext = (RecoveryContext) context;
            dsID =
                    rContext
                            .getRecoveryValue(Constants.RECOVERY.DATASTREAM_ID.uri);
            if (dsID != null) {
                logger.debug("Using new dsID from recovery context");
            }
        }
View Full Code Here


            String[] pidList = null;

            // If the pidList is in the RecoveryContext, just reserve them
            // rather than generating new ones.
            if (context instanceof RecoveryContext) {
                RecoveryContext rContext = (RecoveryContext) context;
                pidList =
                        rContext
                                .getRecoveryValues(Constants.RECOVERY.PID_LIST.uri);
                if (pidList != null && pidList.length > 0) {
                    logger.debug("Reserving and returning PID_LIST "
                                 + "from recovery context");
                    m_manager.reservePIDs(pidList);
View Full Code Here

        int recoveryId = -1;

        // If the RecoveryContext has an uploaded://n url, use n.
        if (context instanceof RecoveryContext) {
            RecoveryContext rContext = (RecoveryContext) context;
            String uploadURL =
                    rContext.getRecoveryValue(Constants.RECOVERY.UPLOAD_ID.uri);
            if (uploadURL != null) {
                try {
                    String n = uploadURL.substring(11);
                    recoveryId = Integer.parseInt(n);
                } catch (Exception e) {
View Full Code Here

                        String p = null;
                        try {
                            // If the context contains a recovery PID, use that.
                            // Otherwise, generate a new PID as usual.
                            if (context instanceof RecoveryContext) {
                                RecoveryContext rContext =
                                        (RecoveryContext) context;
                                p =
                                        rContext.getRecoveryValue(Constants.RECOVERY.PID.uri);
                            }
                            if (p == null) {
                                p =
                                        m_pidGenerator.generatePID(
                                                m_pidNamespace).toString();
View Full Code Here

TOP

Related Classes of org.fcrepo.server.RecoveryContext

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.