Class CompareWithAIP

  • All Implemented Interfaces:
    org.dspace.curate.CurationTask

    @Suspendable(invoked=INTERACTIVE)
    public class CompareWithAIP
    extends org.dspace.curate.AbstractCurationTask
    CompareWithAIP task compares local repository values with the replica store values. It can perform 2 types of comparison: first, an 'integrity' audit which compares the checksums of the local and remote zipped AIPs; second, a 'count' or enumerative audit that verifies that all child objects of a local container have corresponding replicas in the remote store.

    The reason it performs two checks is for performance purposes. We'd rather this task "fail quickly" by finding that a child object is missing from the remote store, than have it require stepping through each child object one-by-one and regenerate each AIP (for checksum verification) before the missing child is located.

    This task is "suspendable" when invoked from the UI. This means that if you run an Audit from the UI, this task will return an immediate failure once a single object fails the audit. However, when run from the Command-Line this task will run to completion (i.e. even if an object fails it will continue processing to completion).

    Author:
    richardrodgers
    • Field Summary

      • Fields inherited from class org.dspace.curate.AbstractCurationTask

        communityService, configurationService, curator, handleService, itemService, taskId
    • Constructor Summary

      Constructors 
      Constructor Description
      CompareWithAIP()  
    • Constructor Detail

      • CompareWithAIP

        public CompareWithAIP()
    • Method Detail

      • init

        public void init​(org.dspace.curate.Curator curator,
                         String taskId)
                  throws IOException
        Specified by:
        init in interface org.dspace.curate.CurationTask
        Overrides:
        init in class org.dspace.curate.AbstractCurationTask
        Throws:
        IOException
      • perform

        public int perform​(org.dspace.content.DSpaceObject dso)
                    throws IOException
        Perform 'Compare with AIP' task
        Specified by:
        perform in interface org.dspace.curate.CurationTask
        Specified by:
        perform in class org.dspace.curate.AbstractCurationTask
        Parameters:
        dso - DSpace Object to perform on
        Returns:
        integer which represents Curator return status
        Throws:
        IOException - if I/O error