public final class AttributeDefinitionString extends AttributeDefinition<AttributeValueString>
This class extends from the base class AttributeDefinition
.
The specific form of an AttributeDefinitionString
in a ReqIF file is as follows:
<ATTRIBUTE-DEFINITION-STRING 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 |
---|---|
DatatypeDefinitionString |
getDatatypeDefinitionString()
Type specific getter for the associated
DatatypeDefinition subclass. |
AttributeValueString |
getDefaultValue()
The default value which can be assigned by the exporting tool if one is specified.
|
void |
setDefaultValue(java.lang.String theValue)
Sets the default value for this object.
|
getDatatypeDefinition, getSpecType, hasDefaultValue, isEditable, removeDefaultValue, setIsEditable, toString
equals, getAlternativeID, getChildren, getDesc, getIdentifier, getLastChange, getLastChangeText, getLongName, getPathToRoot, getReqIFContent, hashCode, isUsed, isValidIdentifier, setAlternativeID, setDesc, setLastChange, setLongName, whereUsed
public DatatypeDefinitionString getDatatypeDefinitionString()
DatatypeDefinition
subclass.DatatypeDefinitionString
object, not nullpublic AttributeValueString getDefaultValue()
If, during import, an AttributeValueString
is not specified for a particular SpecElementWithAttributes
,
and corresponding AttributeDefinitionString
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<AttributeValueString>
AttributeDefinitionString
public void setDefaultValue(java.lang.String theValue) throws InvalidValueException, NotFoundException
null values are not permitted although you can set an empty string.
theValue
- the String
value to set as the default, not nullInvalidValueException
- if the specified value is null or the length is longer than permitted as defined in
the associated DatatypeDefinitionString
object MAX-LENGTH
attributeNotFoundException
- if this AttributeDefinitionString
has been removed from its SpecType