org.qtitools.qti.node.item.interaction
Class GraphicAssociateInteraction

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.content.BodyElement
              extended by org.qtitools.qti.node.item.interaction.Interaction
                  extended by org.qtitools.qti.node.item.interaction.BlockInteraction
                      extended by org.qtitools.qti.node.item.interaction.GraphicInteraction
                          extended by org.qtitools.qti.node.item.interaction.GraphicAssociateInteraction
All Implemented Interfaces:
java.io.Serializable, Block, Flow, ObjectFlow, ChoiceContainer, AssociableHotspotContainer, XmlNode, XmlObject, Validatable

public class GraphicAssociateInteraction
extends GraphicInteraction
implements AssociableHotspotContainer

A graphic associate interaction is a graphic interaction with a corresponding set of choices that are defined as areas of the graphic image. The candidate's task is to associate the areas (hotspots) with each other. The graphic associate interaction should only be used when the graphical relationship of the choices with respect to each other (as represented by the graphic image) is important to the needs of the item. Otherwise, associateInteraction should be used instead with separate Material for each option. The delivery engine must clearly indicate all defined area(s) of the image. The associateHotspotInteraction must be bound to a response variable with base-type pair and either single or multiple cardinality. Attribute : maxAssociations [1]: integer = 1 The maximum number of associations that the candidate is allowed to make. If maxAssociations is 0 there is no restriction. If maxAssociations is greater than 1 (or 0) then the interaction must be bound to a response with multiple cardinality. Contains : associableHotspot [1..*] The hotspots that define the choices that are to be associated by the candidate. If the delivery system does not support pointer-based selection then the order in which the choices are given must be the order in which they are offered to the candidate for selection. For example, the 'tab order' in simple keyboard navigation.

Author:
Jonathon Hare
See Also:
Serialized Form

Field Summary
static int ATTR_MAX_ASSOCIATIONS_DEFAULT_VALUE
          Default value of maxAssociations attribute.
static java.lang.String ATTR_MAX_ASSOCIATIONS_NAME
          Name of maxAssociations 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.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
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
GraphicAssociateInteraction(XmlObject parent)
          Construct new interaction.
 
Method Summary
 AssociableHotspot getAssociableHotspot(java.lang.String identifier)
          Gets associableHotspot child with given identifier or null.
 java.util.List<AssociableHotspot> getAssociableHotspots()
          Gets associableHotspot children.
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.lang.Integer getMaxAssociations()
          Gets value of maxAssociations attribute.
 void setMaxAssociations(java.lang.Integer maxAssociations)
          Sets new value of maxAssociations attribute.
 ValidationResult validate()
          Validates this object.
 
Methods inherited from class org.qtitools.qti.node.item.interaction.GraphicInteraction
getChildren, getObject, setObject
 
Methods inherited from class org.qtitools.qti.node.item.interaction.BlockInteraction
getPrompt, setPrompt
 
Methods inherited from class org.qtitools.qti.node.item.interaction.Interaction
beforeProcessResponse, getResponseDeclaration, getResponseIdentifier, getShuffledOrder, initialize, processResponse, processResponse, processResponse, setResponseIdentifier, validateResponse
 
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
 
Methods inherited from interface org.qtitools.qti.node.XmlNode
getAttributes, getFullName, getNodeGroups, getParent, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString
 

Field Detail

CLASS_TAG

public static java.lang.String CLASS_TAG
Name of this class in xml schema.


ATTR_MAX_ASSOCIATIONS_NAME

public static java.lang.String ATTR_MAX_ASSOCIATIONS_NAME
Name of maxAssociations attribute in xml schema.


ATTR_MAX_ASSOCIATIONS_DEFAULT_VALUE

public static int ATTR_MAX_ASSOCIATIONS_DEFAULT_VALUE
Default value of maxAssociations attribute.

Constructor Detail

GraphicAssociateInteraction

public GraphicAssociateInteraction(XmlObject parent)
Construct new interaction.

Parameters:
parent - Parent node
Method Detail

setMaxAssociations

public void setMaxAssociations(java.lang.Integer maxAssociations)
Sets new value of maxAssociations attribute.

Parameters:
maxAssociations - new value of maxAssociations attribute
See Also:
getMaxAssociations()

getMaxAssociations

public java.lang.Integer getMaxAssociations()
Gets value of maxAssociations attribute.

Returns:
value of maxAssociations attribute
See Also:
setMaxAssociations(java.lang.Integer)

getAssociableHotspots

public java.util.List<AssociableHotspot> getAssociableHotspots()
Gets associableHotspot children.

Returns:
associableHotspot children

getAssociableHotspot

public AssociableHotspot getAssociableHotspot(java.lang.String identifier)
Gets associableHotspot child with given identifier or null.

Parameters:
identifier - given identifier
Returns:
associableHotspot with given identifier or null

validate

public ValidationResult validate()
Description copied from interface: Validatable
Validates this object.

Specified by:
validate in interface Validatable
Overrides:
validate in class GraphicInteraction
Returns:
validation result

getClassTag

public java.lang.String getClassTag()
Description copied from interface: XmlNode
Gets QTI class name of this node.

QTI class name has very important role during loading/saving nodes.

For example: Java class name is AssessmentTest; QTI class name is assessmentTest.

Specified by:
getClassTag in interface XmlNode
Specified by:
getClassTag in class AbstractNode
Returns:
QTI class name of this node


Copyright © 2009. All Rights Reserved.