Google Data APIs Client Library (1.41.1)



com.google.gdata.data
Class PlainTextConstruct

java.lang.Object
  extended by com.google.gdata.data.TextConstruct
      extended by com.google.gdata.data.PlainTextConstruct
All Implemented Interfaces:
ITextConstruct

public class PlainTextConstruct
extends TextConstruct

Plain text variant of TextConstruct.


Nested Class Summary
 class PlainTextConstruct.AtomHandler
          Parses XML in the Atom format.
 
Nested classes/interfaces inherited from class com.google.gdata.data.TextConstruct
TextConstruct.ChildHandlerInfo, TextConstruct.RssFormat, TextConstruct.Type
 
Field Summary
protected  java.lang.String text
          Plain text contents.
 
Fields inherited from class com.google.gdata.data.TextConstruct
lang
 
Constructor Summary
PlainTextConstruct()
          Class constructor.
PlainTextConstruct(java.lang.String text)
          Class constructor specifying the plain text content for this text construct to contain.
PlainTextConstruct(java.lang.String text, java.lang.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.
 
Method Summary
 void generateAtom(com.google.gdata.util.common.xml.XmlWriter w, java.lang.String elementName)
          Generates XML in the Atom format.
 void generateRss(com.google.gdata.util.common.xml.XmlWriter w, java.lang.String elementName, TextConstruct.RssFormat rssFormat)
          Generates XML in the RSS format.
 java.lang.String getPlainText()
          Returns a plain-text representation of this text construct.
 java.lang.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(java.lang.String v)
          Specifies the plain text contents of this text construct.
 
Methods inherited from class com.google.gdata.data.TextConstruct
create, getChildHandler, getLang, html, plainText, setLang, xhtml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

protected java.lang.String text
Plain text contents.

Constructor Detail

PlainTextConstruct

public PlainTextConstruct()
Class constructor.


PlainTextConstruct

public PlainTextConstruct(java.lang.String text)
Class constructor specifying the plain text content for this text construct to contain.


PlainTextConstruct

public PlainTextConstruct(java.lang.String text,
                          java.lang.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.

Method Detail

getType

public int getType()
Description copied from class: TextConstruct
Returns this text construct's type (text, HTML, or XHTML).

Specified by:
getType in interface ITextConstruct
Specified by:
getType in class TextConstruct
Returns:
the type (TEXT) of this text construct

isEmpty

public boolean isEmpty()
Description copied from class: TextConstruct
Returns true if this text construct has no contents.

Specified by:
isEmpty in class TextConstruct

getText

public java.lang.String getText()
Returns:
the plain text contents of this text construct

setText

public void setText(java.lang.String v)
Specifies the plain text contents of this text construct.


getPlainText

public java.lang.String getPlainText()
Description copied from class: TextConstruct
Returns a plain-text representation of this text construct.

Specified by:
getPlainText in interface ITextConstruct
Specified by:
getPlainText in class TextConstruct
Returns:
a plain-text representation of this text construct or null if there is no text content.

generateAtom

public void generateAtom(com.google.gdata.util.common.xml.XmlWriter w,
                         java.lang.String elementName)
                  throws java.io.IOException
Generates XML in the Atom format.

Specified by:
generateAtom in class TextConstruct
Parameters:
w - output writer
elementName - Atom element name
Throws:
java.io.IOException

generateRss

public void generateRss(com.google.gdata.util.common.xml.XmlWriter w,
                        java.lang.String elementName,
                        TextConstruct.RssFormat rssFormat)
                 throws java.io.IOException
Generates XML in the RSS format.

Specified by:
generateRss in class TextConstruct
Parameters:
w - output writer
elementName - RSS element name
rssFormat - the restrictions on what HTML tags are allowed
Throws:
java.io.IOException