TNS Internal:NDR/API/2.0/implementationDetails/undeleteCollection

From NSDLWiki

Jump to: navigation, search

Return to NDR/API 2.0 Requests By Object



Under Construction
Proposed method for inclusion in NDR/API 2.0.

NDR API Implementation Details - undeleteCollection

Undelete a collection including all objects created by addCollection, metadata providers, metadata and information stored as a part of this collection.


Input Discussions

  • first parameter (required) is handle to collection aggregator

Output Discussions


  • specific syntax for indicating success is unknown


  • specific syntax for error conditions is unknown
  • list of possible error conditions is unknown

Processing Discussions

A little twist is that it may be difficult to determine if an object was deleted prior to the deleteCollection call.


  • deleteMetadataRecord(mr1) - marks mr1 deleted
  • deleteCollection(c1) - marks c1, mr2, mr3, and a bunch of other objects as deleted
  • undeleteCollection(c1) will mark as active all objects marked as deleted by deleteCollection AND also marks mr1 as active

One solution would be to check the datetimestamp. Delete the CollectionAggregator (or the Collection Metadata object) first and then only undelete objects that were deleted after that time.

Even still I think I would put a warning on the undeleteCollection specification that objects deleted prior to the deleteCollection call may also be undeleted. Seems a small price to pay for the power of the undeleteCollection method especially since there is a viable solution that should make this rare. The alternative is to go into Fedora and undelete each object manually. You'd still have to decide on an object by object basis whether it was deleted prior to or as part of the deleteCollection call. Manually undeleting would be very prone to error.

John indicated via email... "I think this is fine. I would not bother with datestamps. Doing an undelete on an entire collection I think it is reasonable to expect everything to be undeleted regardless of how it got deleted in the first place."

General Discussions


Developer: TBA

Basic description of the process...

  • TBA


API Links:

Additional Links Related to This Call:

Personal tools