|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StringInteraction
String interactions can be bound to numeric response variables, instead of strings, if desired. If detailed information about A numeric response is required then the string interaction can be bound to A response variable with record cardinality. The resulting value contains the following fields: stringValue: the string, as typed by the candidate. floatValue: the numeric value of the string typed by the candidate, as A float. integerValue: the numeric value of the string typed by the candidate if no fractional digits or exponent were specified, otherwise NULL. An integer. leftDigits: the number of digits to the left of the point. An integer. rightDigits: the number of digits to the right of the point. An integer. ndp: the number of fractional digits specified by the candidate. If no exponent was given this is the same as rightDigits. An integer. nsf: the number of significant digits specified by the candidate. An integer. exponent: the integer exponent given by the candidate or NULL if none was specified. Attribute : base [0..1]: integer = 10 If the string interaction is bound to A numeric response variable then the base attribute must be used to set the number base in which to interpret the value entered by the candidate. Attribute : stringIdentifier [0..1]: identifier If the string interaction is bound to A numeric response variable then the actual string entered by the candidate can also be captured by binding the interaction to A second response variable (of base-type string). Attribute : expectedLength [0..1]: integer The expectedLength attribute provides A hint to the candidate as to the expected overall length of the desired response. A Delivery Engine should use the value of this attribute to set the size of the response box, where applicable. This is not A validity constraint. Attribute : patternMask [0..1]: string If given, the pattern mask specifies A regular expression that the candidate's response must match in order to be considered valid. The regular expression language used is defined in Appendix F of [XML_SCHEMA2]. Care is needed to ensure that the format of the required input is clear to the candidate, especially when validity checking of responses is required for progression through A test. This could be done by providing an illustrative sample response in the prompt, for example. Attribute : placeholderText [0..1]: string In visual environments, string interactions are typically represented by empty boxes into which the candidate writes or types. However, in speech based environments it is helpful to have some placeholder text that can be used to vocalize the interaction. Delivery engines should use the value of this attribute (if provided) instead of their default placeholder text when this is required. Implementors should be aware of the issues concerning the use of default values described in the section on Response Variables.
| Field Summary | |
|---|---|
static int |
ATTR_BASE_DEFAULT_VALUE
Default value of base attribute. |
static java.lang.String |
ATTR_BASE_NAME
Name of base attribute in xml schema. |
static java.lang.String |
ATTR_EXPECTED_LENGTH_NAME
Name of expectedLength attribute in xml schema. |
static java.lang.String |
ATTR_PATTERN_MASK_NAME
Name of patternMask attribute in xml schema. |
static java.lang.String |
ATTR_PLACEHOLDER_TEXT_NAME
Name of placeholderText attribute in xml schema. |
static java.lang.String |
ATTR_STRING_IDENTIFIER_NAME
Name of stringIdentifier attribute in xml schema. |
static java.lang.String |
KEY_EXPONENT_NAME
Name of exponent key if response is bound to A record container. |
static java.lang.String |
KEY_FLOAT_VALUE_NAME
Name of floatValue key if response is bound to A record container. |
static java.lang.String |
KEY_INTEGER_VALUE_NAME
Name of integerValue key if response is bound to A record container. |
static java.lang.String |
KEY_LEFT_DIGITS_NAME
Name of leftDigits key if response is bound to A record container. |
static java.lang.String |
KEY_NDP_NAME
Name of ndp key if response is bound to A record container. |
static java.lang.String |
KEY_NSF_NAME
Name of nsf key if response is bound to A record container. |
static java.lang.String |
KEY_RIGHT_DIGITS_NAME
Name of rightDigits key if response is bound to A record container. |
static java.lang.String |
KEY_STRING_VALUE_NAME
Name of stringValue key if response is bound to A record container. |
| Method Summary | |
|---|---|
java.lang.Integer |
getBase()
Gets value of base attribute. |
java.lang.Integer |
getExpectedLength()
Gets value of expectedLength attribute. |
java.lang.String |
getPatternMask()
Gets value of patternMask attribute. |
java.lang.String |
getPlaceholderText()
Gets value of placeholderText attribute. |
java.lang.String |
getStringIdentifier()
Gets value of stringIdentifier attribute. |
ResponseDeclaration |
getStringIdentifierResponseDeclaration()
Gets ResponseDeclaration corresponding to the stringIdentifier attribute |
void |
setBase(java.lang.Integer base)
Sets new value of base attribute. |
void |
setExpectedLength(java.lang.Integer expectedLength)
Sets new value of expectedLength attribute. |
void |
setPatternMask(java.lang.String patternMask)
Sets new value of patternMask attribute. |
void |
setPlaceholderText(java.lang.String placeholderText)
Sets new value of placeholderText attribute. |
void |
setStringIdentifier(java.lang.String stringIdentifier)
Sets new value of stringIdentifier attribute. |
| Field Detail |
|---|
static final java.lang.String ATTR_BASE_NAME
static final int ATTR_BASE_DEFAULT_VALUE
static final java.lang.String ATTR_STRING_IDENTIFIER_NAME
static final java.lang.String ATTR_EXPECTED_LENGTH_NAME
static final java.lang.String ATTR_PATTERN_MASK_NAME
static final java.lang.String ATTR_PLACEHOLDER_TEXT_NAME
static final java.lang.String KEY_STRING_VALUE_NAME
static final java.lang.String KEY_FLOAT_VALUE_NAME
static final java.lang.String KEY_INTEGER_VALUE_NAME
static final java.lang.String KEY_LEFT_DIGITS_NAME
static final java.lang.String KEY_RIGHT_DIGITS_NAME
static final java.lang.String KEY_NDP_NAME
static final java.lang.String KEY_NSF_NAME
static final java.lang.String KEY_EXPONENT_NAME
| Method Detail |
|---|
void setBase(java.lang.Integer base)
base - new value of base attributegetBase()java.lang.Integer getBase()
setBase(java.lang.Integer)void setStringIdentifier(java.lang.String stringIdentifier)
stringIdentifier - new value of stringIdentifier attributegetStringIdentifier()java.lang.String getStringIdentifier()
setStringIdentifier(java.lang.String)void setExpectedLength(java.lang.Integer expectedLength)
expectedLength - new value of expectedLength attributegetExpectedLength()java.lang.Integer getExpectedLength()
setExpectedLength(java.lang.Integer)void setPatternMask(java.lang.String patternMask)
patternMask - new value of patternMask attributegetPatternMask()java.lang.String getPatternMask()
setPatternMask(java.lang.String)void setPlaceholderText(java.lang.String placeholderText)
placeholderText - new value of placeholderText attributegetPlaceholderText()java.lang.String getPlaceholderText()
setPlaceholderText(java.lang.String)ResponseDeclaration getStringIdentifierResponseDeclaration()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||