Google Data APIs Client Library



com.google.gdata.data
Class Content

java.lang.Object
  extended by com.google.gdata.data.Content
Direct Known Subclasses:
OtherContent, OutOfLineContent, TextContent

public abstract class Content
extends java.lang.Object

Abstract base class for entry content.


Nested Class Summary
static class Content.ChildHandlerInfo
          Return type for getChildHandler(Attributes) contains an element handler and a text construct.
static class Content.Type
          Defines the possible content types.
 
Constructor Summary
Content()
           
 
Method Summary
abstract  void generateAtom(com.google.gdata.util.common.xml.XmlWriter w)
          Generates XML in the Atom format.
abstract  void generateRss(com.google.gdata.util.common.xml.XmlWriter w)
          Generates XML in the RSS format.
static Content.ChildHandlerInfo getChildHandler(org.xml.sax.Attributes attrs)
          Parses XML in the Atom format.
abstract  java.lang.String getLang()
          Returns the human language that this content is written in.
abstract  int getType()
          Returns this content's type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content

public Content()
Method Detail

getType

public abstract int getType()
Returns this content's type.


getLang

public abstract java.lang.String getLang()
Returns the human language that this content is written in.


generateAtom

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

Parameters:
w - output writer
Throws:
java.io.IOException

generateRss

public abstract void generateRss(com.google.gdata.util.common.xml.XmlWriter w)
                          throws java.io.IOException
Generates XML in the RSS format.

Parameters:
w - output writer
Throws:
java.io.IOException

getChildHandler

public static Content.ChildHandlerInfo getChildHandler(org.xml.sax.Attributes attrs)
                                                throws ParseException,
                                                       java.io.IOException
Parses XML in the Atom format.

Parameters:
attrs - XML attributes of the Content node. Used to determine the type of this node.
Returns:
a child handler
Throws:
ParseException
java.io.IOException