org.qtitools.qti.node.test
Class TestFeedback

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.test.TestFeedback
All Implemented Interfaces:
java.io.Serializable, XmlNode, XmlObject, Validatable

public class TestFeedback
extends AbstractObject

Test level feedback implementation.

Author:
Jiri Kajaba
See Also:
TestFeedbackAccess, VisibilityMode, Serialized Form

Field Summary
static java.lang.String ATTR_ACCESS_NAME
          Name of access attribute in xml schema.
static java.lang.String ATTR_OUTCOME_IDENTIFIER_NAME
          Name of outcomeIdentifier attribute in xml schema.
static java.lang.String ATTR_OUTCOME_VALUE_NAME
          Name of identifier attribute in xml schema.
static java.lang.String ATTR_TITLE_DEFAULT_VALUE
          Default value of title attribute.
static java.lang.String ATTR_TITLE_NAME
          Name of title attribute in xml schema.
static java.lang.String ATTR_VISIBILITY_MODE_NAME
          Name of showHide attribute in xml schema.
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
TestFeedback(ControlObject parent)
          Constructs feedback.
 
Method Summary
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.lang.String getOutcomeIdentifier()
          Gets value of outcomeIdentifier attribute.
 java.lang.String getOutcomeValue()
          Gets value of identifier attribute.
 java.lang.String getSimpleName()
          Gets simple name of this node.
 TestFeedbackAccess getTestFeedbackAccess()
          Gets value of access attribute.
 java.lang.String getTitle()
          Gets value of title attribute.
 VisibilityMode getVisibilityMode()
          Gets value of showHide attribute.
 boolean isVisible(TestFeedbackAccess requestedAccess)
          Returns true if this feedback can be displayed for given requested access; false otherwise.
 void setOutcomeIdentifier(java.lang.String outcomeIdentifier)
          Sets new value of outcomeIdentifier attribute.
 void setOutcomeValue(java.lang.String outcomeValue)
          Sets new value of identifier attribute.
 void setTestFeedbackAccess(TestFeedbackAccess testFeedbackAccess)
          Sets new value of access attribute.
 void setTitle(java.lang.String title)
          Sets new value of title attribute.
 void setVisibilityMode(VisibilityMode visibilityMode)
          Sets new value of showHide attribute.
protected  ValidationResult validateAttributes()
          Validates attributes of this node.
protected  ValidationResult validateChildren()
          Validates children (body) of this node.
 
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, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validate
 
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, getParentRoot, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString
 
Methods inherited from interface org.qtitools.qti.validation.Validatable
validate
 

Field Detail

CLASS_TAG

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

See Also:
Constant Field Values

ATTR_ACCESS_NAME

public static final java.lang.String ATTR_ACCESS_NAME
Name of access attribute in xml schema.

See Also:
Constant Field Values

ATTR_VISIBILITY_MODE_NAME

public static final java.lang.String ATTR_VISIBILITY_MODE_NAME
Name of showHide attribute in xml schema.

See Also:
Constant Field Values

ATTR_OUTCOME_IDENTIFIER_NAME

public static final java.lang.String ATTR_OUTCOME_IDENTIFIER_NAME
Name of outcomeIdentifier attribute in xml schema.

See Also:
Constant Field Values

ATTR_OUTCOME_VALUE_NAME

public static final java.lang.String ATTR_OUTCOME_VALUE_NAME
Name of identifier attribute in xml schema.

See Also:
Constant Field Values

ATTR_TITLE_NAME

public static final java.lang.String ATTR_TITLE_NAME
Name of title attribute in xml schema.

See Also:
Constant Field Values

ATTR_TITLE_DEFAULT_VALUE

public static final java.lang.String ATTR_TITLE_DEFAULT_VALUE
Default value of title attribute.

Constructor Detail

TestFeedback

public TestFeedback(ControlObject parent)
Constructs feedback.

Parameters:
parent - parent of constructed feedback
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

getSimpleName

public java.lang.String getSimpleName()
Description copied from interface: XmlNode
Gets simple name of this node. Simple name contains QTI class name and some additional information to help identify node (if these informations are available).

Simple name is not so important like QTI class name. It servers mostly for displaying informations and in messages.

For example: simple name can be assessmentTest:Test (QTI class name (assessmentTest) + identifier (Test)).

Specified by:
getSimpleName in interface XmlNode
Overrides:
getSimpleName in class AbstractNode
Returns:
simple name of this node
See Also:
XmlNode.getFullName()

getTestFeedbackAccess

public TestFeedbackAccess getTestFeedbackAccess()
Gets value of access attribute.

Returns:
value of access attribute
See Also:
setTestFeedbackAccess(org.qtitools.qti.node.test.TestFeedbackAccess)

setTestFeedbackAccess

public void setTestFeedbackAccess(TestFeedbackAccess testFeedbackAccess)
Sets new value of access attribute.

Parameters:
testFeedbackAccess - new value of access attribute
See Also:
getTestFeedbackAccess()

getVisibilityMode

public VisibilityMode getVisibilityMode()
Gets value of showHide attribute.

Returns:
value of showHide attribute
See Also:
setVisibilityMode(org.qtitools.qti.node.test.VisibilityMode)

setVisibilityMode

public void setVisibilityMode(VisibilityMode visibilityMode)
Sets new value of showHide attribute.

Parameters:
visibilityMode - new value of showHide attribute
See Also:
getVisibilityMode()

getOutcomeIdentifier

public java.lang.String getOutcomeIdentifier()
Gets value of outcomeIdentifier attribute.

Returns:
value of outcomeIdentifier attribute
See Also:
setOutcomeIdentifier(java.lang.String)

setOutcomeIdentifier

public void setOutcomeIdentifier(java.lang.String outcomeIdentifier)
Sets new value of outcomeIdentifier attribute.

Parameters:
outcomeIdentifier - new value of outcomeIdentifier attribute
See Also:
getOutcomeIdentifier()

getOutcomeValue

public java.lang.String getOutcomeValue()
Gets value of identifier attribute.

Returns:
value of identifier attribute
See Also:
setOutcomeValue(java.lang.String)

setOutcomeValue

public void setOutcomeValue(java.lang.String outcomeValue)
Sets new value of identifier attribute.

Parameters:
outcomeValue - new value of identifier attribute
See Also:
getOutcomeValue()

getTitle

public java.lang.String getTitle()
Gets value of title attribute.

Returns:
value of title attribute
See Also:
setTitle(java.lang.String)

setTitle

public void setTitle(java.lang.String title)
Sets new value of title attribute.

Parameters:
title - new value of title attribute
See Also:
getTitle()

validateAttributes

protected ValidationResult validateAttributes()
Description copied from class: AbstractNode
Validates attributes of this node.

Overrides:
validateAttributes in class AbstractNode
Returns:
result of validation

validateChildren

protected ValidationResult validateChildren()
Description copied from class: AbstractNode
Validates children (body) of this node.

Overrides:
validateChildren in class AbstractNode
Returns:
result of validation

isVisible

public boolean isVisible(TestFeedbackAccess requestedAccess)
Returns true if this feedback can be displayed for given requested access; false otherwise.

Parameters:
requestedAccess - given requested access
Returns:
true if this feedback can be displayed for given requested access; false otherwise


Copyright © 2009. All Rights Reserved.