Package eu.bandm.tools.tdom.runtime
Class CDataAttribute
- java.lang.Object
-
- eu.bandm.tools.tdom.runtime.TypedNode<TypedExtension>
-
- eu.bandm.tools.tdom.runtime.TypedAttribute<java.lang.String>
-
- eu.bandm.tools.tdom.runtime.CDataAttribute
-
- Direct Known Subclasses:
Attr_accesskey
,Attr_char
,Attr_charoff
,Attr_charset
,Attr_class
,Attr_href
,Attr_name
,Attr_onblur
,Attr_onclick
,Attr_ondblclick
,Attr_onfocus
,Attr_onkeydown
,Attr_onkeypress
,Attr_onkeyup
,Attr_onmousedown
,Attr_onmousemove
,Attr_onmouseout
,Attr_onmouseover
,Attr_onmouseup
,Attr_rel
,Attr_rev
,Attr_style
,Attr_tabindex
,Attr_title
,Attr_type
,Element_a_footnote.Attr_a_symbol
,Element_a_footnote.Attr_xml_lang
,Element_a_footnotemark.Attr_a_symbol
,Element_a_footnotetext.Attr_a_symbol
,Element_a_footnotetext.Attr_xml_lang
,Element_a_p.Attr_xml_lang
,Element_a_spanstyle.Attr_a_style
,Element_a_xlang.Attr_xml_lang
,Element_a.Attr_coords
,Element_area.Attr_alt
,Element_area.Attr_coords
,Element_base.Attr_href
,Element_blockquote.Attr_cite
,Element_body.Attr_onload
,Element_body.Attr_onunload
,Element_button.Attr_value
,Element_col.Attr_span
,Element_col.Attr_width
,Element_colgroup.Attr_span
,Element_colgroup.Attr_width
,Element_constant.Attr_value
,Element_del.Attr_cite
,Element_del.Attr_datetime
,Element_desc.Attr_xml_lang
,Element_entry.Attr_key
,Element_enumitem.Attr_value
,Element_form.Attr_accept
,Element_form.Attr_accept_charset
,Element_form.Attr_action
,Element_form.Attr_enctype
,Element_form.Attr_onreset
,Element_form.Attr_onsubmit
,Element_head.Attr_profile
,Element_html.Attr_xmlns
,Element_img.Attr_alt
,Element_img.Attr_height
,Element_img.Attr_longdesc
,Element_img.Attr_src
,Element_img.Attr_usemap
,Element_img.Attr_width
,Element_input.Attr_accept
,Element_input.Attr_alt
,Element_input.Attr_maxlength
,Element_input.Attr_onchange
,Element_input.Attr_onselect
,Element_input.Attr_size
,Element_input.Attr_src
,Element_input.Attr_usemap
,Element_input.Attr_value
,Element_ins.Attr_cite
,Element_ins.Attr_datetime
,Element_link.Attr_media
,Element_meta.Attr_content
,Element_meta.Attr_http_equiv
,Element_meta.Attr_scheme
,Element_object.Attr_archive
,Element_object.Attr_classid
,Element_object.Attr_codebase
,Element_object.Attr_codetype
,Element_object.Attr_data
,Element_object.Attr_height
,Element_object.Attr_standby
,Element_object.Attr_usemap
,Element_object.Attr_width
,Element_optgroup.Attr_label
,Element_option.Attr_label
,Element_option.Attr_value
,Element_param.Attr_value
,Element_q.Attr_cite
,Element_rat.Attr_default
,Element_script.Attr_src
,Element_script.Attr_type
,Element_select.Attr_onchange
,Element_select.Attr_size
,Element_string.Attr_default
,Element_style.Attr_media
,Element_style.Attr_type
,Element_table.Attr_border
,Element_table.Attr_cellpadding
,Element_table.Attr_cellspacing
,Element_table.Attr_summary
,Element_table.Attr_width
,Element_td.Attr_abbr
,Element_td.Attr_axis
,Element_td.Attr_colspan
,Element_td.Attr_rowspan
,Element_textarea.Attr_cols
,Element_textarea.Attr_onchange
,Element_textarea.Attr_onselect
,Element_textarea.Attr_rows
,Element_th.Attr_abbr
,Element_th.Attr_axis
,Element_th.Attr_colspan
,Element_th.Attr_rowspan
,Element_uri.Attr_default
public abstract class CDataAttribute extends TypedAttribute<java.lang.String>
Base class for all generated classes which realize an Attribute with typeCDATA
. This declaration means an attribute with an arbitrary character sequence as its value, and no further structure imposed. As a consequence, the value type parameter for these attributes isString
, and anTdomAttributeSyntaxException
is only thrown when an attribute is absent (null) and #REQUIRED.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedAttribute
TypedAttribute.__PreAtts, TypedAttribute.SafeValues
-
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedNode
TypedNode.ParseListener<E extends TypedElement<?,?>>
-
-
Field Summary
-
Fields inherited from class eu.bandm.tools.tdom.runtime.TypedAttribute
__preAtts, emptyAttributes, mutable, safeValues, specified, value
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CDataAttribute()
protected
CDataAttribute(@Opt java.lang.String value)
protected
CDataAttribute(TypedAttribute.SafeValues flag, @Opt java.lang.String value)
This variant may only be invoked by generated code if value argument is known to be != null.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkValue(@Opt java.lang.String value)
Check routine for the validity of the attributes' intended value.(package private) void
decode(DecodingInputStream in, TypedExtension ext)
DOCUMENT MEvoid
encode(EncodingOutputStream out, TypedExtension ext)
Abstract fall-back method which MUST be overridden and always throws an Exception.java.lang.String
getStringValue(java.lang.String s)
Returns the textual representation of a possible attribute value (not null), as it would be contained literally in a possible XML text representation.java.lang.String
getTypeString()
The definition text for the "type" of the attribute in the original DTD.void
setValue(@Opt java.lang.String newValue, TypedAttribute.SafeValues flag)
Internal use only.-
Methods inherited from class eu.bandm.tools.tdom.runtime.TypedAttribute
assertSetAttrValid, checkRequired, clearValue, find, find, getDefaultValue, getLocalName, getNamespaceName, getNamespaceURI, getStringValue, getTagName, getValue, isFixed, isOptional, isRequired, isSpecified, makeUnspecified, put, setValue
-
Methods inherited from class eu.bandm.tools.tdom.runtime.TypedNode
asBigDecimal, asBigDecimal, asBigDecimal, asBigDecimal, asBigInteger, asBigInteger, asBigInteger, asBigInteger, asBoolean, asBoolean, asDouble, asDouble, asDouble, asDouble, asFloat, asFloat, asFloat, asFloat, asHexInt, asHexInt, asHexInt, asHexInt, asInt, asInt, asInt, asInt, asLong, asLong, asLong, asLong, asTrimmedString, asTrimmedString, asTrimmedString, asTrimmedString, checkPlus, checkPlus, checkStar, checkStar, checkStrict, encode, encodeOptional, encodePlus, encodePlus, encodeStar, encodeStar, extractEthereals, getLocation, getPCData, setLocation, setLocation, setLocation
-
-
-
-
Constructor Detail
-
CDataAttribute
protected CDataAttribute()
-
CDataAttribute
protected CDataAttribute(@Opt @Opt java.lang.String value) throws TdomAttributeSyntaxException
- Throws:
TdomAttributeSyntaxException
-
CDataAttribute
protected CDataAttribute(TypedAttribute.SafeValues flag, @Opt @Opt java.lang.String value)
This variant may only be invoked by generated code if value argument is known to be != null. In this case no TdomAttributeSyntaxException can be thrown, because String values are permitted.
-
-
Method Detail
-
checkValue
protected void checkValue(@Opt @Opt java.lang.String value)
Description copied from class:TypedAttribute
Check routine for the validity of the attributes' intended value. Is a call-back, implemented by the sub-classes. Is called only here, by two constructors and the#set_value(V)
method. The valuenull
means "absent" for#IMPLIED
attributes and passes the test.- Specified by:
checkValue
in classTypedAttribute<java.lang.String>
- Parameters:
value
- the value to test; maybe null.
-
getTypeString
public java.lang.String getTypeString()
Description copied from class:TypedAttribute
The definition text for the "type" of the attribute in the original DTD.- Specified by:
getTypeString
in classTypedAttribute<java.lang.String>
-
setValue
public void setValue(@Opt @Opt java.lang.String newValue, TypedAttribute.SafeValues flag)
Internal use only. Is called by a generatedsetValue(@Opt String)
method iff attribute is #IMPLIED, because then never a exception will be thrown.
-
encode
public final void encode(EncodingOutputStream out, TypedExtension ext) throws java.io.IOException
Description copied from class:TypedNode
Abstract fall-back method which MUST be overridden and always throws an Exception.- Specified by:
encode
in classTypedNode<TypedExtension>
- Throws:
java.io.IOException
-
decode
final void decode(DecodingInputStream in, TypedExtension ext) throws java.io.IOException, TdomAttributeSyntaxException
Description copied from class:TypedAttribute
DOCUMENT ME- Specified by:
decode
in classTypedAttribute<java.lang.String>
- Throws:
java.io.IOException
TdomAttributeSyntaxException
-
getStringValue
public final java.lang.String getStringValue(java.lang.String s)
Description copied from class:TypedAttribute
Returns the textual representation of a possible attribute value (not null), as it would be contained literally in a possible XML text representation. Since the textual representation of a String is the string itself, this method is relevant for enumeration types only (Later: also for "entity" types, but these are not yet supported.)- Specified by:
getStringValue
in classTypedAttribute<java.lang.String>
- Returns:
- (never null) the textual representation of this attribute value, as it would be contained literally in a possible XML text representation.
-
-