public abstract class AbstractBilingualDictionaryWithLongestMatchSearchService extends AbstractLanguagePairService implements BilingualDictionaryWithLongestMatchSearchService
ALL_MATCHINGMETHODS, EMPTY_LANGUAGEPAIRS, EMPTY_LANGUAGEPATHS, EMPTY_LANGUAGES, MINIMUM_MATCHINGMETHODS| コンストラクタと説明 |
|---|
AbstractBilingualDictionaryWithLongestMatchSearchService()
Constructor.
|
AbstractBilingualDictionaryWithLongestMatchSearchService(Collection<LanguagePair> supportedPairs)
Constructor.
|
AbstractBilingualDictionaryWithLongestMatchSearchService(ServiceContext serviceContext) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static void |
clearCache() |
protected Calendar |
doGetLastUpdate() |
protected abstract Collection<Translation> |
doSearch(Language headLang,
Language targetLang,
String headWord,
MatchingMethod matchingMethod)
Searches the bilingual dictionary using the specified search term(s) and matching method, and returns bilingual translation.
|
protected Collection<TranslationWithPosition> |
doSearchLongestMatchingTerms(Language headLang,
Language targetLang,
Morpheme[] morphemes) |
String[] |
getSupportedMatchingMethods() |
protected boolean |
isCacheSearchResult() |
protected Collection<TranslationWithPosition> |
scan(Language headLang,
Language targetLang,
Morpheme[] morphemes)
Runs a scan.
|
Translation[] |
search(String headLang,
String targetLang,
String headWord,
String matchingMethod) |
TranslationWithPosition[] |
searchLongestMatchingTerms(String headLang,
String targetLang,
Morpheme[] morphemes) |
void |
setCacheSearchResult(boolean cacheSearchResult) |
void |
setCacheTtlSec(int cacheTtlSec) |
protected void |
setSupportedMatchingMethods(Set<MatchingMethod> supportedMatchingMethods)
Sets supported search methods.
|
getSupportedLanguagePairCollection, getSupportedLanguagePairs, setSupportedLanguagePairsacquireSemaphore, checkStartupException, convertLanguagePairs, convertLanguages, 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, setServiceNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLastUpdate, getSupportedLanguagePairspublic AbstractBilingualDictionaryWithLongestMatchSearchService()
public AbstractBilingualDictionaryWithLongestMatchSearchService(ServiceContext serviceContext)
public AbstractBilingualDictionaryWithLongestMatchSearchService(Collection<LanguagePair> supportedPairs)
supportedPairs - Set of supported language pairspublic void setCacheSearchResult(boolean cacheSearchResult)
public void setCacheTtlSec(int cacheTtlSec)
public Translation[] search(String headLang, String targetLang, String headWord, String matchingMethod) throws AccessLimitExceededException, InvalidParameterException, LanguagePairNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePairException, UnsupportedMatchingMethodException
search インタフェース内 BilingualDictionaryServiceAccessLimitExceededExceptionInvalidParameterExceptionLanguagePairNotUniquelyDecidedExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguagePairExceptionUnsupportedMatchingMethodExceptionpublic TranslationWithPosition[] searchLongestMatchingTerms(String headLang, String targetLang, Morpheme[] morphemes) throws AccessLimitExceededException, InvalidParameterException, LanguagePairNotUniquelyDecidedException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException, UnsupportedLanguagePairException, UnsupportedMatchingMethodException
searchLongestMatchingTerms インタフェース内 BilingualDictionaryWithLongestMatchSearchServiceAccessLimitExceededExceptionInvalidParameterExceptionLanguagePairNotUniquelyDecidedExceptionNoAccessPermissionExceptionNoValidEndpointsExceptionProcessFailedExceptionServerBusyExceptionServiceNotActiveExceptionServiceNotFoundExceptionUnsupportedLanguagePairExceptionUnsupportedMatchingMethodExceptionpublic String[] getSupportedMatchingMethods() throws AccessLimitExceededException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
public static void clearCache()
protected void setSupportedMatchingMethods(Set<MatchingMethod> supportedMatchingMethods)
supportedMatchingMethods - Set of supported search methodsprotected abstract Collection<Translation> doSearch(Language headLang, Language targetLang, String headWord, MatchingMethod matchingMethod) throws InvalidParameterException, ProcessFailedException
headLang - Source language of bilingual translation(RFC3066 compliant)targetLang - Target language of bilingual translation (RFC3066 compliant)headWord - Bilingual translation search languagematchingMethod - Search methodInvalidParameterException - One of either headLang,targetLang,matchingMethod is null or else is an empty string. headLang or targetLang do not comply with RFC3066.String not provided for by matchingMethodProcessFailedException - Bilingual translation search failed due to some causeprotected Collection<TranslationWithPosition> doSearchLongestMatchingTerms(Language headLang, Language targetLang, Morpheme[] morphemes) throws InvalidParameterException, ProcessFailedException
protected Calendar doGetLastUpdate() throws ProcessFailedException
doGetLastUpdate クラス内 AbstractServiceProcessFailedExceptionprotected Collection<TranslationWithPosition> scan(Language headLang, Language targetLang, Morpheme[] morphemes) throws InvalidParameterException, ProcessFailedException
languages - Bilingual translation languagesmorphemes - Array of morphemesInvalidParameterException - One of either headLang,targetLang,matchingMethod is null or else is an empty string. headLang or targetLang do not comply with RFC3066.String not provided for by matchingMethodProcessFailedException - Bilingual translation search failed due to some causeprotected boolean isCacheSearchResult()
Copyright © 2021. All rights reserved.