Package org.dspace.content

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


                    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 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

                            + InstallItem.getBitstreamProvenanceMessage(item);
            MetadataUtilities.appendMetadata(item, dtom, false, append);
          }
         
          //update after all changes are applied, even metadata ones
          bs.update();
       
          if (!suppressUndo)
          {
            itarch.addUndoDeleteContents(bs.getID());
          }
View Full Code Here

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

      // Update to DB
      bitstream.update();
      item.update();
     
      context.commit();
     
      result.setContinue(true);
View Full Code Here

      }
    }
   
    //Step 3:
    // Save our changes
    bitstream.update();
    context.commit();
   
     result.setContinue(true);
       result.setOutcome(true);
       result.setMessage(T_bitstream_updated);
View Full Code Here

      Bitstream OREBitstream = OREBundle.createBitstream(OREStream);
      OREBitstream.setName("ORE.xml");

      BitstreamFormat bf = FormatIdentifier.guessFormat(ourContext, OREBitstream);
      OREBitstream.setFormat(bf);
      OREBitstream.update();

      OREBundle.addBitstream(OREBitstream);
      OREBundle.update();
    }
View Full Code Here

                        throw new DAVStatusException(DAV.SC_CONFLICT,
                                "Unacceptable value for logo property.");
                    }
                    Bitstream nbs = this.collection.setLogo(bis);
                    nbs.setFormat(bsf);
                    nbs.update();
                }
                else
                {
                    throw new DAVStatusException(DAV.SC_CONFLICT,
                            "No <bitstream> element value found for logo property.");
View Full Code Here

        newBitstream.setDescription(bitstream.getDescription());
        newBitstream.setFormat(bitstream.getFormat());
        newBitstream.setSource(bitstream.getSource());
        newBitstream.setUserFormatDescription(bitstream
                .getUserFormatDescription());
        newBitstream.update();

        bundle.removeBitstream(bitstream);

        bundle.update();
View Full Code Here

        bs.setName((mimeType != null &&
                    (mimeType.equalsIgnoreCase("text/xml") ||
                     mimeType.equalsIgnoreCase("text/rdf"))) ?
                   BSN_LICENSE_RDF : BSN_LICENSE_TEXT);
        bs.setFormat(bs_format);
        bs.update();
    }

   
    public static void removeLicense(Context context, Item item)
            throws SQLException, IOException, AuthorizeException
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.