org.jvoicexml.interpreter.grammar.identifier
Class JsgfGrammarIdentifier

java.lang.Object
  extended by org.jvoicexml.interpreter.grammar.identifier.JsgfGrammarIdentifier
All Implemented Interfaces:
GrammarIdentifier

public final class JsgfGrammarIdentifier
extends Object
implements GrammarIdentifier

This class implements the GrammarIdentifier interface. An instance of this class is able to identify a JSGF grammar. The mime type of the accepted grammar is application/x-jsgf.

Version:
$Revision: 216 $

Copyright © 2005-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Christoph Buente, Dirk Schnelle

Constructor Summary
JsgfGrammarIdentifier()
           
 
Method Summary
 GrammarType getSupportedType()
          Returns the supported media type.
 GrammarType identify(GrammarDocument grammar)
          Identifies the grammar specified by grammar. A JSGF grammar must have a self identifying header #JSGF V1.0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsgfGrammarIdentifier

public JsgfGrammarIdentifier()
Method Detail

identify

public GrammarType identify(GrammarDocument grammar)
Identifies the grammar specified by grammar. If grammar could be identified a type is returned, otherwise null. A JSGF grammar must have a self identifying header #JSGF V1.0.

Specified by:
identify in interface GrammarIdentifier
Parameters:
grammar - The grammar to be identified.
Returns:
String the type of the grammar. If grammar could not be identified, null is returned.
Stuff to complete
Evaluate encoding and version.

getSupportedType

public GrammarType getSupportedType()
Returns the supported media type.

Specified by:
getSupportedType in interface GrammarIdentifier
Returns:
the supported media type.


Copyright © 2005-2007 JVoiceXML group.