Package org.dspace.content

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


                    item.addMetadata(md.schema, md.element, md.qualifier,
                            md.language, md.value, md.authority, md.confidence);

                }
            }
            item.update();
            context.commit();
        }
        catch (Exception e)
        {
            throw new RuntimeException(e.getMessage(), e);
View Full Code Here


                        }
                    }
                    item.addMetadata(md.schema, md.element, md.qualifier,
                            md.language, md.value, md.authority, md.confidence);
                }
                item.update();
            }
            context.commit();
        }
        catch (Exception e)
        {
View Full Code Here

                                val.confidence);
                    }
                }
                if (found)
                {
                    item.update();
                    count++;
                }
            }
        }
        context.restoreAuthSystemState();
View Full Code Here

                    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

                        // remove bundle if it's now empty
                        if (bitstreams.length < 1)
                        {
                            item.removeBundle(bnd[0]);
                            item.update();
                        }

                        subInfo.setBitstream(null);
                    }
                }// if subInfo not null
View Full Code Here

            }
          }
          if (!isTest)
          {
            Item item = itarch.getItem();
            item.update()//need to update before commit
            context.commit()
            item.decache();
          }
          ItemUpdate.pr("Item " + dirname + " completed");
          successItemCount++;
View Full Code Here

                MetadataSchema schema = MetadataSchema.find(context,field.getSchemaID());
                item.addMetadata(schema.getName(),field.getElement(), field.getQualifier(), lang, value);
            }
        }

        item.update();

        // Now work out what next page is
        showNextPage(context, request, response, collection, DEFAULT_ITEM);

        context.complete();
View Full Code Here

          bitstream.setFormat(bf);
        }

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

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

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

                // set it if it's not already set
                if (myItem.getOwningCollection() == null)
                {
                    myItem.setOwningCollection(collections[q]);
                    myItem.update();
                    System.out.println("Set owner of item " + myItem.getID()
                            + " to collection " + collections[q].getID());
                }
            }
        }
View Full Code Here

        String provDescription = "Rejected by " + usersName + ", reason: "
                + rejection_message + " on " + now + " (GMT) ";

        // Add to item as a DC field
        myitem.addDC("description", "provenance", "en", provDescription);
        myitem.update();

        // convert into personal workspace
        WorkspaceItem wsi = returnToWorkspace(c, wi);

        // notify that it's been rejected
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.