Package org.dspace.ctask.general
Class AbstractTranslator
java.lang.Object
org.dspace.curate.AbstractCurationTask
org.dspace.ctask.general.AbstractTranslator
- All Implemented Interfaces:
CurationTask
- Direct Known Subclasses:
MicrosoftTranslator
MicrosoftTranslator translates stuff
- Author:
- Kim Shepherd
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected String[]protected final Stringprotected intprotected String[]Fields inherited from class org.dspace.curate.AbstractCurationTask
communityService, curator, handleService, itemService, taskId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInitialize task - parameters inform the task of it's invoking curator.protected voidinitApi()intperform(DSpaceObject dso) Perform the curation task upon passed DSOprotected StringtranslateText(String from, String to, String text) Methods inherited from class org.dspace.curate.AbstractCurationTask
dereference, distribute, perform, performItem, performObject, report, setResult, taskArrayProperty, taskBooleanProperty, taskIntProperty, taskLongProperty, taskProperty
-
Field Details
-
status
protected int status -
PLUGIN_PREFIX
- See Also:
-
authLangField
-
authLang
-
toTranslate
-
langs
-
apiKey
-
results
-
-
Constructor Details
-
AbstractTranslator
public AbstractTranslator()
-
-
Method Details
-
init
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
Description copied from interface:CurationTaskPerform 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 error
-
initApi
protected void initApi() -
translateText
- Throws:
IOException
-