Package ca.phon.ipadictionary.impl
Class DatabaseDictionary
java.lang.Object
ca.phon.ipadictionary.impl.DatabaseDictionary
- All Implemented Interfaces:
AddEntry
,ClearEntries
,IPADictionarySPI
,LanguageInfo
,NameInfo
,RemoveEntry
public class DatabaseDictionary
extends Object
implements IPADictionarySPI, LanguageInfo, NameInfo, AddEntry, RemoveEntry, ClearEntries
User-defined IPA dictionary where all entries are
stored in the derby IPA database.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new entry to the ipa dictionaryvoid
clear()
Returns the language handled by this dictionary.getName()
Returns a string identifier for this dictionary.void
install
(IPADictionary dict) Install this SPI into the given IPADictionaryString[]
Lookup IPA transcriptions for a given orthographic string.void
removeEntry
(String ortho, String ipa) Remove the specified entry from the dictionary.
-
Constructor Details
-
DatabaseDictionary
Constructor
-
-
Method Details
-
getName
Description copied from interface:NameInfo
Returns a string identifier for this dictionary. While not required, the name should be unique to help users identify dictionaries which handle the same language. -
removeEntry
Description copied from interface:RemoveEntry
Remove the specified entry from the dictionary. Does nothing if the entry was not found.- Specified by:
removeEntry
in interfaceRemoveEntry
- Throws:
IPADictionaryExecption
- if the key->value was not removed from the database. This will usually occur if there was a problem with dictionary storage.
-
addEntry
Description copied from interface:AddEntry
Add a new entry to the ipa dictionary- Specified by:
addEntry
in interfaceAddEntry
- Throws:
IPADictionaryExecption
- if the entry was not added to the dictionary. E.g., the key->value pair already exists or the dictionary was not able to add the entry to it's storage.
-
getLanguage
Description copied from interface:LanguageInfo
Returns the language handled by this dictionary.- Specified by:
getLanguage
in interfaceLanguageInfo
- Returns:
- the
Language
for this dictionary
-
lookup
Description copied from interface:IPADictionarySPI
Lookup IPA transcriptions for a given orthographic string.- Specified by:
lookup
in interfaceIPADictionarySPI
- Returns:
- a list of IPA transcriptions associated with the given orthography
- Throws:
IPADictionaryExecption
-
install
Description copied from interface:IPADictionarySPI
Install this SPI into the given IPADictionary- Specified by:
install
in interfaceIPADictionarySPI
-
clear
- Specified by:
clear
in interfaceClearEntries
- Throws:
IPADictionaryExecption
-