org.jvoicexml.xml.srgs
Enum GrammarType

java.lang.Object
  extended by java.lang.Enum<GrammarType>
      extended by org.jvoicexml.xml.srgs.GrammarType
All Implemented Interfaces:
Serializable, Comparable<GrammarType>

public enum GrammarType
extends Enum<GrammarType>

Defintion of the type of the grammar.

Since:
0.5.5
Version:
$Revision: 208 $

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

Author:
Dirk Schnelle

Enum Constant Summary
JSGF
          JSGF formatted grammar.
SRGS_ABNF
          SRGS grammar with ABNF format.
SRGS_XML
          SRGS grammar in XML format.
 
Method Summary
 String getType()
          Retrieves the name of this grammar type.
static GrammarType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GrammarType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

JSGF

public static final GrammarType JSGF
JSGF formatted grammar.


SRGS_ABNF

public static final GrammarType SRGS_ABNF
SRGS grammar with ABNF format.


SRGS_XML

public static final GrammarType SRGS_XML
SRGS grammar in XML format.

Method Detail

values

public static final GrammarType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(GrammarType c : GrammarType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static GrammarType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getType

public String getType()
Retrieves the name of this grammar type.

Returns:
Name of this type.


Copyright © 2005-2007 JVoiceXML group.