private void archiveBitstream(Context context, Bundle target, Bitstream bitstream) throws SQLException, AuthorizeException, IOException { bundleService.addBitstream(context, target, bitstream); }
private void archiveBundle(Context context, Item item, Bundle source) throws SQLException, AuthorizeException, IOException { // get the datestamped root bundle name SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String oldName = "VER" + sdf.format(new Date()); oldName = this.getNumberedName(item, oldName, 0); Bundle old = bundleService.create(context, item, oldName); List<Bitstream> bitstreams = source.getBitstreams(); for (Bitstream bitstream : bitstreams) { bundleService .addBitstream(context, old, bitstream); } }
@Override public Bitstream create(Context context, Bundle bundle, InputStream is) throws IOException, SQLException, AuthorizeException { // Check authorisation authorizeService.authorizeAction(context, bundle, Constants.ADD); Bitstream b = create(context, is); bundleService.addBitstream(context, bundle, b); return b; }
@Override public Bitstream register(Context context, Bundle bundle, int assetstore, String bitstreamPath) throws IOException, SQLException, AuthorizeException { // check authorisation authorizeService.authorizeAction(context, bundle, Constants.ADD); Bitstream bitstream = register(context, assetstore, bitstreamPath); bundleService.addBitstream(context, bundle, bitstream); return bitstream; }
bundleService.addBitstream(context, bundles.get(0), result.getOriginalDeposit()); } else { Bundle bundle = bundleService.create(context, item, Constants.CONTENT_BUNDLE_NAME); bundleService.addBitstream(context, bundle, result.getOriginalDeposit());
bitstreamService.update(context, newBitstream); bundleService.addBitstream(context, targetBundle, newBitstream); bundleService.update(context, targetBundle); } else {
bundleService.addBitstream(context, pBundle, bitstream); bundleService.removeBitstream(context, bundle, bitstream); List<Bitstream> bitstreams = bundle.getBitstreams();
bitstreamService.update(ourContext, OREBitstream); bundleService.addBitstream(ourContext, OREBundle, OREBitstream); bundleService.update(ourContext, OREBundle);
bundleService.addBitstream(c, bundleNew, bitstreamNew);