public abstract class AbstractMultihopTranslationService extends AbstractService implements MultihopTranslationService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| Constructor and Description |
|---|
AbstractMultihopTranslationService()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract MultihopTranslationResult |
doMultihopTranslation(LanguagePath languagePath,
String source)
Template method supporting multihopTranstlate.
|
MultihopTranslationResult |
multihopTranslate(String sourceLang,
String[] intermediateLangs,
String targetLang,
String source)
Run a multi-hop translation.
|
protected void |
setSupportedLanguagePaths(Collection<LanguagePath> paths)
Sets the supported language path group.
|
acquireSemaphore, checkStartupException, convertLanguagePairs, convertLanguages, doGetLastUpdate, getCurrentServiceContext, getDoDoubleSearch, getEliminateDuplicates, getInitParameter, getInitParameterBoolean, getInitParameterInt, getInitParameterLong, getInitParameters, getInitParameterString, getInitParameterUsingTransformer, getLastUpdate, getLogListener, getMaxResults, getMaxWaitMillisForExternalProcess, getRequestMimeHeaders, getServiceContext, getWorkDirectory, getWorkFile, log, parseDateMacro, processEnd, processEnd, processLap, processStart, releaseSemaphore, setCurrentServiceContext, setDoubleSearchResults, setEliminateDuplicates, setLogListener, setMaxResults, setMaxThreads, setMaxWaitMillisForExternalProcess, setMaxWaitMillisForThread, setMeasureProcessTime, setProcessTimeWarningThreasholdMillis, setStartupExceptiongetComponentServiceFactory, getFile, getServiceName, setComponentServiceFactory, setServiceNamepublic AbstractMultihopTranslationService()
public MultihopTranslationResult multihopTranslate(String sourceLang, String[] intermediateLangs, String targetLang, String source) throws AccessLimitExceededException, InvalidParameterException, LanguagePathNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePathException
MultihopTranslationServicemultihopTranslate in interface MultihopTranslationServicesourceLang - Translation source language (RFC3066 compliant)intermediateLangs - Intermediate languages (RFC3066 compliant)targetLang - Target language of the translation (RFC3066 compliant)source - String to be translatedAccessLimitExceededException - Violated an access restrictionInvalidParameterException - An invalid parameter was passedLanguagePathNotUniquelyDecidedException - Multiple language path candidates were foundUnsupportedLanguagePathException - An unsupported language path was specifiedNoAccessPermissionException - The user executing the call lacks execution privilegesNoValidEndpointsException - There is no valid endpointProcessFailedException - Translation process failedServerBusyException - The server is loaded and cannot process it.ServiceNotActiveException - Service not activeServiceNotFoundException - The specified service was not foundprotected abstract MultihopTranslationResult doMultihopTranslation(LanguagePath languagePath, String source) throws InvalidParameterException, ProcessFailedException
languagePath - Translation language pathsource - String to be translatedInvalidParameterException - An invalid parameter was passedProcessFailedException - Process failedprotected void setSupportedLanguagePaths(Collection<LanguagePath> paths)
paths - Language paths group