public abstract class AbstractTemplateParallelTextService extends AbstractLanguageService implements TemplateParallelTextService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| Constructor and Description |
|---|
AbstractTemplateParallelTextService() |
AbstractTemplateParallelTextService(Collection<Language> supportedLanguages)
Constructor.
|
AbstractTemplateParallelTextService(ServiceContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
doGenerateSentence(Language language,
String templateId,
BoundChoiceParameter[] boundChoiceParameters,
BoundValueParameter[] boundRangeParameters) |
protected abstract String[] |
doGetCategoryNames(String categoryId,
Language[] languages) |
protected abstract Template[] |
doGetTemplatesByTemplateId(Language language,
String[] templateIds) |
protected abstract Category[] |
doListTemplateCategories(Language language) |
protected abstract Template[] |
doSearchTemplates(Language language,
String text,
MatchingMethod matchingMethod,
String[] categoryIds) |
String |
generateSentence(String language,
String templateId,
BoundChoiceParameter[] boundChoiceParameters,
BoundValueParameter[] boundRangeParameters) |
String[] |
getCategoryNames(String categoryId,
String[] languages) |
Template[] |
getTemplatesByTemplateId(String language,
String[] templateIds) |
protected MatchingMethod |
getValidMatchingMethod(String parameterName,
String matchingMethod) |
Category[] |
listTemplateCategories(String language) |
Template[] |
searchTemplates(String language,
String text,
String matchingMethod,
String[] categoryIds) |
getSupportedLanguageCollection, getSupportedLanguagePairCollection, getSupportedLanguages, setSupportedLanguageCollection, setSupportedLanguagesacquireSemaphore, 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 AbstractTemplateParallelTextService()
public AbstractTemplateParallelTextService(ServiceContext context)
public AbstractTemplateParallelTextService(Collection<Language> supportedLanguages)
supportedPairs - Set of supported language pairspublic Category[] listTemplateCategories(String language) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException
listTemplateCategories in interface TemplateParallelTextServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguageExceptionpublic String[] getCategoryNames(String categoryId, String[] languages) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException
getCategoryNames in interface TemplateParallelTextServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguageExceptionpublic Template[] searchTemplates(String language, String text, String matchingMethod, String[] categoryIds) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException, UnsupportedMatchingMethodException
searchTemplates in interface TemplateParallelTextServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguageExceptionUnsupportedMatchingMethodExceptionpublic Template[] getTemplatesByTemplateId(String language, String[] templateIds) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException
getTemplatesByTemplateId in interface TemplateParallelTextServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguageExceptionpublic String generateSentence(String language, String templateId, BoundChoiceParameter[] boundChoiceParameters, BoundValueParameter[] boundRangeParameters) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException
generateSentence in interface TemplateParallelTextServiceAccessLimitExceededExceptionInvalidParameterExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguageExceptionprotected abstract Category[] doListTemplateCategories(Language language) throws InvalidParameterException, ProcessFailedException
protected abstract String[] doGetCategoryNames(String categoryId, Language[] languages) throws InvalidParameterException, ProcessFailedException
protected abstract Template[] doSearchTemplates(Language language, String text, MatchingMethod matchingMethod, String[] categoryIds) throws InvalidParameterException, ProcessFailedException
protected abstract Template[] doGetTemplatesByTemplateId(Language language, String[] templateIds) throws InvalidParameterException, ProcessFailedException
protected abstract String doGenerateSentence(Language language, String templateId, BoundChoiceParameter[] boundChoiceParameters, BoundValueParameter[] boundRangeParameters) throws InvalidParameterException, ProcessFailedException
protected MatchingMethod getValidMatchingMethod(String parameterName, String matchingMethod) throws InvalidParameterException
InvalidParameterException