Package org.fcrepo.server.errors

Examples of org.fcrepo.server.errors.ObjectNotFoundException


                    "SELECT systemVersion FROM doRegistry WHERE doPID=?";
            s2 = conn.prepareStatement(query);
            s2.setString(1, pid);
            results = s2.executeQuery();
            if (!results.next()) {
                throw new ObjectNotFoundException("Error creating replication job: The requested object doesn't exist in the registry.");
            }
            int systemVersion = results.getInt("systemVersion");
            systemVersion++;
            query = "UPDATE doRegistry SET systemVersion=? WHERE doPID=?";
            s2 = conn.prepareStatement(query);
View Full Code Here


    private InputStream getStoredObjectInputStream(String pid)
            throws ObjectNotFoundException {
        try {
            return new FileInputStream((File) m_files.get(pid));
        } catch (Throwable th) {
            throw new ObjectNotFoundException("The object, " + pid + " was "
                    + "not found in the repository.");
        }
    }
View Full Code Here

                throw new GeneralException("Invalid target controlGroup " + controlGroup + ".  Only \"M\" is currently supported");

            try {
                w = m_manager.getWriter(false, context, pid);
            } catch (ObjectNotInLowlevelStorageException e ){
                throw new ObjectNotFoundException("Object " + pid + " does not exist.");
            }

            Datastream currentDS = w.GetDatastream(dsID, null);
            if (currentDS == null) {
                    throw new DatastreamNotFoundException("Datastream " + dsID + " not found");
View Full Code Here

                    conn = m_connectionPool.getReadWriteConnection();
                    s = conn.prepareStatement(PID_VERSION_QUERY);
                    s.setString(1, obj.getPid());
                    results = s.executeQuery();
                    if (!results.next()) {
                        throw new ObjectNotFoundException(
                                "Error creating replication job: The requested object " +
                                        pid + " doesn't exist in the registry.");
                    }
                    int systemVersion = results.getInt("systemVersion");
                    systemVersion++;
View Full Code Here

     */
    public synchronized DigitalObject getObject(String pid)
            throws ObjectNotFoundException {
        DigitalObject obj = _objects.get(pid);
        if (obj == null) {
            throw new ObjectNotFoundException("No such object: " + pid);
        } else {
            return obj;
        }
    }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.errors.ObjectNotFoundException

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.