Package org.dspace.core

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


            {
                myloader.deleteItems(c, mapfile);
            }

            // complete all transactions
            c.complete();
        }
        catch (Exception e)
        {
            // abort all operations
            if (mapOut != null)
View Full Code Here


                c.commit();
            }

            // Finsh off and tidy up
            c.restoreAuthSystemState();
            c.complete();
        }
        catch (Exception e)
        {
            c.abort();
            System.err.println("Error commiting changes to database: " + e.getMessage());
View Full Code Here

          HANDLE_PREFIX = "http://hdl.handle.net/";
        }
                 
          iu.processArchive(context, sourcedir, itemField, metadataIndexName, alterProvenance, isTest);                         

          context.complete()// complete all transactions
          context.setIgnoreAuthorization(false);
        }
        catch (Exception e)
        {
            if (context != null && context.isValid())
View Full Code Here

        {
            System.out.println("Unable to write to output file " + output);
            System.exit(0);
        }
       
        context.complete();
    }
   
    /**
     * Output the usage information
     */
 
View Full Code Here

        indexer.initBrowse();
        return;
      }
     
      indexer.usage(options);
        context.complete();
  }

  /**
   * output the usage information
   *
 
View Full Code Here

            // Finally, for all items that have no date.available or withdrawal
            // date, set the update time to now!
            DatabaseManager.updateQuery(context,
                        "UPDATE item SET last_modified=now() WHERE last_modified IS NULL");

            context.complete();

            System.out.println("Last modified dates set");

            System.exit(0);
        }
View Full Code Here

                    }
                }
            }
        }

        c.complete();
    }
}
View Full Code Here

    throws ItemCountException, SQLException
  {
        Context context = new Context();
        ItemCounter ic = new ItemCounter(context);
    ic.buildItemCounts();
        context.complete();
  }
 
  /**
   * Construct a new item counter which will use the give DSpace Context
   *
 
View Full Code Here

                        i.close();
                }
            }
        }

        c.complete();
    }

    private static void exportItem(Context c, ItemIterator i,
            String destDirName, int seqStart, boolean migrate) throws Exception
    {
View Full Code Here

        try
        {
            context = new Context();
            processDaily(context, test);
            context.complete();
        }
        catch( Exception e )
        {
            log.fatal(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.