public class

PlainTextConstruct

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

Class Overview

Plain text variant of TextConstruct.

Summary

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

Plain text contents.

Public Constructors

public PlainTextConstruct ()

Class constructor.

public PlainTextConstruct (String text)

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

Parameters
text

public PlainTextConstruct (String text, String lang)

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

Parameters
text
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.

public String getText ()

Returns
  • the plain text contents of this text construct

public int getType ()

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

Returns
  • the type (TEXT) of this text construct

public boolean isEmpty ()

Returns true if this text construct has no contents.

public void setText (String v)

Specifies the plain text contents of this text construct.

Parameters
v