public final class AttributeDefinitionXHTML extends AttributeDefinition<AttributeValueXHTML>
This class extends from the base class AttributeDefinition.
The specific form of an AttributeDefinitionXHTML in a ReqIF file is as follows:
<ATTRIBUTE-DEFINITION-XHTML DESC="desc" IS-EDITABLE="isEditable" IDENTIFIER="identifier" LAST-CHANGE="lastChange" LONG-NAME="longName">
The following is the list of XML attributes:
@DESC optional xsd:string description@IS-EDITABLE optional xsd:boolean, if not specified, false is assumed@IDENTIFIER required xsd:ID@LAST-CHANGE required xsd:dateTime@LONG-NAME required xsd:string (Note: currently the reqif.xsd does not enforce this)| Modifier and Type | Method and Description |
|---|---|
DatatypeDefinitionXHTML |
getDatatypeDefinitionXHTML()
Type specific getter for the associated
DatatypeDefinition subclass. |
AttributeValueXHTML |
getDefaultValue()
The default value which can be assigned by the exporting tool if one is specified.
|
void |
setDefaultValue(org.w3c.dom.Element theValue)
Sets the default for
theValue for this object. |
void |
setDefaultValue(org.w3c.dom.Element theValue,
org.w3c.dom.Element theOriginalValue,
boolean isSimplified)
Sets the defaults for the
theValue, theOriginalValue and isSimplified values for this object. |
void |
setDefaultValue(java.lang.String theValue)
Sets the default for
theValue value this object by specifying content as a String. |
void |
setDefaultValue(java.lang.String theValue,
java.lang.String theOriginalValue,
boolean isSimplified)
Sets the default values for this object by specifying ReqIF XHTML content using
String values. |
getDatatypeDefinition, getSpecType, hasDefaultValue, isEditable, removeDefaultValue, setIsEditable, toStringequals, getAlternativeID, getChildren, getDesc, getIdentifier, getLastChange, getLastChangeText, getLongName, getPathToRoot, getReqIFContent, hashCode, isUsed, isValidIdentifier, setAlternativeID, setDesc, setLastChange, setLongName, whereUsedpublic DatatypeDefinitionXHTML getDatatypeDefinitionXHTML()
DatatypeDefinition subclass.DatatypeDefinitionXHTML object, not nullpublic AttributeValueXHTML getDefaultValue()
If, during import, an AttributeValueXHTML is not specified for a particular SpecElementWithAttributes,
and corresponding AttributeDefinitionXHTML on the associated SpecType, then the default value if one
exists will be the substitute for the missing value otherwise the value null is assumed meaning 'unset'.
getDefaultValue in class AttributeDefinition<AttributeValueXHTML>AttributeDefinitionXHTMLpublic void setDefaultValue(org.w3c.dom.Element theValue,
org.w3c.dom.Element theOriginalValue,
boolean isSimplified)
throws ValidationException,
NotFoundException
theValue, theOriginalValue and isSimplified values for this object.
The specified ReqIF XHTML will be validated. If errors occurred, you can investigate the validation errors
by calling AttributeValueXHTML.validate(ReqIFFile, Element, Consumer)
theValue - the Element value to set as the default for theValue, not nulltheOriginalValue - the Element value to set as the default for theOriginalValue, can be nullisSimplified - the boolean value to set as the @IS_SIMPLIFIED attributeValidationException - if theValue or theOriginalValue do not contain valid ReqIF XHTMLNotFoundException - if this AttributeDefinitionXHTML has been removed from its SpecTypepublic void setDefaultValue(org.w3c.dom.Element theValue)
throws NotSavedException,
ValidationException,
NotFoundException
theValue for this object.
The Element object representing the THE-ORIGINAL-VALUE element will not be specified.
The @IS-SIMPLIFIED attribute is set to false.
theValue - the Element value to set as the default for the THE-VALUE element, not nullNotSavedException - if theValue contains file references and the ReqIF was not loaded or has not been savedValidationException - if theValue does not contain valid ReqIF XHTMLNotFoundException - if this AttributeDefinitionXHTML has been removed from its SpecTypepublic void setDefaultValue(java.lang.String theValue,
java.lang.String theOriginalValue,
boolean isSimplified)
throws java.lang.Exception,
NotFoundException
String values.theValue - the String value to set as the default for theValue, not nulltheOriginalValue - the String value to set as the default theOriginalValue can be nullisSimplified - the boolean value to set as the @IS_SIMPLIFIED attributejava.lang.Exception - if an error occurs during Element creation from the specified String parametersNotFoundException - if this AttributeDefinitionXHTML has been removed from its SpecTypepublic void setDefaultValue(java.lang.String theValue)
throws java.lang.Exception,
NotFoundException
theValue value this object by specifying content as a String.
The Element object representing the THE-ORIGINAL-VALUE element will not be specified.
The @IS-SIMPLFIED attribute is set to false.
theValue - the String value to be converted to an Element object andset as the default for the THE-VALUE element, not nulljava.lang.Exception - if an error occurs during Element creation from the specified String parameterNotFoundException - if this AttributeDefinitionXHTML has been removed from its SpecType