public class

HtmlTextConstruct

extends TextConstruct
java.lang.Object
   ↳ com.google.gdata.data.TextConstruct
     ↳ com.google.gdata.data.HtmlTextConstruct

Class Overview

HTML variant of TextConstruct.

Summary

Nested Classes
class HtmlTextConstruct.AtomHandler Parses XML in the Atom format. 
Fields
protected String html HTML contents.
[Expand]
Inherited Fields
From class com.google.gdata.data.TextConstruct
Public Constructors
HtmlTextConstruct()
Class constructor.
HtmlTextConstruct(String html)
Class constructor specifying the HTML content for this text construct to contain.
HtmlTextConstruct(String html, String lang)
Class constructor specifying the HTML content for this text construct to contain, plus the human language that the text is written in.
Public Methods
void generateAtom(XmlWriter w, String elementName)
Generates XML in the Atom format.
void generateRss(XmlWriter w, String elementName, TextConstruct.RssFormat rssFormat)
Generates XML in the RSS format.
String getHtml()
String getPlainText()
Returns a plain-text representation of this text construct.
int getType()
Returns this text construct's type (text, HTML, or XHTML).
boolean isEmpty()
Returns true if this text construct has no contents.
void setHtml(String v)
Specifies the HTML contents of this text construct.
[Expand]
Inherited Methods
From class com.google.gdata.data.TextConstruct
From class java.lang.Object
From interface com.google.gdata.data.ITextConstruct

Fields

protected String html

HTML contents.

Public Constructors

public HtmlTextConstruct ()

Class constructor.

public HtmlTextConstruct (String html)

Class constructor specifying the HTML content for this text construct to contain.

Parameters
html

public HtmlTextConstruct (String html, String lang)

Class constructor specifying the HTML content for this text construct to contain, plus the human language that the text is written in.

Parameters
html
lang

Public Methods

public void generateAtom (XmlWriter w, String elementName)

Generates XML in the Atom format.

Parameters
w Output writer
elementName Atom element name
Throws
IOException

public void generateRss (XmlWriter w, String elementName, TextConstruct.RssFormat rssFormat)

Generates XML in the RSS format.

Parameters
w Output writer
elementName RSS element name
rssFormat The restrictions on what HTML tags are allowed
Throws
IOException

public String getHtml ()

Returns
  • the HTML contents of this text construct

public String getPlainText ()

Returns a plain-text representation of this text construct.

Returns
  • a plain-text representation of this text construct or null if there is no html content.

public int getType ()

Returns this text construct's type (text, HTML, or XHTML).

Returns
  • the type (HTML) of this text construct

public boolean isEmpty ()

Returns true if this text construct has no contents.

Returns
  • true if this text construct has no contents

public void setHtml (String v)

Specifies the HTML contents of this text construct.

Parameters
v