public class BilingualDictionaryWithLongestMatchSearch extends Object implements BilingualDictionaryWithLongestMatchSearchService
| Constructor and Description |
|---|
BilingualDictionaryWithLongestMatchSearch() |
| Modifier and Type | Method and Description |
|---|---|
Calendar |
getLastUpdate()
Returns the last date of change to the dictionary data.
|
LanguagePair[] |
getSupportedLanguagePairs()
Gets the dictionary's supported language.
|
String[] |
getSupportedMatchingMethods()
Returns the search methods supported by the dictionary wrapper.
|
Translation[] |
search(String headLang,
String targetLang,
String headword,
String matchingMethod)
Searches the bilingual dictionary using the specified search term(s) and matching method, and returns bilingual translation.
|
TranslationWithPosition[] |
searchLongestMatchingTerms(String headLang,
String targetLang,
Morpheme[] morphemes)
Runs a search based on an array of morphemes.
|
void |
setConnectionParameters(ConnectionParameters p) |
void |
setDateColumnName(String dateColumnName) |
void |
setLanguageColumnNames(String languageColumnNames) |
void |
setTableName(String tableName) |
public BilingualDictionaryWithLongestMatchSearch()
public void setConnectionParameters(ConnectionParameters p)
public void setTableName(String tableName)
public void setLanguageColumnNames(String languageColumnNames)
public void setDateColumnName(String dateColumnName)
public Translation[] search(String headLang, String targetLang, String headword, String matchingMethod) throws InvalidParameterException, ProcessFailedException
BilingualDictionaryServicesearch in interface BilingualDictionaryServiceheadLang - Source language of bilingual translation(RFC3066 compliant)targetLang - Target language of bilingual translation (RFC3066 compliant)headword - Bilingual translation search phrasematchingMethod - Matching method (one of either "COMPLETE","PREFIX","SUFFIX","PARTIAL","REGEX")InvalidParameterException - One of either headLang,targetLang,searchMethod is null or else is an empty string. headLang or targetLang do not comply with RFC3066.String not provided for by searchMethodLanguagePairNotUniquelyDecidedException - The bilingual translation language pair candidates could not be singly resolved(Ex:When headLang, or else targetLang is specified as zh, the case where zh-Hans and zh-Hant both exist as supported language pairs)UnsupportedLanguagePairException - The specified language pair is not supported.UnsupportedMatchingMethodException - The specified matching method is not supportedProcessFailedException - Search process failedpublic TranslationWithPosition[] searchLongestMatchingTerms(String headLang, String targetLang, Morpheme[] morphemes) throws InvalidParameterException, ProcessFailedException
BilingualDictionaryWithLongestMatchSearchServicesearchLongestMatchingTerms in interface BilingualDictionaryWithLongestMatchSearchServiceheadLang - Source language of bilingual translation(RFC3066 compliant)targetLang - Target language of bilingual translation (RFC3066 compliant)morphemes - Array of morphemesInvalidParameterException - One of either headLang,targetLang,searchMethod is null or else is an empty string. headLang or targetLang do not comply with RFC3066.String not provided for by searchMethodLanguagePairNotUniquelyDecidedException - The bilingual translation language pair candidates could not be singly resolved(Ex:When headLang, or else targetLang is specified as zh, the case where zh-Hans and zh-Hant both exist as supported language pairs)UnsupportedLanguagePairException - The specified language pair is not supported.UnsupportedMatchingMethodException - The specified matching method is not supportedProcessFailedException - Search process failedpublic Calendar getLastUpdate() throws ProcessFailedException
BilingualDictionaryServicegetLastUpdate in interface BilingualDictionaryServiceProcessFailedException - Search process failedpublic LanguagePair[] getSupportedLanguagePairs() throws AccessLimitExceededException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
BilingualDictionaryServicegetSupportedLanguagePairs in interface BilingualDictionaryServiceAccessLimitExceededException - Violated an access restrictionNoAccessPermissionException - The user executing the call lacks execution privilegesNoValidEndpointsException - There is no valid endpointProcessFailedException - Search process failedServerBusyException - The server is loaded and cannot process it.ServiceNotActiveException - The service is not activeServiceNotFoundException - The specified service was not foundpublic String[] getSupportedMatchingMethods() throws AccessLimitExceededException, NoAccessPermissionException, NoValidEndpointsException, ProcessFailedException, ServerBusyException, ServiceNotActiveException, ServiceNotFoundException
BilingualDictionaryServicegetSupportedMatchingMethods in interface BilingualDictionaryServiceAccessLimitExceededException - Violated an access restrictionNoAccessPermissionException - The user executing the call lacks execution privilegesNoValidEndpointsException - There is no valid endpointProcessFailedException - Search process failedServerBusyException - The server is loaded and cannot process it.ServiceNotActiveException - The service is not activeServiceNotFoundException - The specified service was not found