Package org.dspace.ctask.general
Class ProfileFormats
- java.lang.Object
-
- org.dspace.curate.AbstractCurationTask
-
- org.dspace.ctask.general.ProfileFormats
-
- All Implemented Interfaces:
CurationTask
@Distributive public class ProfileFormats extends AbstractCurationTask
ProfileFormats is a task that creates a distribution table of Bitstream formats for it's passed object. Primarily a curation task demonstrator.- Author:
- richardrodgers
-
-
Field Summary
Fields Modifier and Type Field Description protected BitstreamFormatServicebitstreamFormatServiceprotected Map<String,Integer>fmtTable-
Fields inherited from class org.dspace.curate.AbstractCurationTask
communityService, configurationService, curator, handleService, itemService, taskId
-
-
Constructor Summary
Constructors Constructor Description ProfileFormats()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intperform(DSpaceObject dso)Perform the curation task upon passed DSOprotected voidperformItem(Item item)Performs task upon a single DSpace Item.-
Methods inherited from class org.dspace.curate.AbstractCurationTask
dereference, distribute, init, perform, performObject, report, setResult, taskArrayProperty, taskBooleanProperty, taskIntProperty, taskLongProperty, taskProperty
-
-
-
-
Field Detail
-
bitstreamFormatService
protected BitstreamFormatService bitstreamFormatService
-
-
Method Detail
-
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
-
performItem
protected void performItem(Item item) throws SQLException, IOException
Description copied from class:AbstractCurationTaskPerforms task upon a single DSpace Item. Used in conjunction with thedistributemethod to run a single task across multiple Items.You should override this method if you want to use
distributeto run your task across multiple DSpace Items.Either this method or
performObjectshould be overridden ifdistributemethod is used.- Overrides:
performItemin classAbstractCurationTask- Parameters:
item- the DSpace Item- Throws:
SQLException- if database errorIOException- if IO error
-
-