Class DSpaceObjectMetadataReplaceOperation<R extends DSpaceObject>


  • @Component
    public class DSpaceObjectMetadataReplaceOperation<R extends DSpaceObject>
    extends PatchOperation<R>
    Class for PATCH REPLACE operations on Dspace Objects' metadata Usage: (can be done on other dso than Item also): - REPLACE metadata (with schema.identifier.qualifier) value of a dso (here: Item) from existing value to new given value curl -X PATCH http://${dspace.server.url}/api/core/items/<:id-item> -H " Content-Type: application/json" -d '[{ "op": "replace", "path": " /metadata/schema.identifier.qualifier}", "value": "newMetadataValue"]'
    Author:
    Maria Verdonck (Atmire) on 18/11/2019
    • Constructor Detail

      • DSpaceObjectMetadataReplaceOperation

        public DSpaceObjectMetadataReplaceOperation()
    • Method Detail

      • supports

        public boolean supports​(Object objectToMatch,
                                Operation operation)
        Description copied from class: PatchOperation
        Determines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)
        Specified by:
        supports in class PatchOperation<R extends DSpaceObject>
        Parameters:
        objectToMatch - Object whose class must be instance of type object for which this PatchOperation was created
        operation - Operation of the patch, should match this type of Patch Operation
        Returns:
        True if this PatchOperation class can do the patch for this given dso type and Path