Package org.dspace.ctask.general
Class RequiredMetadata
- java.lang.Object
-
- org.dspace.curate.AbstractCurationTask
-
- org.dspace.ctask.general.RequiredMetadata
-
- All Implemented Interfaces:
CurationTask
@Suspendable public class RequiredMetadata extends AbstractCurationTask
RequiredMetadata task compares item metadata with fields marked as required in submission-forms.xml. The task succeeds if all required fields are present in the item metadata, otherwise it fails. Primarily a curation task demonstrator.- Author:
- richardrodgers
-
-
Field Summary
Fields Modifier and Type Field Description protected DCInputsReaderreaderprotected Map<String,List<String>>reqMap-
Fields inherited from class org.dspace.curate.AbstractCurationTask
communityService, configurationService, curator, handleService, itemService, taskId
-
-
Constructor Summary
Constructors Constructor Description RequiredMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>getReqList(String handle)voidinit(Curator curator, String taskId)Initialize task - parameters inform the task of it's invoking curator.intperform(DSpaceObject dso)Perform the curation task upon passed DSO-
Methods inherited from class org.dspace.curate.AbstractCurationTask
dereference, distribute, perform, performItem, performObject, report, setResult, taskArrayProperty, taskBooleanProperty, taskIntProperty, taskLongProperty, taskProperty
-
-
-
-
Field Detail
-
reader
protected DCInputsReader reader
-
-
Method Detail
-
init
public void init(Curator curator, String taskId) throws IOException
Description copied from interface:CurationTaskInitialize task - parameters inform the task of it's invoking curator. Since the curator can provide services to the task, this represents curation DI.- Specified by:
initin interfaceCurationTask- Overrides:
initin classAbstractCurationTask- Parameters:
curator- the Curator controlling this tasktaskId- identifier task should use in invoking services- Throws:
IOException- if error
-
perform
public int perform(DSpaceObject dso) throws IOException
Perform the curation task upon passed DSO- Specified by:
performin interfaceCurationTask- Specified by:
performin classAbstractCurationTask- Parameters:
dso- the DSpace object- Returns:
- status code
- Throws:
IOException- if IO error
-
getReqList
protected List<String> getReqList(String handle) throws DCInputsReaderException
- Throws:
DCInputsReaderException
-
-