|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.taglibs.rdc.core.BaseModel
public abstract class BaseModel
This is the base class for all RDCs. Each atomic RDC must extend this class. GroupModel and ComponentModel extend this class.
Nested Class Summary | |
---|---|
static interface |
BaseModel.ValueInterpreter
Interface used by components to interpret the results sent back from the vxml browser/client. |
Field Summary | |
---|---|
protected java.util.Map |
ambiguousValues
Contains the list of ambiguous values keyed on grammar conforming values For e.g., a map of ambiguous values for say, time 5'o clock would be Key Value 0500a 5 A M 0500p 5 P M |
protected java.lang.String |
candidates
The serialized n-best data from the vxml browser |
protected java.lang.String |
canonicalizedValue
The normalized value for the input of this RDC |
protected java.lang.String |
className
The class of the bean that subclasses this instance |
protected org.w3c.dom.Document |
configuration
The default (parsed) configuration |
protected java.lang.Boolean |
confirm
specifies whether to do confirmation or not |
protected java.lang.Boolean |
confirmed
Response of the user to the confirmation dialog |
static java.lang.String |
DEFAULT_INITIAL_GRAMMAR_NAME
The name that will be associated with the default grammar used to refer to the initial value associated with this RDC |
static float |
DEFAULT_MIN_CONFIDENCE
The default value of the minimum confidence. |
static int |
DEFAULT_NUM_N_BEST
The unique identifier associated with this RDC |
protected java.lang.Boolean |
echo
The user preference for playing back the return value associated with the RDC |
static int |
ERR_NO_DEFAULT
A constant for errorCode stating no default value is specified |
static int |
ERR_NONE
A constant for errorCode when there is no error |
protected int |
errorCode
This is used to identify the error that occured |
protected int |
exitStatus
The status at exit, indicating whether this RDC collected input or gracefully exited after a number of retries |
protected java.util.List |
grammars
Path to component grammar(s) |
protected java.lang.String |
id
The unique identifier associated with this RDC |
protected java.lang.Object |
initial
The default/initial value associated with this RDC |
protected Grammar |
initialGrammar
The grammar available for the user to pick default/initial value associated with this RDC |
protected java.util.Map |
interpretation
The semantic interpretation returned for the input of this RDC |
protected java.lang.Boolean |
isAmbiguous
Indicates whether the current value for this RDC is ambiguous |
protected java.lang.Boolean |
isValid
Indicates whether the current value for this RDC is valid with respect to the supplied constraints |
protected java.lang.String |
locale
The Locale for this RDC |
protected int |
maxNoInput
Maximum number of client side <noinput> events before this RDC gracefully exits with Constants.EXIT_MAXNOINPUT exitStatus |
protected int |
maxNoMatch
Maximum number of client side <nomatch> events before this RDC gracefully exits with Constants.EXIT_MAXNOMATCH exitStatus |
protected float |
minConfidence
Minimum confidence below which all values are treated as invalid |
protected int |
numNBest
The maximum number of n-best results requested from the vxml browser |
protected java.util.Map |
paramsMap
Map this model's properties to the params in the request it should look for |
static java.lang.String |
PROPERTY_INITIAL_GRAMMAR
The property under which the initial grammar is stored in the resource bundles in org.apache.taglibs.rdc.resources |
protected java.util.Locale |
rdcLocale
The Locale for this RDC, defaults to Constants.rdcLocale |
protected java.util.ResourceBundle |
rdcResourceBundle
The ResourceBundle for this RDC,defaults to Constants.rdcResourceBundle |
protected java.lang.Boolean |
skipSubmit
Specifies whether this RDC should emit a submit URI - may be removed in later versions of this tag library |
protected int |
state
The current state of this RDC |
protected java.lang.Boolean |
subdialog
Indicates whether this RDC is invoked as a subdialog. |
protected java.lang.String |
submit
The URI to submit the vxml form |
protected java.lang.String |
utterance
The utterance of the user; what the user said |
protected java.lang.Object |
value
Value currently associated with this RDC |
Constructor Summary | |
---|---|
BaseModel()
|
Method Summary | |
---|---|
protected java.lang.Object |
baseCanonicalize(java.lang.Object input)
Transforms canonical data from client to its the corresponding value. |
protected java.lang.Boolean |
baseValidate(java.lang.Object newValue,
boolean setErrorCode)
Validates the input against the given constraints. |
protected java.lang.String |
calculateCanonicalizedValue(java.lang.Object value)
Hook for custom canonicalized value calculation. |
protected java.lang.Object |
canonicalize(java.lang.Object input,
boolean isAttribute)
Hook for custom canonicalization. |
java.util.Map |
getAmbiguousValues()
Get the list of ambiguous values |
java.lang.String |
getCandidates()
Get the n-best data string |
java.lang.String |
getCanonicalizedValue()
Get the normalized value for the input |
java.lang.String |
getClassName()
The bean subclassing this instance. |
org.w3c.dom.Document |
getConfiguration()
Get the Configuration value. |
java.lang.Boolean |
getConfirm()
Get the confirm value |
java.lang.Boolean |
getConfirmed()
Get the response of user to the confirmation dialog |
java.lang.Boolean |
getEcho()
Get whether the user has requested echoing the return value |
int |
getERR_NO_DEFAULT()
|
int |
getERR_NONE()
|
int |
getErrorCode()
Get the errorCode value |
int |
getExitStatus()
Get the exitStatus value |
java.util.List |
getGrammars()
Get the grammar path(s) for the RDC grammars is a read only property |
java.lang.String |
getId()
Get the id value for this RDC |
java.lang.Object |
getInitial()
Gets the initial value |
java.util.Map |
getInterpretation()
Get the interpretation for this input |
java.lang.Boolean |
getIsAmbiguous()
Get whether the input value is ambiguous or not |
java.lang.Boolean |
getIsValid()
Get the whether input is valid or not |
java.lang.String |
getLocale()
Get the Locale (String) for this RDC |
int |
getMaxNoInput()
Get the maxNoInput value |
int |
getMaxNoMatch()
Get the maxNoMatch value |
float |
getMinConfidence()
Get the minConfidence |
int |
getNumNBest()
Get numNBest |
java.util.Map |
getParamsMap()
Get paramsMap - read-only property, no setter |
java.util.Locale |
getRdcLocale()
Returns the Locale for this RDC, if it was set, or the default Locale for this deployment |
java.util.ResourceBundle |
getRdcResourceBundle()
Return the resourceBundle. |
java.lang.String |
getSerializedValue()
Return the serialized value collected by this RDC, used primarily as the value returned when this RDC is invoked by a subdialog (means it goes out as a request parameter). |
java.lang.Boolean |
getSkipSubmit()
Get the skipSubmit value |
int |
getState()
Get the state value |
java.lang.Boolean |
getSubdialog()
Get whether this RDC is invoked as a subdialog |
java.lang.String |
getSubmit()
Get the submit URI for the RDC |
java.lang.String |
getUtterance()
Get what the user said; the utterance of the user |
java.lang.Object |
getValue()
Get the value currently associated with the RDC |
void |
setAmbiguousValues(java.util.Map ambigValues)
Set the map of ambiguous values |
void |
setCandidates(java.lang.String candidates)
Set the candidates (serialized n-best data string). |
void |
setCanonicalizedValue(java.lang.String canonicalizedValue)
Set the normalized value for input |
void |
setConfiguration(org.w3c.dom.Document newConfiguration)
Set the Configuration value. |
void |
setConfirm(java.lang.Boolean confirm)
Set the confirm value. |
void |
setConfirmed(java.lang.Boolean confirmed)
Set the response of user to the confirmation dialog |
void |
setEcho(java.lang.Boolean echo)
Set whether the user has requested echo |
void |
setErrorCode(int errorCode)
Set the errorCode value |
void |
setExitStatus(int exitStatus)
Set the exitStatus value |
void |
setGrammar(Grammar grammar)
Add this Grammar object to the list of
grammars for this RDC. |
void |
setId(java.lang.String id)
Set the id value for this RDC |
void |
setInitial(java.lang.Object initial)
Sets the initial value for this RDC. |
void |
setInterpretation(java.util.Map interp)
Set the interpretation for this input |
void |
setIsAmbiguous(java.lang.Boolean isAmbiguous)
Set whether the input value is ambiguous or not |
void |
setIsValid(java.lang.Boolean isValid)
Set whether value is valid or not |
void |
setLocale(java.lang.String locale)
Set the Locale (String) for this RDC |
void |
setMaxNoInput(int maxNoInput)
Set the maxNoInput value |
void |
setMaxNoMatch(int maxNoMatch)
Set the maxNoMatch value |
void |
setMinConfidence(float minConfidence)
Set the minConfidence |
void |
setNumNBest(int numNBest)
Set numNBest |
void |
setSkipSubmit(java.lang.Boolean newSkipSubmit)
Set the skipSubmit value. |
void |
setState(int state)
Set the state value |
void |
setSubdialog(java.lang.Boolean subdialog)
Set whether this RDC is invoked as a subdialog |
void |
setSubmit(java.lang.String submit)
Set the submit URI for the RDC |
void |
setUtterance(java.lang.String utterance)
Set what the user said |
void |
setValue(java.lang.Object value)
Set the value for this RDC instance. |
protected java.lang.Boolean |
validate(java.lang.Object newValue,
boolean setErrorCode)
Hook for custom validation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float DEFAULT_MIN_CONFIDENCE
public static final int DEFAULT_NUM_N_BEST
public static final java.lang.String DEFAULT_INITIAL_GRAMMAR_NAME
Grammar
,
Constant Field Valuespublic static final java.lang.String PROPERTY_INITIAL_GRAMMAR
public static final int ERR_NONE
public static final int ERR_NO_DEFAULT
protected java.lang.String id
protected int state
protected int errorCode
protected java.lang.Boolean confirm
protected java.lang.Boolean confirmed
protected java.lang.Boolean isValid
protected java.lang.String utterance
protected java.lang.String canonicalizedValue
protected java.util.Map interpretation
protected java.lang.String submit
protected java.util.List grammars
protected java.lang.Boolean echo
protected java.lang.Boolean subdialog
protected java.lang.Boolean isAmbiguous
protected java.util.Map ambiguousValues
protected org.w3c.dom.Document configuration
protected java.lang.String className
protected java.lang.Boolean skipSubmit
protected java.lang.Object value
protected java.lang.Object initial
protected java.lang.String candidates
protected float minConfidence
protected int numNBest
protected java.util.Map paramsMap
protected Grammar initialGrammar
protected int exitStatus
protected int maxNoInput
Constants.EXIT_MAXNOINPUT
protected int maxNoMatch
Constants.EXIT_MAXNOMATCH
protected java.lang.String locale
protected transient java.util.Locale rdcLocale
Constants.rdcLocale
protected transient java.util.ResourceBundle rdcResourceBundle
Constants.rdcResourceBundle
Constructor Detail |
---|
public BaseModel()
Method Detail |
---|
public final int getERR_NONE()
public final int getERR_NO_DEFAULT()
public java.lang.String getId()
public void setId(java.lang.String id)
id
- The new id value.public int getState()
public void setState(int state)
state
- The new state valuepublic int getErrorCode()
public void setErrorCode(int errorCode)
errorCode
- The new errorCode valuepublic java.lang.Boolean getConfirm()
public void setConfirm(java.lang.Boolean confirm)
confirm
- The new confirm valuepublic java.lang.Boolean getConfirmed()
public void setConfirmed(java.lang.Boolean confirmed)
confirmed
- is new response to confirmation dialogpublic java.lang.Boolean getIsValid()
public void setIsValid(java.lang.Boolean isValid)
isValid
- is new value to indicate whether the input is valid or notpublic java.lang.Boolean getSubdialog()
public void setSubdialog(java.lang.Boolean subdialog)
subdialog
- The subdialog Boolean.public java.lang.Boolean getIsAmbiguous()
public void setIsAmbiguous(java.lang.Boolean isAmbiguous)
isAmbiguous
- is the new value to indicate whether the input is ambiguous or notpublic java.lang.String getUtterance()
public void setUtterance(java.lang.String utterance)
utterance
- is the new utterance of the userpublic java.lang.String getCanonicalizedValue()
public void setCanonicalizedValue(java.lang.String canonicalizedValue)
canonicalizedValue
- is the normalized value of the inputpublic java.util.Map getInterpretation()
public void setInterpretation(java.util.Map interp)
interp
- the interpretation for this inputpublic java.lang.String getSubmit()
public void setSubmit(java.lang.String submit)
submit
- - the submit URIpublic java.util.List getGrammars()
public void setGrammar(Grammar grammar)
Grammar
object to the list of
grammars for this RDC.
grammar
- - the Grammar
objectpublic java.lang.Boolean getEcho()
public void setEcho(java.lang.Boolean echo)
echo
- - the user's choice to echo the return valuepublic java.util.Map getAmbiguousValues()
public void setAmbiguousValues(java.util.Map ambigValues)
ambigValues
- A map containing the ambiguous valuespublic org.w3c.dom.Document getConfiguration()
public void setConfiguration(org.w3c.dom.Document newConfiguration)
newConfiguration
- The new Configuration value.public java.lang.String getClassName()
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
value
- The value returned by the clientpublic java.lang.Object getInitial()
public void setInitial(java.lang.Object initial)
initial
- The default/initial valuepublic java.lang.Boolean getSkipSubmit()
public void setSkipSubmit(java.lang.Boolean newSkipSubmit)
newSkipSubmit
- public float getMinConfidence()
public void setMinConfidence(float minConfidence)
minConfidence
- the new valuepublic java.lang.String getCandidates()
public void setCandidates(java.lang.String candidates)
candidates
- The serialized n-best results from the vxml browserinterface
public int getNumNBest()
public void setNumNBest(int numNBest)
numNBest
- the new maximum number of n-best values requestedpublic java.util.Map getParamsMap()
public int getExitStatus()
public void setExitStatus(int exitStatus)
exitStatus
- The new exitStatus valuepublic int getMaxNoInput()
public void setMaxNoInput(int maxNoInput)
maxNoInput
- The maxNoInput to set.public int getMaxNoMatch()
public void setMaxNoMatch(int maxNoMatch)
maxNoMatch
- The maxNoMatch to set.public void setLocale(java.lang.String locale)
locale
- The locale (String) to set.public java.lang.String getLocale()
public java.util.Locale getRdcLocale()
public java.util.ResourceBundle getRdcResourceBundle()
protected java.lang.Object baseCanonicalize(java.lang.Object input)
input
- the value
protected java.lang.Boolean baseValidate(java.lang.Object newValue, boolean setErrorCode)
protected java.lang.Object canonicalize(java.lang.Object input, boolean isAttribute)
input
- the value
protected java.lang.Boolean validate(java.lang.Object newValue, boolean setErrorCode)
protected java.lang.String calculateCanonicalizedValue(java.lang.Object value)
public java.lang.String getSerializedValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |