public abstract class AbstractAdjacencyPairService extends AbstractLanguageService implements AdjacencyPairService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| Constructor and Description |
|---|
AbstractAdjacencyPairService()
Constructor that doesn't take parameter(s).
|
AbstractAdjacencyPairService(Collection<Language> supportedLanguages)
Constructor that takes the set of supported languages as a parameter.
|
AbstractAdjacencyPairService(ServiceContext serviceContext)
The Constructor.
|
AbstractAdjacencyPairService(ServiceContext serviceContext,
Collection<Language> supportedLanguages)
Constructor that takes the service context and supported language pair(s) as a parameter(s).
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Collection<AdjacencyPair> |
doSearch(String category,
Language language,
String firstTurn,
MatchingMethod matchingMethod)
Gets a list of responses corresponding to the specified utterance.
|
AdjacencyPair[] |
search(String category,
String language,
String firstTurn,
String matchingMethod)
Gets a list of responses corresponding to the specified utterance.
|
protected void |
setSupportedMatchingMethods(Set<MatchingMethod> supportedMatchingMethods)
Sets supported search methods.
|
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 AbstractAdjacencyPairService()
public AbstractAdjacencyPairService(ServiceContext serviceContext)
serviceContext - The service context.public AbstractAdjacencyPairService(Collection<Language> supportedLanguages)
supportedLanguages - Set of supported languagespublic AbstractAdjacencyPairService(ServiceContext serviceContext, Collection<Language> supportedLanguages)
serviceContext - Service contextsupportedLanguages - Set of supported languagespublic AdjacencyPair[] search(String category, String language, String firstTurn, String matchingMethod) throws AccessLimitExceededException, InvalidParameterException, NoAccessPermissionException, NoValidEndpointsException, LanguageNotUniquelyDecidedException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException, UnsupportedMatchingMethodException
AdjacencyPairServicesearch in interface AdjacencyPairServicecategory - Category. an empty string when omittedlanguage - Language of utterance (RFC3066 compliant.)firstTurn - Utterance(required)matchingMethod - Search method (MatchingMethod enumerated value)AccessLimitExceededException - Violated an access restrictionInvalidParameterException - language, firstPart or searchMethod is null or else an empty string.language does not comply with RFC3066. String not provided for by searchMethodLanguageNotUniquelyDecidedException - A supported language candidate could not be singly determined (Ex: when the language is specified as zh, the case where zh-Hans and zh-Hant exist as supported languages)UnsupportedLanguageException - The specified language is not supportedUnsupportedMatchingMethodException - The specified matching method is not supportedNoAccessPermissionException - The user executing the call lacks execution privilegesNoValidEndpointsException - There is no valid endpointProcessFailedException - Response search failed due to some causeServerBusyException - The server is loaded and cannot process it.ServiceNotActiveException - The service is not activeServiceNotFoundException - The specified service was not foundprotected void setSupportedMatchingMethods(Set<MatchingMethod> supportedMatchingMethods)
supportedMatchingMethods - Set of supported search methodsprotected abstract Collection<AdjacencyPair> doSearch(String category, Language language, String firstTurn, MatchingMethod matchingMethod) throws InvalidParameterException, ProcessFailedException
category - Categorylanguage - Language of utterance (RFC3066 compliant)firstTurn - Utterance(required)matchingMethod - Search methodInvalidParameterException - language, firstPart or matchingMethod is null or else an empty string.language does not comply with RFC3066. String not provided for by matchingMethodSearchFailedException - The response search failed due to some causeServiceConfigurationException - The service is not set up appropriatelyUnknownException - An unknown error occurredProcessFailedException