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

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

public class PositionObjectInteraction
extends BlockInteraction

The position object interaction consists of a single image which must be positioned on another graphic image (the stage) by the candidate. Like selectPointInteraction, the associated response may have an areaMapping that scores the response on the basis of comparing it against predefined areas but the delivery engine must not indicate these areas of the stage. Only the actual position(s) selected by the candidate shall be indicated. The position object interaction must be bound to a response variable with a baseType of point and single or multiple cardinality. The point records the coordinates, with respect to the stage, of the center point of the image being positioned. Attribute : centerPoint [0..2]: integer The centerPoint attribute defines the point on the image being positioned that is to be treated as the center as an offset from the top-left corner of the image in horizontal, vertical order. By default this is the center of the image's bounding rectangle. The stage on which the image is to be positioned may be shared amongst several position object interactions and is therefore defined in a class of its own: positionObjectStage. Attribute : maxChoices [1]: integer = 1 The maximum number of positions (on the stage) that the image can be placed. If matchChoices is 0 there is no limit. If maxChoices is greater than 1 (or 0) then the interaction must be bound to a response with multiple cardinality. Attribute : minChoices [0..1]: integer The minimum number of positions that the image must be placed to form a valid response to the interaction. If specified, minChoices must be 1 or greater but must not exceed the limit imposed by maxChoices. Contains : object [1] The image to be positioned on the stage by the candidate.

Author:
Jonathon Hare
See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_CENTER_POINT_NAME
          Name of centerPoint attribute in xml schema.
static int ATTR_MAX_CHOICES_DEFAULT_VALUE
          Default value of maxChoices attribute .
static java.lang.String ATTR_MAX_CHOICES_NAME
          Name of maxChoices attribute in xml schema.
static java.lang.String ATTR_MIN_CHOICES_NAME
          Name of minChoices 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.content.basic.Block
DISPLAY_NAME
 
Fields inherited from interface org.qtitools.qti.node.content.basic.Flow
DISPLAY_NAME
 
Constructor Summary
PositionObjectInteraction(XmlObject parent)
          Constructs object.
 
Method Summary
 java.util.List<java.lang.Integer> getCenterPoint()
          Gets value of centerPoint attribute.
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.lang.Integer getMaxChoices()
          Gets value of maxChoices attribute.
 java.lang.Integer getMinChoices()
          Gets value of minChoices attribute.
 Object getObject()
          Gets object child.
 void setMaxChoices(java.lang.Integer maxChoices)
          Sets new value of maxChoices attribute.
 void setMinChoices(java.lang.Integer minChoices)
          Sets new value of minChoices attribute.
 void setObject(Object object)
          Sets new object child.
 ValidationResult validate()
          Validates this object.
 
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, 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
 

Field Detail

CLASS_TAG

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


ATTR_CENTER_POINT_NAME

public static java.lang.String ATTR_CENTER_POINT_NAME
Name of centerPoint attribute in xml schema.


ATTR_MAX_CHOICES_NAME

public static java.lang.String ATTR_MAX_CHOICES_NAME
Name of maxChoices attribute in xml schema.


ATTR_MAX_CHOICES_DEFAULT_VALUE

public static int ATTR_MAX_CHOICES_DEFAULT_VALUE
Default value of maxChoices attribute .


ATTR_MIN_CHOICES_NAME

public static java.lang.String ATTR_MIN_CHOICES_NAME
Name of minChoices attribute in xml schema.

Constructor Detail

PositionObjectInteraction

public PositionObjectInteraction(XmlObject parent)
Constructs object.

Parameters:
parent - parent of constructed object
Method Detail

getCenterPoint

public java.util.List<java.lang.Integer> getCenterPoint()
Gets value of centerPoint attribute.

Returns:
value of centerPoint attribute

setMaxChoices

public void setMaxChoices(java.lang.Integer maxChoices)
Sets new value of maxChoices attribute.

Parameters:
maxChoices - new value of maxChoices attribute
See Also:
getMaxChoices()

getMaxChoices

public java.lang.Integer getMaxChoices()
Gets value of maxChoices attribute.

Returns:
value of maxChoices attribute
See Also:
setMaxChoices(java.lang.Integer)

setMinChoices

public void setMinChoices(java.lang.Integer minChoices)
Sets new value of minChoices attribute.

Parameters:
minChoices - new value of minChoices attribute
See Also:
getMinChoices()

getMinChoices

public java.lang.Integer getMinChoices()
Gets value of minChoices attribute.

Returns:
value of minChoices attribute
See Also:
setMinChoices(java.lang.Integer)

getObject

public Object getObject()
Gets object child.

Returns:
object child
See Also:
setObject(org.qtitools.qti.node.content.xhtml.object.Object)

setObject

public void setObject(Object object)
Sets new object child.

Parameters:
object - new object child
See Also:
getObject()

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

validate

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

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


Copyright © 2009. All Rights Reserved.