|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SsmlParsingStrategy
Strategy to evaluate the contents of a VoiceXML tag within a
<prompt> tag into an SSML document that can be sent
to the speech synthesizer.
The main purpose is to evaluate all expressions. Since the task is very
similar to evaluating a tag with a TagStrategy it is advisable
to use a single source for evaluation of the tags.
Execution of an SsmlParsingStrategy comprises the following
steps:
clone()getAttributes(VoiceXmlInterpreterContext, FormInterpretationAlgorithm, VoiceXmlNode)evalAttributes(org.jvoicexml.interpreter.VoiceXmlInterpreterContext)validateAttributescloneNode(SsmlParser, ScriptingEngine, SsmlDocument, SsmlNode, VoiceXmlNode)
| Method Summary | |
|---|---|
Object |
clone()
Creates a new instance of this strategy. |
SsmlNode |
cloneNode(SsmlParser parser,
ScriptingEngine scripting,
SsmlDocument document,
SsmlNode parent,
VoiceXmlNode node)
Creates a clone of this node in the given document. |
void |
evalAttributes(VoiceXmlInterpreterContext context)
Evaluates all attributes which have to be evaluated by the scripting environment. |
void |
getAttributes(VoiceXmlInterpreterContext context,
FormInterpretationAlgorithm fia,
VoiceXmlNode node)
Retrieves all attributes specified by the given node or by a <property> tag and stores their
values in the working copy of this strategy. |
Collection<String> |
getEvalAttributes()
Retrieves the names of all attributes, which have to be evaluated by the scripting environment. |
void |
validateAttributes()
Validates the attributes of the current node. |
| Method Detail |
|---|
Object clone()
Collection<String> getEvalAttributes()
null
if the related node has not attributes to be evaluated.
void getAttributes(VoiceXmlInterpreterContext context,
FormInterpretationAlgorithm fia,
VoiceXmlNode node)
<property> tag and stores their
values in the working copy of this strategy.
context - The current VoiceXML interpreter context.fia - The current form interpretation algorithm, maybe null
if there is no current fia.node - The node to process.
void evalAttributes(VoiceXmlInterpreterContext context)
throws SemanticError
context - The current VoiceXML interpreter context.
SemanticError - Error evaluating a variable.
void validateAttributes()
throws ErrorEvent
ErrorEvent - Validation failed.
SsmlNode cloneNode(SsmlParser parser,
ScriptingEngine scripting,
SsmlDocument document,
SsmlNode parent,
VoiceXmlNode node)
throws SemanticError
parser - the SSML parser.scripting - reference to the scripting engine to evaluate
scripting expressions.document - the SSML target document.parent - parent node of the node to clone.node - the node to clone.
null may be returned
to indicate that the child nodes of node need no further
processing.
SemanticError - Error evaluating the node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||