Package org.dspace.content

Examples of org.dspace.content.Bitstream.update()


            // Identify the format
            BitstreamFormat bf = FormatIdentifier.guessFormat(context, logoBS);
            logoBS.setFormat(bf);
            AuthorizeManager.addPolicy(context, logoBS, Constants.WRITE, context.getCurrentUser());
            logoBS.update();

            String jsp;
            DSpaceObject dso;
            if (collection == null)
            {
View Full Code Here


                    if (userFormatDesc != null)
                    {
                        bitstream.setUserFormatDescription(userFormatDesc);
                    }

                    bitstream.update();
                    bundle.update();
                }
            }
        }
View Full Code Here

            b.setSource(wrapper.getFilesystemName("file"));

            // Identify the format
            BitstreamFormat bf = FormatIdentifier.guessFormat(context, b);
            b.setFormat(bf);
            b.update();

            item.update();

            // Back to edit form
            showEditForm(context, request, response, item);
View Full Code Here

      // Identify the format
      BitstreamFormat format = FormatIdentifier.guessFormat(context, bitstream);
      bitstream.setFormat(format);

      // Update to DB
      bitstream.update();
      item.update();

            processAccessFields(context, request, item.getOwningCollection(), bitstream);
     
      context.commit();
View Full Code Here

      }
    }
   
    //Step 3:
    // Save our changes
    bitstream.update();
    context.commit();

        processAccessFields(context, request, ((Item)bitstream.getParentObject()).getOwningCollection(), bitstream);

View Full Code Here

              rp.update();
        }
          }
         
          //update after all changes are applied
          bs.update();
       
          if (!suppressUndo)
          {
            itarch.addUndoDeleteContents(bs.getID());
          }
View Full Code Here

      // to do the updates, we need to ignore authorisation in the context
      boolean ignoreAuth = context.ignoreAuthorization();
      context.setIgnoreAuthorization(true);

      bs.update();
      original.update();
      item.update();

      // reset the ignore authorisation
      context.setIgnoreAuthorization(ignoreAuth);
View Full Code Here

                // Identify the format
                BitstreamFormat bf = FormatIdentifier.guessFormat(context, logoBS);
                logoBS.setFormat(bf);
                AuthorizeManager.addPolicy(context, logoBS, Constants.WRITE, context.getCurrentUser());
                logoBS.update();

                // Remove temp file
                if (!temp.delete())
                {
                    log.trace("Unable to delete temporary file");
View Full Code Here

      Bitstream bs = item.createSingleBitstream(deposit.getInputStream());
      BitstreamFormat format = this.getFormat(context, deposit.getFilename());
      bs.setName(deposit.getFilename());
      bs.setFormat(format);
      bs.update();

      // now we have an item in the workspace, and we need to consider adding some metadata to it,
      // but since the binary file didn't contain anything, what do we do?
      item.addMetadata("dc", "title", null, null, "Untitled: " + deposit.getFilename());
      item.addMetadata("dc", "description", null, null, "Zip file deposted by SWORD without accompanying metadata");
View Full Code Here

            Bitstream bs = original.createBitstream(deposit.getInputStream());
            BitstreamFormat format = this.getFormat(context, deposit.getFilename());
            bs.setFormat(format);
      bs.setName(deposit.getFilename());
      bs.update();

      // update the item metadata to inclue the current time as
      // the updated date
      this.setUpdatedDate(item, verboseDescription);
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.