public abstract class AbstractPictogramDictionaryService extends AbstractLanguageService implements PictogramDictionaryService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS
Constructor and Description |
---|
AbstractPictogramDictionaryService()
Constructor that doesn't take parameter(s).
|
AbstractPictogramDictionaryService(Collection<Language> supportedLanguages)
Constructor that takes the set of supported languages as a parameter.
|
AbstractPictogramDictionaryService(ServiceContext context,
Collection<Language> supportedLanguages)
Constructor that takes the service context and set of supported languages as a parameter(s).
|
Modifier and Type | Method and Description |
---|---|
protected abstract Collection<Pictogram> |
doSearch(Language language,
String word,
MatchingMethod matchingMethod)
Returns the corresponding to the term.
|
String[] |
getSupportedMatchingMethods() |
Pictogram[] |
search(String language,
String word,
String matchingMethod) |
protected void |
setSupportedMatchingMethods(Set<MatchingMethod> supportedMatchingMethods) |
getSupportedLanguageCollection, getSupportedLanguagePairCollection, getSupportedLanguages, setSupportedLanguageCollection, setSupportedLanguages
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, setStartupException
getComponentServiceFactory, getFile, getServiceName, setComponentServiceFactory, setServiceName
public AbstractPictogramDictionaryService()
public AbstractPictogramDictionaryService(Collection<Language> supportedLanguages)
supportedLanguages
- Set of supported languagespublic AbstractPictogramDictionaryService(ServiceContext context, Collection<Language> supportedLanguages)
context
- Service contextsupportedLanguages
- Set of supported languagespublic Pictogram[] search(String language, String word, String matchingMethod) throws AccessLimitExceededException, InvalidParameterException, LanguageNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguageException, UnsupportedMatchingMethodException
search
in interface PictogramDictionaryService
language
- Language of wordword
- A word that searches pictogramsmatchingMethod
- Matching method (MatchingMethod enumerated value)AccessLimitExceededException
- Violated an access restrictionInvalidParameterException
- Either text or language is null or else an empty string.language does not comply with RFC3066LanguageNotUniquelyDecidedException
- 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
- Paraphrasing process failedServerBusyException
- The server is loaded and cannot process it.ServiceNotActiveException
- The service is not activeServiceNotFoundException
- The specified service was not foundprotected abstract Collection<Pictogram> doSearch(Language language, String word, MatchingMethod matchingMethod) throws InvalidParameterException, ProcessFailedException
language
- Languageword
- WordmatchingMethod
- Matching methodInvalidParameterException
- An invalid parameter was passedProcessFailedException
- Process failedpublic String[] getSupportedMatchingMethods() throws AccessLimitExceededException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
protected void setSupportedMatchingMethods(Set<MatchingMethod> supportedMatchingMethods)