|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectRuleComponent
RuleTag
public class RuleTag
Defines a tag to be used within a RuleGrammar
.
A tag is a special kind of RuleComponent
that can be used
for semantic interpretation.
Tags do not affect the recognition of RuleGrammar
s
in which they are used.
Instead, tags are used to embed information into a RuleGrammar
that helps with processing results of recognition.
Tags are
RuleGrammar
,
RuleParse
objects).
A tag's value may be any Object
.
Tags created from
SRGS markup
(tag
element) are always String
s.
The toString()
method uses Object.toString()
to convert a tag's value to
a String
when creating SRGS markup.
All characters in the String
must be representable in XML to result
in valid markup.
RuleGrammar
,
RuleParse
,
toString()
Constructor Summary | |
---|---|
RuleTag(Object tag)
Constructs a RuleTag with a tag value. |
Method Summary | |
---|---|
Object |
getTag()
Returns the tag value. |
String |
toString()
Returns a String representing this RuleComponent
as grammar text. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RuleTag(Object tag)
RuleTag
with a tag value.
This may be included in a RuleGrammar
via a RuleSequence
or other RuleComponent
subclass.
During grammar processing, RuleTag
behaves the same
as NULL
.
tag
- the tag valueRuleSequence
,
RuleComponent
,
NULL
,
getTag
Method Detail |
---|
public Object getTag()
public String toString() throws IllegalArgumentException
String
representing this RuleComponent
as grammar text.
The String
represents a portion of a grammar that could appear
on the right hand side of a Rule
definition.
The tag's String representation must not contain any characters not
representable in XML (e.g., '\0'
or
ASCII control characters).
toString
in class RuleComponent
String
representing grammar text.
IllegalArgumentException
- if the tag's String
representation contains characters not representable in XMLRuleComponent
,
Rule
|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Speech API 2.0,
Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.