org.qtitools.qti.node.expression.outcome
Class ItemSubset

java.lang.Object
  extended by org.qtitools.qti.node.AbstractNode
      extended by org.qtitools.qti.node.AbstractObject
          extended by org.qtitools.qti.node.expression.AbstractExpression
              extended by org.qtitools.qti.node.expression.outcome.ItemSubset
All Implemented Interfaces:
java.io.Serializable, Expression, ExpressionParent, XmlNode, XmlObject, Validatable
Direct Known Subclasses:
NumberCorrect, NumberIncorrect, NumberPresented, NumberResponded, NumberSelected, OutcomeMinMax, TestVariables

public abstract class ItemSubset
extends AbstractExpression

This class defines the concept of A sub-set of the items selected in an assessmentTest. The attributes define criteria that must be matched by all members of the sub-set. It is used to control A number of expressions in outcomeProcessing for returning information about the test as A whole, or arbitrary subsets of it.

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
static java.util.List<java.lang.String> ATTR_EXCLUDE_CATEGORIES_DEFAULT_VALUE
          Default value of excludeCategory attribute.
static java.lang.String ATTR_EXCLUDE_CATEGORIES_NAME
          Name of excludeCategory attribute in xml schema.
static java.lang.String ATTR_IDENTIFIER_DEFAULT_VALUE
          Default value of identifier attribute.
static java.lang.String ATTR_IDENTIFIER_NAME
          Name of identifier attribute in xml schema.
static java.util.List<java.lang.String> ATTR_INCLUDE_CATEGORIES_DEFAULT_VALUE
          Default value of includeCategory attribute.
static java.lang.String ATTR_INCLUDE_CATEGORIES_NAME
          Name of includeCategory attribute in xml schema.
 
Fields inherited from class org.qtitools.qti.node.expression.AbstractExpression
logger
 
Fields inherited from interface org.qtitools.qti.node.expression.Expression
DISPLAY_NAME
 
Fields inherited from interface org.qtitools.qti.node.XmlNode
INDENT, NEW_LINE, SIMPLE_NAME_INNER_SEPARATOR, SIMPLE_NAMES_SEPARATOR
 
Constructor Summary
ItemSubset(ExpressionParent parent)
          Constructs expression.
 
Method Summary
 java.util.List<java.lang.String> getExcludeCategories()
          Gets value of excludeCategory attribute.
 java.lang.String getIdentifier()
          Gets value of identifier attribute.
 java.util.List<java.lang.String> getIncludeCategories()
          Gets value of includeCategory attribute.
 boolean isVariable()
          Returns true if value of evaluation can change every evaluation call; false otherwise.
protected  java.util.List<AssessmentItemRef> lookupItemRefs()
          Gets list of all items references which fulfils requirements (sectionIdentifier, includeCategory, excludeCategory).
 void setIdentifier(java.lang.String identifier)
          Sets new value of identifier attribute.
 ValidationResult validate()
          Validates this object.
protected  ValidationResult validateAttributes()
          Validates attributes of this node.
 
Methods inherited from class org.qtitools.qti.node.expression.AbstractExpression
evaluate, evaluateSelf, getBaseType, getCardinality, getChildren, getFirstChild, getParent, getParentRequiredBaseTypes, getParentRequiredCardinalities, getProducedBaseTypes, getProducedCardinalities, getProducedNumericalBaseTypes, getRequiredBaseTypes, getRequiredCardinalities, getRequiredSameBaseTypes, getRequiredSameCardinalities, getSecondChild, getType, getValue, isAnyChildNull, isNull, reset, toString
 
Methods inherited from class org.qtitools.qti.node.AbstractObject
getParentItem, getParentResult, getParentTest, setParent
 
Methods inherited from class org.qtitools.qti.node.AbstractNode
attrToXmlString, bodyToXmlString, getAttributes, getClassTag, getFullName, getIndent, getNode, getNode, getNode, getNodeGroups, getParentRoot, getSimpleName, getSourceFile, getSourceNode, getSourceString, getSourceUrl, hasChildNodes, load, load, load, load, loadAttributes, readChild, readChildren, setParent, setSourceFile, setSourceNode, setSourceString, setSourceUrl, toXmlString, toXmlString, validateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.qtitools.qti.node.XmlObject
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
 

Field Detail

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_IDENTIFIER_DEFAULT_VALUE

public static final java.lang.String ATTR_IDENTIFIER_DEFAULT_VALUE
Default value of identifier attribute.


ATTR_INCLUDE_CATEGORIES_NAME

public static final java.lang.String ATTR_INCLUDE_CATEGORIES_NAME
Name of includeCategory attribute in xml schema.

See Also:
Constant Field Values

ATTR_INCLUDE_CATEGORIES_DEFAULT_VALUE

public static final java.util.List<java.lang.String> ATTR_INCLUDE_CATEGORIES_DEFAULT_VALUE
Default value of includeCategory attribute.


ATTR_EXCLUDE_CATEGORIES_NAME

public static final java.lang.String ATTR_EXCLUDE_CATEGORIES_NAME
Name of excludeCategory attribute in xml schema.

See Also:
Constant Field Values

ATTR_EXCLUDE_CATEGORIES_DEFAULT_VALUE

public static final java.util.List<java.lang.String> ATTR_EXCLUDE_CATEGORIES_DEFAULT_VALUE
Default value of excludeCategory attribute.

Constructor Detail

ItemSubset

public ItemSubset(ExpressionParent parent)
Constructs expression.

Parameters:
parent - parent of this expression
Method Detail

isVariable

public boolean isVariable()
Description copied from interface: Expression
Returns true if value of evaluation can change every evaluation call; false otherwise. It checks this expression and all of its children (if any child is variable, this expression becomes variable too). Example of variable expressions: variable and outcome expressions.

Specified by:
isVariable in interface Expression
Overrides:
isVariable in class AbstractExpression
Returns:
true if value of evaluation can change every evaluation call; false otherwise

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

getIncludeCategories

public java.util.List<java.lang.String> getIncludeCategories()
Gets value of includeCategory attribute.

Returns:
value of includeCategory attribute

getExcludeCategories

public java.util.List<java.lang.String> getExcludeCategories()
Gets value of excludeCategory attribute.

Returns:
value of excludeCategory attribute

validateAttributes

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

Overrides:
validateAttributes in class AbstractNode
Returns:
result of validation

validate

public ValidationResult validate()
Description copied from interface: Validatable
Validates this object.

Specified by:
validate in interface Validatable
Overrides:
validate in class AbstractExpression
Returns:
validation result

lookupItemRefs

protected java.util.List<AssessmentItemRef> lookupItemRefs()
Gets list of all items references which fulfils requirements (sectionIdentifier, includeCategory, excludeCategory).

Returns:
list of all items references which fulfils requirements (sectionIdentifier, includeCategory, excludeCategory)


Copyright © 2009. All Rights Reserved.