Package org.dspace.ctask.general
Class MicrosoftTranslator
- java.lang.Object
-
- org.dspace.curate.AbstractCurationTask
-
- org.dspace.ctask.general.AbstractTranslator
-
- org.dspace.ctask.general.MicrosoftTranslator
-
- All Implemented Interfaces:
CurationTask
public class MicrosoftTranslator extends AbstractTranslator
MicrosoftTranslator translates metadata fields using Microsoft Translation API v2 Requirements: A valid Bing App ID/Key More information: http://www.bing.com/developers This key, and other custom configuration, goes in [dspace]/modules/translator.cfg- Author:
- Kim Shepherd
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbaseUrlprotected StringPLUGIN_PREFIX-
Fields inherited from class org.dspace.ctask.general.AbstractTranslator
apiKey, authLang, authLangField, langs, results, status, toTranslate
-
Fields inherited from class org.dspace.curate.AbstractCurationTask
communityService, curator, handleService, itemService, taskId
-
-
Constructor Summary
Constructors Constructor Description MicrosoftTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitApi()protected StringtranslateText(String from, String to, String text)-
Methods inherited from class org.dspace.ctask.general.AbstractTranslator
init, perform
-
Methods inherited from class org.dspace.curate.AbstractCurationTask
dereference, distribute, perform, performItem, performObject, report, setResult, taskArrayProperty, taskBooleanProperty, taskIntProperty, taskLongProperty, taskProperty
-
-
-
-
Field Detail
-
PLUGIN_PREFIX
protected final String PLUGIN_PREFIX
- See Also:
- Constant Field Values
-
baseUrl
protected final String baseUrl
- See Also:
- Constant Field Values
-
-
Method Detail
-
initApi
protected void initApi()
- Overrides:
initApiin classAbstractTranslator
-
translateText
protected String translateText(String from, String to, String text) throws IOException
- Overrides:
translateTextin classAbstractTranslator- Throws:
IOException
-
-