|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSpeakableExceptionDetail
public class SpeakableExceptionDetail
Describes a problem found during processing of an
item placed on the Synthesizer
output queue.
This is usually bundled with a SpeakableException
.
Multiple SpeakableExceptionDetail
objects may be encapsulated by
a single SpeakableException
.
Synthesizer
,
SpeakableException
Field Summary | |
---|---|
static int |
SYNTAX_ERROR
Detail type when markup contains a syntax error. |
static int |
UNKNOWN_TYPE
Constant representing an unknown type. |
static int |
UNKNOWN_VALUE
Constant representing an unknown value. |
static int |
UNSUPPORTED_ALPHABET
Detail type representing an unsupported phoneme alphabet. |
static int |
UNSUPPORTED_AUDIO
Detail type when audio cannot be played. |
static int |
UNSUPPORTED_INTERPRETATION
Detail type when the Synthesizer
does not support the specified value of an attribute for
the say-as element. |
static int |
UNSUPPORTED_LANGUAGE
Detail type representing an unsupported language. |
static int |
UNSUPPORTED_LEXEME
Detail type representing an unsupported lexeme. |
static int |
UNSUPPORTED_LEXICON
Detail type representing an unsupported lexicon. |
static int |
UNSUPPORTED_PHONEME
Detail type representing an unsupported phoneme. |
static int |
UNSUPPORTED_VOICE
Detail type representing an unsupported voice. |
Constructor Summary | |
---|---|
SpeakableExceptionDetail(int type,
String textInfo,
int lineNumber,
int charNumber,
String message)
Constructs a SpeakableExceptionDetail object with
the information provided. |
Method Summary | |
---|---|
int |
getCharNumber()
Gets the character number in a line in text containing this problem. |
int |
getLineNumber()
Gets the line number in text containing this problem. |
String |
getMessage()
Gets a printable String describing this problem. |
String |
getTextInfo()
Gets text information specific to the problem encountered. |
int |
getType()
Gets the detail type for this problem. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNKNOWN_VALUE
getLineNumber
,
getCharNumber
,
Constant Field Valuespublic static final int UNKNOWN_TYPE
getTextInfo
returns the empty String
in this case.
getType
,
getTextInfo
,
Constant Field Valuespublic static final int UNSUPPORTED_ALPHABET
getTextInfo
returns the markup containing the problem.
Specifically, the value of the alphabet attribute.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
Constant Field Valuespublic static final int UNSUPPORTED_AUDIO
getTextInfo
returns the markup containing the problem.
Specifically, the value of the src attribute from the audio element.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
Constant Field Valuespublic static final int UNSUPPORTED_INTERPRETATION
Synthesizer
does not support the specified value of an attribute for
the say-as
element.
In particular, the interpret-as
, format
, and
detail
attributes may include unsupported values.
getTextInfo
returns the markup containing the problem.
Specifically, the unsupported attribute='value'
pair.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
Constant Field Valuespublic static final int UNSUPPORTED_LANGUAGE
xml:lang
attribute value is not supported.
getTextInfo
returns the markup containing the problem.
Specifically, the value of the unsupported language.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
Constant Field Valuespublic static final int UNSUPPORTED_LEXEME
getTextInfo
returns the unsupported lexeme.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
VocabularyManager
,
Constant Field Valuespublic static final int UNSUPPORTED_LEXICON
getTextInfo
returns the markup containing the problem.
Specifically, the unsupported lexicon reference.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
Constant Field Valuespublic static final int UNSUPPORTED_PHONEME
The Engine
should ignore the phoneme and continue processing.
getTextInfo
returns the markup containing the problem.
Specifically, the unsupported phoneme requested.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
Constant Field Valuespublic static final int UNSUPPORTED_VOICE
voice
element specified in the markup cannot be matched.
The Synthesizer
will issue a VOICED_CHANGED
event for
the closest matching voice, which may be the current voice.
getTextInfo
returns the markup containing the problem.
Specifically, the markup for the voice element.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
SpeakableEvent.VOICE_CHANGED
,
Constant Field Valuespublic static final int SYNTAX_ERROR
getTextInfo
returns the markup containing the error.
This can include an an unexpected element name, attribute name,
or attribute value.
getTextInfo
may return the empty String
if more specific
information is unavailable.
getMessage
may return more detailed information.
getTextInfo
,
getMessage
,
Constant Field ValuesConstructor Detail |
---|
public SpeakableExceptionDetail(int type, String textInfo, int lineNumber, int charNumber, String message) throws IllegalArgumentException
SpeakableExceptionDetail
object with
the information provided.
The associated accessor methods provide more detail about the parameters
and allowable values.
type
- a constant providing the detail typetextInfo
- text from item text specific to the detail typelineNumber
- line number of the problem in the item textcharNumber
- character number (within lineNumber
)
in the item textmessage
- a printable description string
IllegalArgumentException
- if called with an invalid parameter valuegetType
,
getTextInfo
,
getLineNumber
,
getCharNumber
,
getMessage
Method Detail |
---|
public int getLineNumber()
UNKNOWN_VALUE
is returned.
getCharNumber
,
UNKNOWN_VALUE
public int getCharNumber()
UNKNOWN_VALUE
is returned.
This value will be UNKNOWN_VALUE
if getLineNumber
returns UNKNOWN_VALUE
.
getLineNumber
,
UNKNOWN_VALUE
public String getMessage()
String
describing this problem.
May be null
.
String
description of this problempublic String getTextInfo()
getType
.
See that method for details.
getType()
public int getType()
UNKNOWN_TYPE
in the case where it is not known.
An application may use this value to take appropriate action.
UNKNOWN_TYPE
,
UNSUPPORTED_ALPHABET
,
UNSUPPORTED_AUDIO
,
UNSUPPORTED_INTERPRETATION
,
UNSUPPORTED_LANGUAGE
,
UNSUPPORTED_LEXEME
,
UNSUPPORTED_LEXICON
,
UNSUPPORTED_PHONEME
,
UNSUPPORTED_VOICE
,
SYNTAX_ERROR
|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Speech API 2.0,
Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.