Skip to content

Add dedicated patch and delete item functions #41

@mdwRepository

Description

@mdwRepository

The DSpaceClient class lacks a full patch_item method to facilitate partial updates for Item objects via the REST API. To address this, we propose implementing a patch_item function that supports add, remove, and replace operations, excluding move.

Supported operations:

  • add: Adds new metadata or fields to the object.
  • remove: Removes specified metadata or fields.
  • replace: Replaces the value of existing metadata or fields.

Validation:

  • Ensures the provided object is a valid Item.
  • Verifies that the operation is one of the supported types.
  • Requires a value for add and replace operations.

The DSpaceClient class also lacks a delete_item method for deleting Item objects via the REST API. To address this, we propose implementing a delete_item function that uses the existing api_delete functionality to perform deletions efficiently and reliably.

Validation:

  • Ensures the provided object is a valid Item.
  • Confirms the existence of a valid self link in the Item object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions