| java.lang.Object | |||
| ↳ | com.google.gdata.model.Element | ||
| ↳ | com.google.gdata.model.atom.Content | ||
| ↳ | com.google.gdata.model.atom.TextContent | ||
Variant of Content for entries containing text.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | KIND | The kind name for adaptation. | |||||||||
| int | UNKNOWN_TYPE | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| CONSTRUCT | The key for TextContent used as a construct. | ||||||||||
| DIV | The key for xhtml:div. | ||||||||||
| KEY | The key for atom:content when it contains TextContent. | ||||||||||
| TYPE_MAP | |||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.model.atom.Content
| |||||||||||
From class
com.google.gdata.model.Element
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new plain text instance using the default key.
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance using the specified key.
| |||||||||||
Constructs a new instance from a more generic
Content type. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a text content.
| |||||||||||
Returns the
ITextConstruct that contains the text content. | |||||||||||
Backwards-compatibility method, exactly the same as
getText(). | |||||||||||
Returns a plain-text representation of this text content.
| |||||||||||
Returns the text content of this element, if this is a plain text or html
text content.
| |||||||||||
Returns the type of this content, either Content.Type#TEXT,
Content.Type#HTML, or Content.Type#XHTML.
| |||||||||||
Returns the XHTML content of this text content, or
null if no such
element exists. | |||||||||||
Construct a new html text content with the given html.
| |||||||||||
Returns
true if there is no content element for this text content. | |||||||||||
Construct a new plain text content with the given text.
| |||||||||||
Registers the metadata for this element.
| |||||||||||
Resolve this element's state against the metadata.
In the case of plain text or html content, we resolve a null content body
to an empty string.
| |||||||||||
Specifies the text of this element, turning this into an html text content
element if it wasn't already.
| |||||||||||
Specifies the text of this element, turning this into a plain-text
content element if it wasn't already.
| |||||||||||
Specifies the XHTML content of this element, turning this into an xhtml
text content element if it wasn't already.
| |||||||||||
Construct a new Xhtml text content from the given div.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gdata.model.atom.Content
| |||||||||||
From class
com.google.gdata.model.Element
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.gdata.data.IContent
| |||||||||||
From interface
com.google.gdata.data.ITextConstruct
| |||||||||||
From interface
com.google.gdata.data.ITextContent
| |||||||||||
The kind name for adaptation.
The key for TextContent used as a construct. This will apply to all uses of TextContent regardless of QName.
The key for atom:content when it contains TextContent.
Constructs a new plain text instance using the default key.
Constructs a new instance using the specified key.
| key | The element key for this element |
|---|
Constructs a new instance from a more generic Content type.
| key | The element key to use for this instance |
|---|---|
| content | Generic content |
Creates a text content. This method is convenient for some service implementations. Note that XHTML is treated somewhat differently from text and HTML, as it is stored as a separate element instead of in the value portion of this element.
| type | The type of the new text construct (TEXT, HTML, or XHTML) |
|---|---|
| textOrHtml | The contents to put in this text construct, if the type is
TEXT or HTML.
If type is XHTML, set this parameter to null. |
| xhtml | The contents to put in this text construct, if the type is
XHTML.
If type is TEXT or HTML, set this parameter to null. |
TextConstruct of the appropriate type.
Returns a plain-text representation of this text content. For content that is already plain text, this just returns the text value, but for html and xhtml it first converts the data into a plain text representation before returning it.
Returns the text content of this element, if this is a plain text or html
text content. If this is an XHTML text content this method returns null.
If you want a plain-text representation of the XHTML content call
getPlainText() instead.
Returns the type of this content, either Content.Type#TEXT,
Content.Type#HTML, or Content.Type#XHTML. If the value
of the TYPE attribute is unknown, plain text
Content.Type#TEXT will be returned.
Returns the XHTML content of this text content, or null if no such
element exists.
Construct a new html text content with the given html.
| html |
|---|
Returns true if there is no content element for this text content.
Construct a new plain text content with the given text.
| text |
|---|
Registers the metadata for this element.
| registry |
|---|
Resolve this element's state against the metadata. Accumulates errors in caller's validation context. In the case of plain text or html content, we resolve a null content body to an empty string.
| metadata | |
|---|---|
| vc | Validation context |
Specifies the text of this element, turning this into an html text content element if it wasn't already.
| html |
|---|
Specifies the text of this element, turning this into a plain-text content element if it wasn't already.
| text |
|---|
Specifies the XHTML content of this element, turning this into an xhtml text content element if it wasn't already.
| div |
|---|
Construct a new Xhtml text content from the given div.
| div |
|---|