public class

XhtmlTextConstruct

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

Class Overview

XHTML variant of TextConstruct.

Summary

Nested Classes
class XhtmlTextConstruct.AtomHandler Parses XML in the Atom format. 
Fields
protected XmlBlob xhtml XHTML contents.
[Expand]
Inherited Fields
From class com.google.gdata.data.TextConstruct
Public Constructors
XhtmlTextConstruct()
Class constructor.
XhtmlTextConstruct(XmlBlob xhtml)
Class constructor specifying the XHTML content for this text construct to contain.
XhtmlTextConstruct(XmlBlob xhtml, String lang)
Class constructor specifying the XHTML 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 getPlainText()
Returns a plain-text representation of this text construct.
int getType()
Returns this text construct's type (text, HTML, or XHTML).
XmlBlob getXhtml()
boolean isEmpty()
Returns true if this text construct has no contents.
void setXhtml(XmlBlob v)
Specifies the XHTML 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 XmlBlob xhtml

XHTML contents.

Public Constructors

public XhtmlTextConstruct ()

Class constructor.

public XhtmlTextConstruct (XmlBlob xhtml)

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

Parameters
xhtml

public XhtmlTextConstruct (XmlBlob xhtml, String lang)

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

Parameters
xhtml
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 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 text content available.

public int getType ()

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

Returns
  • the type (XHTML) of this text construct

public XmlBlob getXhtml ()

Returns
  • the XHTML contents 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 setXhtml (XmlBlob v)

Specifies the XHTML contents of this text construct.

Parameters
v