|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.attribute.AbstractAttribute
org.qtitools.qti.attribute.SingleAttribute
public abstract class SingleAttribute
Implementation of attribute with single value (normal attribute).
| Field Summary |
|---|
| Fields inherited from class org.qtitools.qti.attribute.AbstractAttribute |
|---|
logger |
| Constructor Summary | |
|---|---|
SingleAttribute(XmlNode parent,
java.lang.String name)
Constructs attribute. |
|
SingleAttribute(XmlNode parent,
java.lang.String name,
java.lang.Object defaultValue)
Constructs attribute. |
|
SingleAttribute(XmlNode parent,
java.lang.String name,
java.lang.Object value,
java.lang.Object defaultValue,
boolean required)
Constructs attribute. |
|
| Method Summary | |
|---|---|
java.lang.String |
defaultValueToString()
Gets attribute's defaultValue converted to string. |
java.lang.Object |
getDefaultValue()
Gets default value of attribute. |
java.lang.Object |
getValue()
Gets value of attribute. |
void |
load(org.w3c.dom.Node node)
Loads attribute's value from given source node. |
void |
load(java.lang.String value)
Loads attribute's value from given source string. |
protected abstract java.lang.Object |
parseValue(java.lang.String value)
Parses value from given string. |
protected void |
setDefaultValue(java.lang.Object defaultValue)
Sets new default value of attribute. |
protected void |
setValue(java.lang.Object value)
Sets new value of attribute. |
java.lang.String |
valueToString()
Gets attribute's value converted to string. |
| Methods inherited from class org.qtitools.qti.attribute.AbstractAttribute |
|---|
getFullName, getLoadedValue, getLoadingProblem, getName, getParent, isRequired, isSupported, setLoadedValue, setLoadingProblem, setSupported, toString, toXmlString, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SingleAttribute(XmlNode parent,
java.lang.String name)
parent - attribute's parentname - attribute's name
public SingleAttribute(XmlNode parent,
java.lang.String name,
java.lang.Object defaultValue)
parent - attribute's parentname - attribute's namedefaultValue - attribute's default value
public SingleAttribute(XmlNode parent,
java.lang.String name,
java.lang.Object value,
java.lang.Object defaultValue,
boolean required)
parent - attribute's parentname - attribute's namevalue - attribute's valuedefaultValue - attribute's default valuerequired - is this attribute required| Method Detail |
|---|
public java.lang.Object getValue()
setValue(java.lang.Object)protected void setValue(java.lang.Object value)
value - new value of attributegetValue()public java.lang.Object getDefaultValue()
setDefaultValue(java.lang.Object)protected void setDefaultValue(java.lang.Object defaultValue)
defaultValue - new default value of attributegetDefaultValue()public void load(org.w3c.dom.Node node)
Attribute
node - source nodepublic void load(java.lang.String value)
Attribute
value - source stringprotected abstract java.lang.Object parseValue(java.lang.String value)
value - string value
public java.lang.String valueToString()
Attribute
public java.lang.String defaultValueToString()
Attribute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||