org.qtitools.qti.node.item.interaction
Interface StringInteraction

All Known Implementing Classes:
ExtendedTextInteraction, TextEntryInteraction

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.

Author:
Jonathon Hare

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

ATTR_BASE_NAME

static final java.lang.String ATTR_BASE_NAME
Name of base attribute in xml schema.

See Also:
Constant Field Values

ATTR_BASE_DEFAULT_VALUE

static final int ATTR_BASE_DEFAULT_VALUE
Default value of base attribute.

See Also:
Constant Field Values

ATTR_STRING_IDENTIFIER_NAME

static final java.lang.String ATTR_STRING_IDENTIFIER_NAME
Name of stringIdentifier attribute in xml schema.

See Also:
Constant Field Values

ATTR_EXPECTED_LENGTH_NAME

static final java.lang.String ATTR_EXPECTED_LENGTH_NAME
Name of expectedLength attribute in xml schema.

See Also:
Constant Field Values

ATTR_PATTERN_MASK_NAME

static final java.lang.String ATTR_PATTERN_MASK_NAME
Name of patternMask attribute in xml schema.

See Also:
Constant Field Values

ATTR_PLACEHOLDER_TEXT_NAME

static final java.lang.String ATTR_PLACEHOLDER_TEXT_NAME
Name of placeholderText attribute in xml schema.

See Also:
Constant Field Values

KEY_STRING_VALUE_NAME

static final java.lang.String KEY_STRING_VALUE_NAME
Name of stringValue key if response is bound to A record container.

See Also:
Constant Field Values

KEY_FLOAT_VALUE_NAME

static final java.lang.String KEY_FLOAT_VALUE_NAME
Name of floatValue key if response is bound to A record container.

See Also:
Constant Field Values

KEY_INTEGER_VALUE_NAME

static final java.lang.String KEY_INTEGER_VALUE_NAME
Name of integerValue key if response is bound to A record container.

See Also:
Constant Field Values

KEY_LEFT_DIGITS_NAME

static final java.lang.String KEY_LEFT_DIGITS_NAME
Name of leftDigits key if response is bound to A record container.

See Also:
Constant Field Values

KEY_RIGHT_DIGITS_NAME

static final java.lang.String KEY_RIGHT_DIGITS_NAME
Name of rightDigits key if response is bound to A record container.

See Also:
Constant Field Values

KEY_NDP_NAME

static final java.lang.String KEY_NDP_NAME
Name of ndp key if response is bound to A record container.

See Also:
Constant Field Values

KEY_NSF_NAME

static final java.lang.String KEY_NSF_NAME
Name of nsf key if response is bound to A record container.

See Also:
Constant Field Values

KEY_EXPONENT_NAME

static final java.lang.String KEY_EXPONENT_NAME
Name of exponent key if response is bound to A record container.

See Also:
Constant Field Values
Method Detail

setBase

void setBase(java.lang.Integer base)
Sets new value of base attribute.

Parameters:
base - new value of base attribute
See Also:
getBase()

getBase

java.lang.Integer getBase()
Gets value of base attribute.

Returns:
value of base attribute
See Also:
setBase(java.lang.Integer)

setStringIdentifier

void setStringIdentifier(java.lang.String stringIdentifier)
Sets new value of stringIdentifier attribute.

Parameters:
stringIdentifier - new value of stringIdentifier attribute
See Also:
getStringIdentifier()

getStringIdentifier

java.lang.String getStringIdentifier()
Gets value of stringIdentifier attribute.

Returns:
value of stringIdentifier attribute
See Also:
setStringIdentifier(java.lang.String)

setExpectedLength

void setExpectedLength(java.lang.Integer expectedLength)
Sets new value of expectedLength attribute.

Parameters:
expectedLength - new value of expectedLength attribute
See Also:
getExpectedLength()

getExpectedLength

java.lang.Integer getExpectedLength()
Gets value of expectedLength attribute.

Returns:
value of expectedLength attribute
See Also:
setExpectedLength(java.lang.Integer)

setPatternMask

void setPatternMask(java.lang.String patternMask)
Sets new value of patternMask attribute.

Parameters:
patternMask - new value of patternMask attribute
See Also:
getPatternMask()

getPatternMask

java.lang.String getPatternMask()
Gets value of patternMask attribute.

Returns:
value of patternMask attribute
See Also:
setPatternMask(java.lang.String)

setPlaceholderText

void setPlaceholderText(java.lang.String placeholderText)
Sets new value of placeholderText attribute.

Parameters:
placeholderText - new value of placeholderText attribute
See Also:
getPlaceholderText()

getPlaceholderText

java.lang.String getPlaceholderText()
Gets value of placeholderText attribute.

Returns:
value of placeholderText attribute
See Also:
setPlaceholderText(java.lang.String)

getStringIdentifierResponseDeclaration

ResponseDeclaration getStringIdentifierResponseDeclaration()
Gets ResponseDeclaration corresponding to the stringIdentifier attribute

Returns:
ResponseDeclaration identified by interactions stringIdentifier


Copyright © 2009. All Rights Reserved.