org.qtitools.qti.node.expression
Interface ExpressionParent

All Superinterfaces:
java.io.Serializable, Validatable, XmlNode, XmlObject
All Known Subinterfaces:
Expression
All Known Implementing Classes:
AbstractExpression, AbstractJump, And, AnyN, BaseValue, BranchRule, ContainerSize, Contains, Correct, CustomOperator, Default, Delete, Divide, DurationGte, DurationLt, Equal, EqualRounded, FieldValue, Gt, Gte, Index, Inside, IntegerDivide, IntegerModulus, IntegerToFloat, IsNull, ItemSubset, LookupExpression, LookupOutcomeValue, LookupOutcomeValue, Lt, Lte, MapResponse, MapResponsePoint, Match, Member, Multiple, Not, Null, NumberCorrect, NumberIncorrect, NumberPresented, NumberResponded, NumberSelected, Or, Ordered, OutcomeConditionExpressionChild, OutcomeElseIf, OutcomeIf, OutcomeMaximum, OutcomeMinimum, OutcomeMinMax, PatternMatch, Power, PreCondition, ProcessOutcomeValue, ProcessResponseValue, ProcessTemplateValue, Product, Random, RandomEx, RandomExpression, RandomFloat, RandomFloatEx, RandomInteger, RandomIntegerEx, RecordEx, ResponseConditionExpressionChild, ResponseElseIf, ResponseIf, Round, SetCorrectResponse, SetDefaultValue, SetOutcomeValue, SetOutcomeValue, SetTemplateValue, StringMatch, Substring, Subtract, Sum, TemplateConditionExpressionChild, TemplateDefault, TemplateElseIf, TemplateIf, TestVariables, Truncate, Variable

public interface ExpressionParent
extends XmlObject

Every object which contains expression(s) must implement this interface. Expression contains (in general case) other expressions, so it must implement this interface too.

Author:
Jiri Kajaba

Field Summary
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Method Summary
 BaseType[] getRequiredBaseTypes(int index)
          Gets list of all acceptable baseTypes which can child expression at given position produce.
 Cardinality[] getRequiredCardinalities(int index)
          Gets list of all acceptable cardinalities which can child expression at given position produce.
 
Methods inherited from interface org.qtitools.qti.node.XmlObject
getParent, getParentItem, getParentResult, getParentTest, setParent
 
Methods inherited from interface org.qtitools.qti.node.XmlNode
getAttributes, getClassTag, getFullName, getNodeGroups, getParentRoot, getSimpleName, 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
 

Method Detail

getRequiredCardinalities

Cardinality[] getRequiredCardinalities(int index)
Gets list of all acceptable cardinalities which can child expression at given position produce.

For example delete expression returns single cardinality for index 0 and list of multiple and ordered cardinality for index 1.

Result of this method can change in time.

Static example is expression or. Expression or accepts only single cardinality for any index.

Dynamic example is expression match. Expression match accepts any cardinality of its children, but this cardinality must be same for all its children.

Parameters:
index - position of child expression in this parent
Returns:
list of all possible cardinalities which can child expression at given position produce

getRequiredBaseTypes

BaseType[] getRequiredBaseTypes(int index)
Gets list of all acceptable baseTypes which can child expression at given position produce.

Result of this method can change in time.

Static example is expression or. Expression or accepts only boolean baseType for any index.

Dynamic example is expression match. Expression match accepts any baseType of its children. but this baseType must be same for all its children.

Parameters:
index - position of child expression in this parent
Returns:
list of all acceptable baseTypes which can child expression at given position produce


Copyright © 2009. All Rights Reserved.