@Distributive public abstract class AbstractTranslator extends AbstractCurationTask
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiKey |
protected String |
authLang |
protected String |
authLangField |
protected String[] |
langs |
protected String |
PLUGIN_PREFIX |
protected List<String> |
results |
protected int |
status |
protected String[] |
toTranslate |
communityService, curator, handleService, itemService, taskId| Constructor and Description |
|---|
AbstractTranslator() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(Curator curator,
String taskId)
Initialize task - parameters inform the task of it's invoking curator.
|
protected void |
initApi() |
int |
perform(DSpaceObject dso)
Perform the curation task upon passed DSO
|
protected String |
translateText(String from,
String to,
String text) |
dereference, distribute, perform, performItem, performObject, report, setResult, taskArrayProperty, taskBooleanProperty, taskIntProperty, taskLongProperty, taskPropertyprotected int status
protected final String PLUGIN_PREFIX
protected String authLangField
protected String authLang
protected String[] toTranslate
protected String[] langs
protected String apiKey
public void init(Curator curator, String taskId) throws IOException
CurationTaskinit in interface CurationTaskinit in class AbstractCurationTaskcurator - the Curator controlling this tasktaskId - identifier task should use in invoking servicesIOException - if errorpublic int perform(DSpaceObject dso) throws IOException
CurationTaskperform in interface CurationTaskperform in class AbstractCurationTaskdso - the DSpace objectIOException - if errorprotected void initApi()
protected String translateText(String from, String to, String text) throws IOException
IOExceptionCopyright © 2022 LYRASIS. All rights reserved.