Package org.dspace.ctask.replicate
Class CompareWithAIP
- java.lang.Object
-
- org.dspace.curate.AbstractCurationTask
-
- org.dspace.ctask.replicate.CompareWithAIP
-
- All Implemented Interfaces:
org.dspace.curate.CurationTask
@Suspendable(invoked=INTERACTIVE) public class CompareWithAIP extends org.dspace.curate.AbstractCurationTaskCompareWithAIP 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
-
-
Constructor Summary
Constructors Constructor Description CompareWithAIP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(org.dspace.curate.Curator curator, String taskId)intperform(org.dspace.content.DSpaceObject dso)Perform 'Compare with AIP' task
-
-
-
Method Detail
-
init
public void init(org.dspace.curate.Curator curator, String taskId) throws IOException- Specified by:
initin interfaceorg.dspace.curate.CurationTask- Overrides:
initin classorg.dspace.curate.AbstractCurationTask- Throws:
IOException
-
perform
public int perform(org.dspace.content.DSpaceObject dso) throws IOExceptionPerform 'Compare with AIP' task- Specified by:
performin interfaceorg.dspace.curate.CurationTask- Specified by:
performin classorg.dspace.curate.AbstractCurationTask- Parameters:
dso- DSpace Object to perform on- Returns:
- integer which represents Curator return status
- Throws:
IOException- if I/O error
-
-