org.rococoa.contrib.appkit
Class NSSpeechDictionary

java.lang.Object
  extended by org.rococoa.contrib.AbstractPropertyDictionary<NSSpeechDictionary.SpeechDictionaryProperty>
      extended by org.rococoa.contrib.appkit.NSSpeechDictionary

public class NSSpeechDictionary
extends AbstractPropertyDictionary<NSSpeechDictionary.SpeechDictionaryProperty>

NSVoice encapsulates the properties of a speech synthesis dictionary, and can be used with NSSpeechSynthesizer to change the way words are pronounced. Dictionaries contain lists of entries that define how a given word or abbreviation should be pronounced. This class is a Rococoa enhancment designed to make it easier to work with speech dictionaries, there is no actual class with this name in Cocoa.


Nested Class Summary
static class NSSpeechDictionary.Entry
          Represents a dictionary entry.
static class NSSpeechDictionary.SpeechDictionaryProperty
          Defines the properties of a speech dictionary
 
Constructor Summary
NSSpeechDictionary()
          Construct a new empty speech dictionary
NSSpeechDictionary(NSMutableDictionary data)
          Construct a new SpecchDictionary from existing data
 
Method Summary
 void addAbbreviation(NSSpeechDictionary.Entry abbreviation)
           
 void addPronounciation(NSSpeechDictionary.Entry pronounciation)
           
 List<NSSpeechDictionary.Entry> getAbbreviations()
           
 Locale getLocaleIdentifier()
          Get the Locale associated with this dictionary
 Date getModificationDate()
           
 List<NSSpeechDictionary.Entry> getPronunciations()
           
 void setAbbreviations(List<NSSpeechDictionary.Entry> abbreviations)
           
 void setLocaleIdentifier(Locale localeIdentifier)
           
 void setModificationDate(Date modificationDate)
           
 void setPronunciations(List<NSSpeechDictionary.Entry> pronounciations)
           
 String toString()
           
 
Methods inherited from class org.rococoa.contrib.AbstractPropertyDictionary
getBoolean, getData, getDate, getEnum, getInt, getShort, getString, getValueAsType, setDate, setString, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NSSpeechDictionary

public NSSpeechDictionary()
Construct a new empty speech dictionary


NSSpeechDictionary

public NSSpeechDictionary(NSMutableDictionary data)
Construct a new SpecchDictionary from existing data

Parameters:
data - used to initialize the speech dictionary, must contain valid keys and values for a speech dictionary
Method Detail

getLocaleIdentifier

public Locale getLocaleIdentifier()
Get the Locale associated with this dictionary

Returns:
the dictionary's Locale

setLocaleIdentifier

public void setLocaleIdentifier(Locale localeIdentifier)

getModificationDate

public Date getModificationDate()

setModificationDate

public void setModificationDate(Date modificationDate)

getPronunciations

public List<NSSpeechDictionary.Entry> getPronunciations()

setPronunciations

public void setPronunciations(List<NSSpeechDictionary.Entry> pronounciations)

addPronounciation

public void addPronounciation(NSSpeechDictionary.Entry pronounciation)

getAbbreviations

public List<NSSpeechDictionary.Entry> getAbbreviations()

setAbbreviations

public void setAbbreviations(List<NSSpeechDictionary.Entry> abbreviations)

addAbbreviation

public void addAbbreviation(NSSpeechDictionary.Entry abbreviation)

toString

public String toString()
Overrides:
toString in class AbstractPropertyDictionary<NSSpeechDictionary.SpeechDictionaryProperty>


Copyright © 2012. All Rights Reserved.