Package ca.phon.ipadictionary
Class IPADictionaryLibrary
java.lang.Object
ca.phon.ipadictionary.IPADictionaryLibrary
- All Implemented Interfaces:
IExtendable
Manages the library of available IPA dictionaries.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionProvides an iterator of all available dictionaries.Get a list of all distinct LanguageInfos available.Get default IPA dictionary, if no preference is set this will return the first dictionary found.Get all dictionaries for the specified primary languageGet all dictionaries for the specified primary languageGet default IPA dictionary language<T> T
getExtension
(Class<T> cap) Get the requested extension if available.Return all extension types supportedstatic IPADictionaryLibrary
Get the shared library instance.Get the loader used with the library.<T> T
putExtension
(Class<T> cap, T impl) Add a new extension.<T> T
removeExtension
(Class<T> cap) Remove a capability.
-
Field Details
-
DEFAULT_IPA_DICTIONARY_PROP
-
-
Method Details
-
getInstance
Get the shared library instance.- Returns:
- the shared static instance
-
availableDictionaries
Provides an iterator of all available dictionaries. Dictionaries are in on particular sort order.- Returns:
- iterator of availble dictionaries
-
availableLanguages
Get a list of all distinct LanguageInfos available.- Returns:
- list of availble languages
-
getDefaultLanguage
Get default IPA dictionary language- Returns:
- default language
-
defaultDictionary
Get default IPA dictionary, if no preference is set this will return the first dictionary found.- Returns:
- default IPA dictionary
-
dictionariesForLanguage
Get all dictionaries for the specified primary language- Parameters:
lang
-- Returns:
- list of dictionaries for given lang
-
dictionariesForLanguage
Get all dictionaries for the specified primary language- Parameters:
lang
-- Returns:
- list of dictionaries for given lang
-
getLoader
Get the loader used with the library.- Returns:
- the resource loader
-
getExtensions
Description copied from interface:IExtendable
Return all extension types supported- Specified by:
getExtensions
in interfaceIExtendable
-
getExtension
Description copied from interface:IExtendable
Get the requested extension if available.- Specified by:
getExtension
in interfaceIExtendable
- Returns:
- the capability object or
null
if the cability is not available
-
putExtension
Description copied from interface:IExtendable
Add a new extension.- Specified by:
putExtension
in interfaceIExtendable
- Parameters:
cap
- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendable
Remove a capability.- Specified by:
removeExtension
in interfaceIExtendable
- Parameters:
cap
- the capability to remove
-