Package org.dspace.content

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


                    // Identify the format
                    bf = FormatIdentifier.guessFormat(context, b);
                    b.setFormat(bf);
       
                    // Update to DB
                    b.update();
                    item.update();
       
                    if (bf == null || !bf.isInternal())
                    {
                        fileOK = true;
View Full Code Here


        if (bf == null)
            bf = FormatIdentifier.guessFormat(context, lbs);
        lbs.setFormat(bf);
        lbs.setName(Constants.LICENSE_BITSTREAM_NAME);
        lbs.setSource(Constants.LICENSE_BITSTREAM_NAME);
        lbs.update();
    }

    /**
     * Find bitstream by its Name, looking in all bundles.
     *
 
View Full Code Here

            {
                targetBundle.setPrimaryBitstreamID(bs.getID());
                targetBundle.update();
            }

            bs.update();
        }
    }

    /**
     * Register the bitstream file into DSpace
View Full Code Here

          // Identify the format
          // FIXME - guessing format guesses license.txt incorrectly as a text file format!
          BitstreamFormat bf = FormatIdentifier.guessFormat(c, bs);
          bs.setFormat(bf);
 
          bs.update();
        }
    }

    /**
     *
 
View Full Code Here

                if (descriptionExists)
                {
                    System.out.println("\tSetting description for "
                            + bitstreamName);
                    bs.setDescription(thisDescription);
                    bs.update();
                }
            }
        }
    }
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
            temp.delete();
        }
View Full Code Here

        if (bf != null)
        {
          bitstream.setFormat(bf);
        }

        bitstream.update();
        swordBundle.update();
        item.update();

        swordService.message("Original package stored as " + fn + ", in item bundle " + swordBundle);
View Full Code Here

                    bitstream.setFormat(bf);
            }
            else
                log.debug("Skipping element: "+me.toString());
        }
        bitstream.update();
    }

    /*----------- Dissemination functions -------------------*/

    public Namespace[] getNamespaces()
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.