Class Text
- Direct Known Subclasses:
Content
Text constructs are used throughout Atom for elements that contain human-readable text such as titles, summaries, rights statements, and subtitles. They support three content types:
"text" - Plain text with no markup (default)"html" - HTML markup, entity-escaped"xhtml" - Well-formed XHTML in a div container
Text constructs are the base class for Content
and are used directly for:
atom:title - Entry and feed titlesatom:subtitle - Feed subtitlesatom:summary - Entry summariesatom:rights - Copyright and rights statements
Schema
atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct atomPlainTextConstruct = atomCommonAttributes, attribute type { "text" | "html" }?, text atomXHTMLTextConstruct = atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv xhtmlDiv = element xhtml:div { (attribute * { text } | text | anyXHTML)* }
Examples:
Specification:
Represents an
See Also:
-
Constructor Details
-
Text
Normal content.- Parameters:
type
- The content type of this content.
-
Text
public Text()Bean constructor.
-
-
Method Details
-
getType
Bean property getter:type .The content type of this content.
- Returns:
- The property value, or
null if it is not set.
-
setType
Bean property setter:type .The content type of this content.
Must be one of the following:
"text" "html" "xhtml" null (defaults to"text" )
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
getText
Bean property getter:text .The content of this content.
- Returns:
- The property value, or
null if it is not set.
-
setText
Bean property setter:text .The content of this content.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setBase
Description copied from class:Common
-
setLang
Description copied from class:Common
Bean property setter:lang .Sets the natural language of the element's content (xml:lang attribute).
Example:
Text
title =new Text("text" ) .setText("Mon Blog" ) .setLang("fr" );
-