|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.attribute.AttributeList
public class AttributeList
Container for all attributes of one node.
| Field Summary | |
|---|---|
static java.lang.String |
ATTRIBUTES_SEPARATOR
Separator between two attributes (valid only if attributes are printed on one line). |
static int |
LINE_WRAP_LIMIT
Line wrap limit while printing attributes. |
| Constructor Summary | |
|---|---|
AttributeList(XmlNode parent)
Constructs container. |
|
| Method Summary | |
|---|---|
void |
add(Attribute attribute)
Adds given attribute into this container. |
void |
add(int index,
Attribute attribute)
Adds given attribute into this container at given position. |
void |
clear()
Removed all attributes (children) from this container. |
boolean |
contains(java.lang.String name)
Returns true if this container contains specified attribute; false otherwise. |
Attribute |
get(int index)
Gets attribute at given index. |
Attribute |
get(java.lang.String name)
Gets attribute with given name. |
BaseTypeAttribute |
getBaseTypeAttribute(java.lang.String name)
Gets attribute with given name. |
BooleanAttribute |
getBooleanAttribute(java.lang.String name)
Gets attribute with given name. |
CardinalityAttribute |
getCardinalityAttribute(java.lang.String name)
Gets attribute with given name. |
CoordsAttribute |
getCoordsAttribute(java.lang.String name)
Gets attribute with given name. |
DateAttribute |
getDateAttribute(java.lang.String name)
Gets attribute with given name. |
DurationAttribute |
getDurationAttribute(java.lang.String name)
Gets attribute with given name. |
FloatAttribute |
getFloatAttribute(java.lang.String name)
Gets attribute with given name. |
FloatMultipleAttribute |
getFloatMultipleAttribute(java.lang.String name)
Gets attribute with given name. |
IdentifierAttribute |
getIdentifierAttribute(java.lang.String name)
Gets attribute with given name. |
IdentifierMultipleAttribute |
getIdentifierMultipleAttribute(java.lang.String name)
Gets attribute with given name. |
IntegerAttribute |
getIntegerAttribute(java.lang.String name)
Gets attribute with given name. |
LongAttribute |
getLongAttribute(java.lang.String name)
Gets attribute with given name. |
NavigationModeAttribute |
getNavigationModeAttribute(java.lang.String name)
Gets attribute with given name. |
OrientationAttribute |
getOrientationAttribute(java.lang.String name)
Gets attribute with given name. |
ParamTypeAttribute |
getParamTypeAttribute(java.lang.String name)
Gets attribute with given name. |
XmlNode |
getParent()
Gets parent of this container. |
RoundingModeAttribute |
getRoundingModeAttribute(java.lang.String name)
Gets attribute with given name. |
SessionStatusAttribute |
getSessionStatusAttribute(java.lang.String name)
Gets attribute with given name. |
ShapeAttribute |
getShapeAttribute(java.lang.String name)
Gets attribute with given name. |
SingleValueAttribute |
getSingleValueAttribute(java.lang.String name)
Gets attribute with given name. |
StringAttribute |
getStringAttribute(java.lang.String name)
Gets attribute with given name. |
StringMultipleAttribute |
getStringMultipleAttribute(java.lang.String name)
Gets attribute with given name. |
SubmissionModeAttribute |
getSubmissionModeAttribuye(java.lang.String name)
Gets attribute with given name. |
TableCellScopeAttribute |
getTableCellScopeAttribute(java.lang.String name)
Gets attribute with given name. |
TestFeedbackAccessAttribute |
getTestFeedbackAttribute(java.lang.String name)
Gets attribute with given name. |
TextFormatAttribute |
getTextFormatAttribute(java.lang.String name)
Gets attribute with given name. |
ToleranceModeAttribute |
getToleranceModeAttribute(java.lang.String name)
Gets attribute with given name. |
UriAttribute |
getUriAttribute(java.lang.String name)
Gets attribute with given name. |
ViewMultipleAttribute |
getViewMultipleAttribute(java.lang.String name)
Gets attribute with given name. |
VisibilityModeAttribute |
getVisibilityModeAttribute(java.lang.String name)
Gets attribute with given name. |
java.util.Iterator<Attribute> |
iterator()
|
void |
load(org.w3c.dom.Node node)
Loads attribute's values from given source node. |
void |
remove(Attribute attribute)
Removes given attribute from this container. |
int |
size()
Gets number of attributes in this container. |
java.lang.String |
toXmlString(int depth,
boolean printDefaultValues)
Prints attributes into string. |
ValidationResult |
validate()
Validates this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTRIBUTES_SEPARATOR
public static final int LINE_WRAP_LIMIT
| Constructor Detail |
|---|
public AttributeList(XmlNode parent)
parent - parent of constructed container| Method Detail |
|---|
public XmlNode getParent()
public int size()
public void add(Attribute attribute)
throws QTIAttributeException
attribute - given attribute
QTIAttributeException - if container already contains attribute with same namepublic void remove(Attribute attribute)
attribute - given attribute
public void add(int index,
Attribute attribute)
throws QTIAttributeException
index - positionattribute - attribute
QTIAttributeException - if container already contains attribute with same namepublic void load(org.w3c.dom.Node node)
node - source nodepublic void clear()
public boolean contains(java.lang.String name)
name - attribute's name
public Attribute get(int index)
index - index of requested attribute
public Attribute get(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not foundpublic java.util.Iterator<Attribute> iterator()
iterator in interface java.lang.Iterable<Attribute>
public java.lang.String toXmlString(int depth,
boolean printDefaultValues)
depth - left indent (used only if printed line is too long)printDefaultValues - if true, prints all attributes; if false, prints only attributes with not default values
public ValidationResult validate()
Validatable
validate in interface Validatable
public BaseTypeAttribute getBaseTypeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public BooleanAttribute getBooleanAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public CardinalityAttribute getCardinalityAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public DateAttribute getDateAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public DurationAttribute getDurationAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public FloatAttribute getFloatAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public FloatMultipleAttribute getFloatMultipleAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public IdentifierAttribute getIdentifierAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public IdentifierMultipleAttribute getIdentifierMultipleAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public IntegerAttribute getIntegerAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public CoordsAttribute getCoordsAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public LongAttribute getLongAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public NavigationModeAttribute getNavigationModeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public RoundingModeAttribute getRoundingModeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public SessionStatusAttribute getSessionStatusAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public ShapeAttribute getShapeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public SingleValueAttribute getSingleValueAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public StringAttribute getStringAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public StringMultipleAttribute getStringMultipleAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public SubmissionModeAttribute getSubmissionModeAttribuye(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public TestFeedbackAccessAttribute getTestFeedbackAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public ToleranceModeAttribute getToleranceModeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public UriAttribute getUriAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public ViewMultipleAttribute getViewMultipleAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public VisibilityModeAttribute getVisibilityModeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public OrientationAttribute getOrientationAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public ParamTypeAttribute getParamTypeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public TableCellScopeAttribute getTableCellScopeAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
public TextFormatAttribute getTextFormatAttribute(java.lang.String name)
throws QTIAttributeException
name - name of requested attribute
QTIAttributeException - if attribute is not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||