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

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.GraphicGapMatchInteraction
All Implemented Interfaces:
java.io.Serializable, Block, Flow, ObjectFlow, ChoiceContainer, AssociableHotspotContainer, XmlNode, XmlObject, Validatable

public class GraphicGapMatchInteraction
extends GraphicInteraction
implements AssociableHotspotContainer

A graphic gap-match interaction is a graphical interaction with a set of gaps that are defined as areas (hotspots) of the graphic image and an additional set of gap choices that are defined outside the image. The candidate must associate the gap choices with the gaps in the image and be able to review the image with the gaps filled in context, as indicated by their choices. Care should be taken when designing these interactions to ensure that the gaps in the image are a suitable size to receive the required gap choices. It must be clear to the candidate which hotspot each choice has been associated with. When associated, choices must appear wholly inside the gaps if at all possible and, where overlaps are required, should not hide each other completely. If the candidate indicates the association by positioning the choice over the gap (e.g., drag and drop) the system should 'snap' it to the nearest position that satisfies these requirements. The graphicGapMatchInteraction must be bound to a response variable with base-type directedPair and multiple cardinality. The choices represent the source of the pairing and the gaps in the image (the hotspots) the targets. Unlike the simple gapMatchInteraction, each gap can have several choices associated with it if desired, furthermore, the same choice may be associated with an associableHotspot multiple times, in which case the corresponding directed pair appears multiple times in the value of the response variable. Contains : gapImg [1..*] An ordered list of choices for filling the gaps. There may be fewer choices than gaps if required. Contains : associableHotspot [1..*] The hotspots that define the gaps that are to be filled by the candidate. If the delivery system does not support pointer-based selection then the order in which the gaps is given must be the order in which they are offered to the candidate for selection. For example, the 'tab order' in simple keyboard navigation. The default hotspot must not be defined.

Author:
Jonathon Hare
See Also:
Serialized Form

Field Summary
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
GraphicGapMatchInteraction(XmlObject parent)
          Constructs object.
 
Method Summary
 java.util.List<AssociableHotspot> getAssociableHotspots()
          Gets associableHotspot children.
 java.util.List<? extends XmlNode> getChildren()
          Gets an unmodifiable list of the child elements.
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.util.List<GapImg> getGapImgs()
          Gets gapImg children.
 ValidationResult validate()
          Validates this object.
 
Methods inherited from class org.qtitools.qti.node.item.interaction.GraphicInteraction
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.

Constructor Detail

GraphicGapMatchInteraction

public GraphicGapMatchInteraction(XmlObject parent)
Constructs object.

Parameters:
parent - parent of constructed object
Method Detail

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

getGapImgs

public java.util.List<GapImg> getGapImgs()
Gets gapImg children.

Returns:
gapImg children

getAssociableHotspots

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

Returns:
associableHotspot children

getChildren

public java.util.List<? extends XmlNode> getChildren()
Gets an unmodifiable list of the child elements. Use the other methods on ChoiceInteraction to add children to the correct group.

Overrides:
getChildren in class GraphicInteraction
Returns:
List of child nodes

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


Copyright © 2009. All Rights Reserved.