|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.attribute.AbstractAttribute
public abstract class AbstractAttribute
Node's attribute implementation.
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
logger
Logger. |
| Constructor Summary | |
|---|---|
AbstractAttribute(XmlNode parent,
java.lang.String name,
boolean required,
boolean supported)
Constructs attribute. |
|
| Method Summary | |
|---|---|
java.lang.String |
getFullName()
Gets full name of attribute (full path from root node up to node's parent and node's name). |
java.lang.String |
getLoadedValue()
Gets loaded attribute's value. |
QTIParseException |
getLoadingProblem()
Gets parse exception (if there were problem while loading) or null. |
java.lang.String |
getName()
Gets name of attribute. |
XmlNode |
getParent()
Gets parent node of attribute. |
boolean |
isRequired()
Returns true if attribute is mandatory; false otherwise (attribute is optional). |
boolean |
isSupported()
Returns true if attribute is supported; false otherwise (attribute is not supported). |
protected void |
setLoadedValue(java.lang.String loadedValue)
Sets new loaded value. |
protected void |
setLoadingProblem(QTIParseException loadingProblem)
Sets new loading problem. |
void |
setSupported(boolean supported)
Sets whenever this attribute is supported or not. |
java.lang.String |
toString()
|
java.lang.String |
toXmlString(boolean printDefaultValue)
Gets attribute converted to string (name="value"). |
ValidationResult |
validate()
Validates this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.qtitools.qti.attribute.Attribute |
|---|
defaultValueToString, load, load, valueToString |
| Field Detail |
|---|
protected static org.slf4j.Logger logger
| Constructor Detail |
|---|
public AbstractAttribute(XmlNode parent,
java.lang.String name,
boolean required,
boolean supported)
parent - parent of constructed attributename - name of constructed attributerequired - if true this attribute is required; otherwise this attribute is optionalsupported - if true this attribute is supported; otherwise this attribute is unsupported| Method Detail |
|---|
public XmlNode getParent()
Attribute
getParent in interface Attributepublic java.lang.String getName()
Attribute
getName in interface Attributepublic java.lang.String getFullName()
Attribute
getFullName in interface Attributepublic boolean isRequired()
Attribute
isRequired in interface Attributepublic boolean isSupported()
Attribute
isSupported in interface Attributepublic void setSupported(boolean supported)
setSupported in interface Attributesupported - if true this attribute is supported; otherwise this attribute is unsupportedpublic java.lang.String getLoadedValue()
Attribute
getLoadedValue in interface Attributeprotected void setLoadedValue(java.lang.String loadedValue)
loadedValue - new loaded valuegetLoadedValue()public QTIParseException getLoadingProblem()
Attribute
getLoadingProblem in interface Attributeprotected void setLoadingProblem(QTIParseException loadingProblem)
loadingProblem - loading problem.getLoadingProblem()public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toXmlString(boolean printDefaultValue)
Attribute
toXmlString in interface AttributeprintDefaultValue - if true, default value is printed; otherwise default value is not printed
public ValidationResult validate()
Validatable
validate in interface Validatable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||