Package org.dspace.core

Examples of org.dspace.core.Context.complete()


     * Start harvest scheduler.
     */
    public static synchronized void startNewScheduler() throws SQLException, AuthorizeException {
        Context c = new Context();
        HarvestedCollection.exists(c);
        c.complete();

        if (mainHarvestThread != null && harvester != null) {
                stopScheduler();
            }
      harvester = new HarvestScheduler();
View Full Code Here


        try
        {
            context = new Context();
            processDaily(context, test);
            context.complete();
        }
        catch( Exception e )
        {
            log.fatal(e);
        }
View Full Code Here

        initDefaultGroupNames(context);

        //Clear the events to avoid the consumers which aren't needed at this time
        context.getEvents().clear();
        context.complete();
    }

    /**
     * Initializes the group names for anymous & administrator
     * @param context the dspace context
View Full Code Here

            {
                System.err.println(usage);
            }

            // Commit changes and close Context
            context.complete();

            System.exit(0);
        }
        catch (ArrayIndexOutOfBoundsException ae)
        {
View Full Code Here

                            "propfind failed, no document returned.");
                }
               
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                outputPretty.output(outdoc, baos);
                context.complete();
                return baos.toString();
            }
        }
        catch (IOException ie)
        {
View Full Code Here

                            "proppatch failed, no document returned.");
                }

                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                outputPretty.output(outdoc, baos);
                context.complete();
                return baos.toString();
            }
        }
        catch (IOException ie)
        {
View Full Code Here

                        status = 1;
                    }
                }
            }
            log.debug("Cache size at end = "+context.getCacheSize());
            context.complete();
            context = null;
        }
        catch (Exception e)
        {
            System.err.println("ERROR, got exception: "+e);
View Full Code Here

            if (result == null)
            {
                throw new LNIRemoteException("Resource not found.");
            }
           
            context.complete();

            return result;
        }
        catch (IOException ie)
        {
View Full Code Here

            }
           
            int status = resource.copyDriver(destination, depth, overwrite,
                    keepProperties);
           
            context.complete();

            return status;
        }
        catch (IOException ie)
        {
View Full Code Here

                }
                else
                {
                    response.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED);
                }
                context.complete();
                context = null;
            }
        }
        catch (SQLException e)
        {
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.