|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvoicexml.implementation.DocumentGrammarImplementation
public final class DocumentGrammarImplementation
A grammar implementation that simply represents a grammar document. This may be suitable for all cases where there is no specific grammar implementation but an implementation that is simply based on documents.
| Constructor Summary | |
|---|---|
DocumentGrammarImplementation(GrammarDocument doc)
Constructs a new object. |
|
| Method Summary | |
|---|---|
boolean |
accepts(RecognitionResult result)
Checks, if this grammar covers the given recognition result. |
boolean |
equals(GrammarImplementation<GrammarDocument> other)
Checks if this grammar implementation is equal to the given grammar implementation. |
GrammarDocument |
getGrammar()
Retrieves the grammar object. |
GrammarType |
getMediaType()
Returns the declared media type of the external grammar. |
ModeType |
getModeType()
Returns the mode type of the grammar. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentGrammarImplementation(GrammarDocument doc)
doc - the grammar document.| Method Detail |
|---|
public int hashCode()
hashCode in class Objectpublic boolean accepts(RecognitionResult result)
It is not legal to check if the result is accepted using
RecognitionResult.isAccepted(). Implementations
should assume that it is a valid input result.
Implementations can use the
GrammarChecker.
accepts in interface GrammarImplementation<GrammarDocument>result - the result to check.
true if the utterance is valid for this grammarpublic boolean equals(GrammarImplementation<GrammarDocument> other)
equals in interface GrammarImplementation<GrammarDocument>other - the grammar implementation to compare with.
true if the grammar implementations are equal.public GrammarDocument getGrammar()
getGrammar in interface GrammarImplementation<GrammarDocument>public GrammarType getMediaType()
getMediaType in interface GrammarImplementation<GrammarDocument>public ModeType getModeType()
getModeType in interface GrammarImplementation<GrammarDocument>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||