org.qtitools.qti.node.test
Class Weight

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

public class Weight
extends AbstractObject

Weights allow custom values to be defined for scaling an item's outcomes.

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_IDENTIFIER_NAME
          Name of identifier attribute in xml schema.
static java.lang.String ATTR_VALUE_NAME
          Name of value attribute in xml schema.
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
static double DEFAULT_WEIGHT
          Default weight if no weight is specified.
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
Weight(AssessmentItemRef parent)
          Constructs object.
 
Method Summary
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.lang.String getIdentifier()
          Gets value of identifier attribute.
 java.lang.String getSimpleName()
          Gets simple name of this node.
 java.lang.Double getValue()
          Gets value of value attribute.
 void setIdentifier(java.lang.String identifier)
          Sets new value of identifier attribute.
 void setValue(java.lang.Double value)
          Sets new value of value attribute.
 
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, 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, 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_IDENTIFIER_NAME

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

See Also:
Constant Field Values

ATTR_VALUE_NAME

public static final java.lang.String ATTR_VALUE_NAME
Name of value attribute in xml schema.

See Also:
Constant Field Values

DEFAULT_WEIGHT

public static final double DEFAULT_WEIGHT
Default weight if no weight is specified.

See Also:
Constant Field Values
Constructor Detail

Weight

public Weight(AssessmentItemRef parent)
Constructs object.

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

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()

getIdentifier

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

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

setIdentifier

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

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

getValue

public java.lang.Double getValue()
Gets value of value attribute.

Returns:
value of value attribute
See Also:
setValue(java.lang.Double)

setValue

public void setValue(java.lang.Double value)
Sets new value of value attribute.

Parameters:
value - new value of value attribute
See Also:
getValue()


Copyright © 2009. All Rights Reserved.