|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.node.AbstractNode
org.qtitools.qti.node.AbstractObject
org.qtitools.qti.node.content.BodyElement
org.qtitools.qti.node.item.interaction.Interaction
org.qtitools.qti.node.item.interaction.BlockInteraction
org.qtitools.qti.node.item.interaction.ExtendedTextInteraction
public class ExtendedTextInteraction
An extended text interaction is a blockInteraction that allows the candidate to enter an extended amount of text. The extendedTextInteraction must be bound to a response variable with baseType of string, integer, or float. When bound to response variable with single cardinality a single string of text is required from the candidate. When bound to a response variable with multiple or ordered cardinality several separate text strings may be required, see maxStrings below. Attribute : maxStrings [0..1]: integer The maxStrings attribute is required when the interaction is bound to a response variable that is a container. A Delivery Engine must use the value of this attribute to control the maximum number of separate strings accepted from the candidate. When multiple strings are accepted, expectedLength applies to each string. Attribute : minStrings [0..1]: integer = 0 The minStrings attribute specifies the minimum number separate (non-empty) strings required from the candidate to form a valid response. If minStrings is 0 then the candidate is not required to enter any strings at all. minStrings must be less than or equal to the limit imposed by maxStrings. If the interaction is not bound to a container then there is a special case in which minStrings may be 1. In this case the candidate must enter a non-empty string to form a valid response. More complex constraints on the form of the string can be controlled with the patternMask attribute. Attribute : expectedLines [0..1]: integer The expectedLines attribute provides a hint to the candidate as to the expected number of lines of input required. 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 : format [0..1]: textFormat = plain Used to control the format of the text entered by the candidate. See textFormat below. This attribute affects the way the value of the associated response variable should be interpreted by response processing engines and also controls the way it should be captured in the delivery engine.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_EXPECTED_LINES_NAME
Name of expectedLines attribute in xml schema. |
static TextFormat |
ATTR_FORMAT_DEFAULT_VALUE
Default value of format attribute. |
static java.lang.String |
ATTR_FORMAT_NAME
Name of format attribute in xml schema. |
static java.lang.String |
ATTR_MAX_STRINGS_NAME
Name of maxStrings attribute in xml schema. |
static java.lang.Integer |
ATTR_MIN_STRINGS_DEFAULT_VALUE
Name of minStrings attribute in xml schema. |
static java.lang.String |
ATTR_MIN_STRINGS_NAME
Name of minStrings attribute in xml schema. |
static java.lang.String |
CLASS_TAG
Name of this class in xml schema. |
| Fields inherited from class org.qtitools.qti.node.item.interaction.Interaction |
|---|
ATTR_RESPONSE_IDENTIFIER_NAME, CLASS_TAG_SUFFIX, DISPLAY_NAME |
| Fields inherited from class org.qtitools.qti.node.content.BodyElement |
|---|
ATTR_CLASS_NAME, ATTR_ID_NAME, ATTR_LABEL_NAME, ATTR_LANG_NAME |
| Fields inherited from interface org.qtitools.qti.node.item.interaction.StringInteraction |
|---|
ATTR_BASE_DEFAULT_VALUE, ATTR_BASE_NAME, ATTR_EXPECTED_LENGTH_NAME, ATTR_PATTERN_MASK_NAME, ATTR_PLACEHOLDER_TEXT_NAME, ATTR_STRING_IDENTIFIER_NAME, KEY_EXPONENT_NAME, KEY_FLOAT_VALUE_NAME, KEY_INTEGER_VALUE_NAME, KEY_LEFT_DIGITS_NAME, KEY_NDP_NAME, KEY_NSF_NAME, KEY_RIGHT_DIGITS_NAME, KEY_STRING_VALUE_NAME |
| Fields inherited from interface org.qtitools.qti.node.content.basic.Block |
|---|
DISPLAY_NAME |
| Fields inherited from interface org.qtitools.qti.node.content.basic.Flow |
|---|
DISPLAY_NAME |
| Constructor Summary | |
|---|---|
ExtendedTextInteraction(XmlObject parent)
Construct new interaction. |
|
| Method Summary | |
|---|---|
java.lang.Integer |
getBase()
Gets value of base attribute. |
java.lang.String |
getClassTag()
Gets QTI class name of this node. |
java.lang.Integer |
getExpectedLength()
Gets value of expectedLength attribute. |
java.lang.Integer |
getExpectedLines()
Gets value of expectedLines attribute. |
TextFormat |
getFormat()
Gets value of format attribute. |
java.lang.Integer |
getMaxStrings()
Gets value of maxStrings attribute. |
java.lang.Integer |
getMinStrings()
Gets value of minStrings 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 |
processResponse(java.util.List<java.lang.String> responseList)
Given the user response to the interaction in the form of A string set the appropriate response variables. |
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 |
setExpectedLines(java.lang.Integer expectedLines)
Sets new value of expectedLines attribute. |
void |
setFormat(TextFormat format)
Sets new value of format attribute. |
void |
setMaxStrings(java.lang.Integer maxStrings)
Sets new value of maxStrings attribute. |
void |
setMinStrings(java.lang.Integer minStrings)
Sets new value of minStrings 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. |
ValidationResult |
validate()
Validates this object. |
boolean |
validateResponse()
Validate the response associated with this interaction Subclasses should override this method as required. |
| Methods inherited from class org.qtitools.qti.node.item.interaction.BlockInteraction |
|---|
getChildren, getPrompt, setPrompt |
| Methods inherited from class org.qtitools.qti.node.item.interaction.Interaction |
|---|
beforeProcessResponse, getResponseDeclaration, getResponseIdentifier, getShuffledOrder, initialize, processResponse, processResponse, setResponseIdentifier |
| Methods inherited from class org.qtitools.qti.node.content.BodyElement |
|---|
appendChild, evaluate, getClassAttr, getFirstChild, getId, getLabel, getLang, getLastChild, insertBefore, removeChild, replaceChild, search, search, search, setId, setLabel, setLang |
| Methods inherited from class org.qtitools.qti.node.AbstractObject |
|---|
getParent, getParentItem, getParentResult, getParentTest, setParent |
| Methods inherited from class org.qtitools.qti.node.AbstractNode |
|---|
attrToXmlString, bodyToXmlString, getAttributes, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validateAttributes, validateChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String CLASS_TAG
public static java.lang.String ATTR_MAX_STRINGS_NAME
public static java.lang.String ATTR_MIN_STRINGS_NAME
public static java.lang.Integer ATTR_MIN_STRINGS_DEFAULT_VALUE
public static java.lang.String ATTR_EXPECTED_LINES_NAME
public static java.lang.String ATTR_FORMAT_NAME
public static TextFormat ATTR_FORMAT_DEFAULT_VALUE
| Constructor Detail |
|---|
public ExtendedTextInteraction(XmlObject parent)
parent - Parent node| Method Detail |
|---|
public java.lang.String getClassTag()
XmlNodeQTI class name has very important role during loading/saving nodes.
For example: Java class name is AssessmentTest; QTI class name is assessmentTest.
getClassTag in interface XmlNodegetClassTag in class AbstractNodepublic void setMaxStrings(java.lang.Integer maxStrings)
maxStrings - new value of maxStrings attributegetMaxStrings()public java.lang.Integer getMaxStrings()
setMaxStrings(java.lang.Integer)public void setMinStrings(java.lang.Integer minStrings)
minStrings - new value of minStrings attributegetMinStrings()public java.lang.Integer getMinStrings()
setMinStrings(java.lang.Integer)public void setExpectedLines(java.lang.Integer expectedLines)
expectedLines - new value of expectedLines attributegetExpectedLines()public java.lang.Integer getExpectedLines()
setExpectedLines(java.lang.Integer)public void setFormat(TextFormat format)
format - new value of format attributegetFormat()public TextFormat getFormat()
setFormat(org.qtitools.qti.value.TextFormat)public java.lang.Integer getBase()
StringInteraction
getBase in interface StringInteractionStringInteraction.setBase(java.lang.Integer)public java.lang.Integer getExpectedLength()
StringInteraction
getExpectedLength in interface StringInteractionStringInteraction.setExpectedLength(java.lang.Integer)public java.lang.String getPatternMask()
StringInteraction
getPatternMask in interface StringInteractionStringInteraction.setPatternMask(java.lang.String)public java.lang.String getPlaceholderText()
StringInteraction
getPlaceholderText in interface StringInteractionStringInteraction.setPlaceholderText(java.lang.String)public java.lang.String getStringIdentifier()
StringInteraction
getStringIdentifier in interface StringInteractionStringInteraction.setStringIdentifier(java.lang.String)public void setBase(java.lang.Integer base)
StringInteraction
setBase in interface StringInteractionbase - new value of base attributeStringInteraction.getBase()public void setExpectedLength(java.lang.Integer expectedLength)
StringInteraction
setExpectedLength in interface StringInteractionexpectedLength - new value of expectedLength attributeStringInteraction.getExpectedLength()public void setPatternMask(java.lang.String patternMask)
StringInteraction
setPatternMask in interface StringInteractionpatternMask - new value of patternMask attributeStringInteraction.getPatternMask()public void setPlaceholderText(java.lang.String placeholderText)
StringInteraction
setPlaceholderText in interface StringInteractionplaceholderText - new value of placeholderText attributeStringInteraction.getPlaceholderText()public void setStringIdentifier(java.lang.String stringIdentifier)
StringInteraction
setStringIdentifier in interface StringInteractionstringIdentifier - new value of stringIdentifier attributeStringInteraction.getStringIdentifier()public ResponseDeclaration getStringIdentifierResponseDeclaration()
StringInteraction
getStringIdentifierResponseDeclaration in interface StringInteractionpublic ValidationResult validate()
Validatable
validate in interface Validatablevalidate in class Interactionpublic void processResponse(java.util.List<java.lang.String> responseList)
Interaction
processResponse in class InteractionresponseList - Response to processAssessmentItem.setResponses(java.util.Map>) public boolean validateResponse()
Interaction
validateResponse in class Interaction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||