Google Data APIs Client Library (1.41.1)



com.google.gdata.data
Class XhtmlTextConstruct

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

public class XhtmlTextConstruct
extends TextConstruct

XHTML variant of TextConstruct.


Nested Class Summary
 class XhtmlTextConstruct.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  XmlBlob xhtml
          XHTML contents.
 
Fields inherited from class com.google.gdata.data.TextConstruct
lang
 
Constructor Summary
XhtmlTextConstruct()
          Class constructor.
XhtmlTextConstruct(XmlBlob xhtml)
          Class constructor specifying the XHTML content for this text construct to contain.
XhtmlTextConstruct(XmlBlob xhtml, java.lang.String lang)
          Class constructor specifying the XHTML 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.
 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.
 
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

xhtml

protected XmlBlob xhtml
XHTML contents.

Constructor Detail

XhtmlTextConstruct

public XhtmlTextConstruct()
Class constructor.


XhtmlTextConstruct

public XhtmlTextConstruct(XmlBlob xhtml)
Class constructor specifying the XHTML content for this text construct to contain.


XhtmlTextConstruct

public XhtmlTextConstruct(XmlBlob xhtml,
                          java.lang.String lang)
Class constructor specifying the XHTML 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 (XHTML) 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
Returns:
true if this text construct has no contents

getXhtml

public XmlBlob getXhtml()
Returns:
the XHTML contents of this text construct

setXhtml

public void setXhtml(XmlBlob v)
Specifies the XHTML 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 available.

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