org.jvoicexml.implementation.grammar.transformer
Class NuanceDynagramBinaryGrammarTransformer

java.lang.Object
  extended by org.jvoicexml.implementation.grammar.transformer.NuanceDynagramBinaryGrammarTransformer
All Implemented Interfaces:
GrammarTransformer

public final class NuanceDynagramBinaryGrammarTransformer
extends Object
implements GrammarTransformer

A grammar transformer for Nance compiled grammars.

Since:
0.7.5
Version:
$Revision: 2635 $
Author:
Shuo Yang, Dirk Schnelle-Walka

Constructor Summary
NuanceDynagramBinaryGrammarTransformer()
           
 
Method Summary
 GrammarType getSourceType()
          Returns the supported source media type.
 GrammarType getTargetType()
          Returns the supported result media type.
 GrammarImplementation<?> transformGrammar(UserInput input, GrammarDocument grammar)
          Creates a JSGF compatible grammar object, which can be passed to the ASR engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NuanceDynagramBinaryGrammarTransformer

public NuanceDynagramBinaryGrammarTransformer()
Method Detail

getSourceType

public GrammarType getSourceType()
Returns the supported source media type.

Specified by:
getSourceType in interface GrammarTransformer
Returns:
the supported source media type.

getTargetType

public GrammarType getTargetType()
Returns the supported result media type.

Specified by:
getTargetType in interface GrammarTransformer
Returns:
the supported result media type.

transformGrammar

public GrammarImplementation<?> transformGrammar(UserInput input,
                                                 GrammarDocument grammar)
                                          throws NoresourceError,
                                                 UnsupportedFormatError,
                                                 BadFetchError
Creates a JSGF compatible grammar object, which can be passed to the ASR engine.

Specified by:
transformGrammar in interface GrammarTransformer
Parameters:
input - The current UserInput to create an empty grammar.
grammar - The grammar document to transform.
Returns:
The result of the transformation. A grammar representation which can be passed to an ASR engine.
Throws:
NoresourceError - Error creating a grammar from the input device.
UnsupportedFormatError - If an unsupported grammar has been given.
BadFetchError - If the document could not be fetched successfully.


Copyright © 2005-2010JVoiceXML group.