|
||||||||||
| 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
public abstract class Interaction
Interactions allow the candidate to interact with the item. Through an interaction, the candidate selects or constructs A response. The candidate's responses are stored in the response variables. Each interaction is associated with (at least) one response variable.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_RESPONSE_IDENTIFIER_NAME
Name of responseIdentifier attribute in xml schema. |
static java.lang.String |
CLASS_TAG_SUFFIX
All interactions in xml schema end in "Interaction" |
static java.lang.String |
DISPLAY_NAME
Display name of this class. |
| 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.XmlNode |
|---|
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR |
| Constructor Summary | |
|---|---|
Interaction(XmlObject parent)
Construct new interaction. |
|
| Method Summary | |
|---|---|
void |
beforeProcessResponse()
Perform any required processing for the interaction immediately before processResponse is called. |
ResponseDeclaration |
getResponseDeclaration()
Gets the responseDeclaration for this interaction. |
java.lang.String |
getResponseIdentifier()
Gets value of responseIdentifier attribute. |
java.util.List<java.lang.String> |
getShuffledOrder()
If the interaction supports shuffling, then this method should return an ordered list of the shuffled elements' identifiers. |
void |
initialize()
Initialize the interaction. |
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. |
protected Value |
processResponse(java.util.List<java.lang.String> responseList,
ResponseDeclaration responseDeclaration)
|
void |
processResponse(java.lang.String responseString)
Given the user response to the interaction in the form of A string set the appropriate response variables. |
void |
setResponseIdentifier(java.lang.String responseIdentifier)
Sets new value of responseIdentifier 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.content.BodyElement |
|---|
appendChild, evaluate, getChildren, 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, getClassTag, 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 |
| Methods inherited from interface org.qtitools.qti.node.XmlNode |
|---|
getAttributes, getClassTag, getFullName, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString |
| Field Detail |
|---|
public static final java.lang.String DISPLAY_NAME
public static final java.lang.String ATTR_RESPONSE_IDENTIFIER_NAME
public static final java.lang.String CLASS_TAG_SUFFIX
| Constructor Detail |
|---|
public Interaction(XmlObject parent)
parent - Parent node| Method Detail |
|---|
public java.lang.String getResponseIdentifier()
setResponseIdentifier(java.lang.String)public void setResponseIdentifier(java.lang.String responseIdentifier)
responseIdentifier - new value of responseIdentifier attributegetResponseIdentifier()public ResponseDeclaration getResponseDeclaration()
public ValidationResult validate()
Validatable
validate in interface Validatablevalidate in class AbstractNodepublic boolean validateResponse()
public void initialize()
public void beforeProcessResponse()
public void processResponse(java.lang.String responseString)
responseString - the string form of the responsepublic void processResponse(java.util.List<java.lang.String> responseList)
responseList - Response to processAssessmentItem.setResponses(java.util.Map>)
protected Value processResponse(java.util.List<java.lang.String> responseList,
ResponseDeclaration responseDeclaration)
public java.util.List<java.lang.String> getShuffledOrder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||