|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.node.AbstractNode
org.qtitools.qti.node.AbstractObject
org.qtitools.qti.node.UniqueObject
org.qtitools.qti.node.shared.VariableDeclaration
public abstract class VariableDeclaration
Item variables are declared by variable declarations. All variables must be declared except for the built-in session variables which are declared implicitly and must not be declared. The purpose of the declaration is to associate an identifier with the variable and to identify the runtime type of the variable's value.
| Field Summary | |
|---|---|
static BaseType |
ATTR_BASE_TYPE_DEFAULT_VALUE
Default value of baseType attribute. |
static java.lang.String |
ATTR_BASE_TYPE_NAME
Name of baseType attribute in xml schema. |
static java.lang.String |
ATTR_CARDINALITY_NAME
Name of cardinality attribute in xml schema. |
| Fields inherited from class org.qtitools.qti.node.UniqueObject |
|---|
ATTR_IDENTIFIER_NAME |
| Fields inherited from interface org.qtitools.qti.node.XmlNode |
|---|
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR |
| Constructor Summary | |
|---|---|
VariableDeclaration(UniqueObject parent)
Creates object. |
|
| Method Summary | |
|---|---|
BaseType |
getBaseType()
Gets value of baseType attribute. |
Cardinality |
getCardinality()
Gets value of cardinality attribute. |
DefaultValue |
getDefaultValue()
Gets defaultValue child. |
Value |
getValue()
Gets value of this variableDeclaration. |
void |
resetValue()
Resets value of this variableDeclaration to default. |
void |
setBaseType(BaseType baseType)
Sets new value of baseType attribute. |
void |
setCardinality(Cardinality cardinality)
Sets new value of cardinality attribute. |
void |
setDefaultValue(DefaultValue defaultValue)
Sets new defaultValue child. |
void |
setValue(Value value)
Sets new value of this variableDeclaration. |
protected ValidationResult |
validateAttributes()
Validates attributes of this node. |
| Methods inherited from class org.qtitools.qti.node.UniqueObject |
|---|
getIdentifier, getSimpleName, setIdentifier |
| 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, getClassTag, 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, 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, getClassTag, 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 |
|---|
public static final java.lang.String ATTR_CARDINALITY_NAME
public static final java.lang.String ATTR_BASE_TYPE_NAME
public static final BaseType ATTR_BASE_TYPE_DEFAULT_VALUE
| Constructor Detail |
|---|
public VariableDeclaration(UniqueObject parent)
parent - parent of this object| Method Detail |
|---|
public Cardinality getCardinality()
setCardinality(org.qtitools.qti.value.Cardinality)public void setCardinality(Cardinality cardinality)
cardinality - new value of cardinality attributegetCardinality()public BaseType getBaseType()
setBaseType(org.qtitools.qti.value.BaseType)public void setBaseType(BaseType baseType)
baseType - new value of baseType attributegetBaseType()public DefaultValue getDefaultValue()
setDefaultValue(org.qtitools.qti.node.shared.declaration.DefaultValue)public void setDefaultValue(DefaultValue defaultValue)
defaultValue - new defaultValue childgetDefaultValue()public Value getValue()
setValue(org.qtitools.qti.value.Value)public void setValue(Value value)
value - new value of this variableDeclarationgetValue()public void resetValue()
protected ValidationResult validateAttributes()
AbstractNode
validateAttributes in class UniqueObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||