Package org.dspace.content

Examples of org.dspace.content.Collection.removeItem()


            if (AuthorizeManager.authorizeActionBoolean(context, item, Constants.READ))
            {
                // make sure item doesn't belong to this collection
                if (!item.isOwningCollection(toCollection))
                {
                    toCollection.removeItem(item);
                    // FIXME Exception handling
                    try
                    {
                      IndexBrowse ib = new IndexBrowse(context);
                      ib.indexItem(item);
View Full Code Here


        while (it.hasNext()) {
          i++;
          Item item = it.next();
          System.out.println("Deleting: " + item.getHandle());
          ib.itemRemoved(item);
          collection.removeItem(item);
          // commit every 50 items
          if (i%50 == 0) {
            context.commit();
            i=0;
          }
View Full Code Here

          // Remove item from its owning collection and add to the destination
          if (!alreadyInCollection)
              destination.addItem(item);

          if (owningCollection != null)
              owningCollection.removeItem(item);

          item.setOwningCollection(destination);
          item.update();
          context.commit();
View Full Code Here

    //IndexBrowse ib = new IndexBrowse(context);
    while (it.hasNext()) {
      Item item = it.next();
      //System.out.println("Deleting: " + item.getHandle());
      //ib.itemRemoved(item);
      collection.removeItem(item);
    }
    hc.setHarvestResult(null,"");
    hc.update();
    collection.update();
    context.commit();
View Full Code Here

    //IndexBrowse ib = new IndexBrowse(context);
    while (it.hasNext()) {
      Item item = it.next();
      //System.out.println("Deleting: " + item.getHandle());
      //ib.itemRemoved(item);
      collection.removeItem(item);
    }
    hc.setHarvestResult(null,"");
    hc.update();
    collection.update();
    context.commit();
View Full Code Here

              destination.addItem(item);
          }

          if (owningCollection != null)
          {
              owningCollection.removeItem(item);
          }

          item.setOwningCollection(destination);

          // Inherit policies of destination collection if required
View Full Code Here

        while (it.hasNext()) {
          i++;
          Item item = it.next();
          System.out.println("Deleting: " + item.getHandle());
          ib.itemRemoved(item);
          collection.removeItem(item);
          // commit every 50 items
          if (i%50 == 0) {
            context.commit();
            i=0;
          }
View Full Code Here

            if (AuthorizeManager.authorizeActionBoolean(context, item, Constants.READ))
            {
                // make sure item doesn't belong to this collection
                if (!item.isOwningCollection(toCollection))
                {
                    toCollection.removeItem(item);
                    // FIXME Exception handling
                    try
                    {
                      IndexBrowse ib = new IndexBrowse(context);
                      ib.indexItem(item);
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.