Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class javax.speech.recognition.GrammarSyntaxDetail

java.lang.Object
  |
  +--javax.speech.recognition.GrammarSyntaxDetail

public class GrammarSyntaxDetail
extends Object
Description of a problem found in a grammar usually bundled with a GrammarException. The grammar may have been created programmatically or by loading a Java Speech Grammar Format document. Multiple GrammarSyntaxDetail objects may be encapsulated by a single GrammarException.

Depending on the type of error and the context in which the error is identified, some or all of the following information may be provided:

The following problems may be encountered when loading JSGF from a URL or Reader, or through the ruleForJSGF method of the RuleGrammar interface. When the commitChanges method of a Recognizer is called, it performs addition checks to ensure all loaded grammars are legal. The following problems may be encountered:

See Also:
GrammarException, loadJSGF(java.io.Reader), loadJSGF(java.net.URL, java.lang.String), ruleForJSGF, commitChanges

Field Summary
int charNumber
          Character number in line in JSGF file for problem.
URL grammarLocation
          URL location of grammar in which problem is encountered.
String grammarName
          Name of grammar in which problem is encountered.
RuleName importName
          Name in grammar import declaration in which problem is encountered.
int lineNumber
          Line number in JSGF file for problem.
String message
          Printable string describing problem.
String ruleName
          Name of rule within grammar in which problem is encountered.
 
Constructor Summary
GrammarSyntaxDetail()
          Empty constructor.
GrammarSyntaxDetail(String grammarName, URL grammarLocation, String ruleName, RuleName importName, int lineNumber, int charNumber, String message)
          Complete constructor describing a syntax problem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

grammarName

public String grammarName
Name of grammar in which problem is encountered. May be null.

grammarLocation

public URL grammarLocation
URL location of grammar in which problem is encountered. May be null.

ruleName

public String ruleName
Name of rule within grammar in which problem is encountered. May be null.

importName

public RuleName importName
Name in grammar import declaration in which problem is encountered. May be null.

lineNumber

public int lineNumber
Line number in JSGF file for problem. Negative values indicate that the line number unknown.

charNumber

public int charNumber
Character number in line in JSGF file for problem. Negative values indicate that the line number unknown.

message

public String message
Printable string describing problem. May be null.
Constructor Detail

GrammarSyntaxDetail

public GrammarSyntaxDetail()
Empty constructor.

GrammarSyntaxDetail

public GrammarSyntaxDetail(String grammarName,
                           URL grammarLocation,
                           String ruleName,
                           RuleName importName,
                           int lineNumber,
                           int charNumber,
                           String message)
Complete constructor describing a syntax problem.

Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

JavaTM Speech API
Copyright 1997-1998 Sun Microsystems, Inc. All rights reserved
Send comments to javaspeech-comments@sun.com