org.dspace.ctask.general
Class AbstractTranslator

java.lang.Object
  extended by org.dspace.curate.AbstractCurationTask
      extended by org.dspace.ctask.general.AbstractTranslator
All Implemented Interfaces:
CurationTask
Direct Known Subclasses:
MicrosoftTranslator

@Distributive
public abstract class AbstractTranslator
extends AbstractCurationTask

MicrosoftTranslator translates stuff

Author:
Kim Shepherd

Field Summary
 
Fields inherited from class org.dspace.curate.AbstractCurationTask
curator, taskId
 
Constructor Summary
AbstractTranslator()
           
 
Method Summary
 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)
           
 
Methods inherited from class org.dspace.curate.AbstractCurationTask
dereference, distribute, perform, performItem, report, setResult, taskBooleanProperty, taskIntProperty, taskLongProperty, taskProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTranslator

public AbstractTranslator()
Method Detail

init

public void init(Curator curator,
                 String taskId)
          throws IOException
Description copied from interface: CurationTask
Initialize 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:
init in interface CurationTask
Overrides:
init in class AbstractCurationTask
Parameters:
curator - the Curator controlling this task
taskId - identifier task should use in invoking services
Throws:
IOException

perform

public int perform(DSpaceObject dso)
            throws IOException
Description copied from interface: CurationTask
Perform the curation task upon passed DSO

Specified by:
perform in interface CurationTask
Specified by:
perform in class AbstractCurationTask
Parameters:
dso - the DSpace object
Returns:
status code
Throws:
IOException

initApi

protected void initApi()

translateText

protected String translateText(String from,
                               String to,
                               String text)
                        throws IOException
Throws:
IOException


Copyright © 2011 DuraSpace. All Rights Reserved.