org.qtitools.qti.node.content.basic
Class TextRun

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.content.basic.TextRun
All Implemented Interfaces:
java.io.Serializable, Flow, FlowStatic, Inline, InlineStatic, ObjectFlow, TextOrVariable, XmlNode, XmlObject, Validatable

public class TextRun
extends AbstractObject
implements FlowStatic, InlineStatic, TextOrVariable

Text content block. Contains only text content and no children.

Author:
Jonathon Hare
See Also:
Serialized Form

Field Summary
static java.lang.String DISPLAY_NAME
          Display name of this class.
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
TextRun(XmlObject parent, java.lang.String textContent)
          Constructs block.
 
Method Summary
 java.lang.String getClassTag()
          Gets QTI class name of this node.
 java.lang.String getTextContent()
          Gets text content of this block.
 void load(org.w3c.dom.Node sourceNode)
          Loads this node from given source node (DOM).
 java.lang.String toXmlString(int depth, boolean printDefaultAttributes)
          Prints this node and all its children into string.
 
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, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, 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, getParent, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString
 
Methods inherited from interface org.qtitools.qti.validation.Validatable
validate
 

Field Detail

DISPLAY_NAME

public static java.lang.String DISPLAY_NAME
Display name of this class.

Constructor Detail

TextRun

public TextRun(XmlObject parent,
               java.lang.String textContent)
Constructs block.

Parameters:
parent - parent of this block
textContent - text content of this block
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

getTextContent

public java.lang.String getTextContent()
Gets text content of this block.

Returns:
text content of this block

toXmlString

public java.lang.String toXmlString(int depth,
                                    boolean printDefaultAttributes)
Description copied from interface: XmlNode
Prints this node and all its children into string.

Specified by:
toXmlString in interface XmlNode
Overrides:
toXmlString in class AbstractNode
Parameters:
depth - indent (0 = no indent)
printDefaultAttributes - whether print attribute's default values
Returns:
xml string of this node and all its children
See Also:
XmlNode.toXmlString()

load

public void load(org.w3c.dom.Node sourceNode)
Description copied from interface: XmlNode
Loads this node from given source node (DOM).

Specified by:
load in interface XmlNode
Overrides:
load in class AbstractNode
Parameters:
sourceNode - source node (DOM) for this node


Copyright © 2009. All Rights Reserved.