Package ca.phon.syllabifier
Class SyllabifierLibrary
java.lang.Object
ca.phon.syllabifier.SyllabifierLibrary
- All Implemented Interfaces:
IExtendable
Class to help with loading syllabifiers.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet a set of available syllabifier LanguagesGet a list of available syllabifier names.Return an Iterator for the available syllabifiers.Default syllabifier language<T> T
getExtension
(Class<T> cap) Get the requested extension if available.Return all extension types supportedstatic SyllabifierLibrary
Get syllabifier loadergetSyllabifierByName
(String name) Get a syllabifier by name.Get the first available syllabifier for the given language.Return all available syllabifiers for the given language.<T> T
putExtension
(Class<T> cap, T impl) Add a new extension.void
Reload syllabifier definitions.<T> T
removeExtension
(Class<T> cap) Remove a capability.
-
Field Details
-
DEFAULT_SYLLABIFIER_LANG_PROP
-
-
Method Details
-
getInstance
-
getLoader
Get syllabifier loader- Returns:
ResourceLoader<Syllabifier>
-
reloadDefinitions
public void reloadDefinitions()Reload syllabifier definitions. -
availableSyllabifiers
Return an Iterator for the available syllabifiers.- Returns:
- iterator for the available syllabifiers
-
availableSyllabifierNames
Get a list of available syllabifier names.- Returns:
- list of names
-
availableSyllabifierLanguages
Get a set of available syllabifier Languages- Returns:
- set of language
-
getSyllabifierForLanguage
Get the first available syllabifier for the given language.- Parameters:
lang
- - should be one of the ISO 3-letter language codes- Returns:
- the syllabifier if available,
null
otherwise
-
getSyllabifierForLanguage
-
getSyllabifiersForLanguage
Return all available syllabifiers for the given language.- Parameters:
ang
- - should be one of the ISO 3-letter language codes- Returns:
- the list of syllabifiers for the given language.
-
getSyllabifiersForLanguage
-
getSyllabifierByName
Get a syllabifier by name.- Parameters:
name
-- Returns:
- the named syllabifier or
null
-
defaultSyllabifierLanguage
Default syllabifier language- Returns:
- default syllabifier language
-
defaultSyllabifier
-
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
-