com.google.gdata.data
Class Source

java.lang.Object
  extended by com.google.gdata.data.ExtensionPoint
      extended by com.google.gdata.data.Source
Direct Known Subclasses:
BaseFeed

public class Source
extends ExtensionPoint

The Source class represents an Atom feed source object primarily on the data model for an <atom:source> element. Here is the Relax-NG schema that represents an Atom 1.0 Source:

 atomSource =
   element atom:source {
     atomCommonAttributes,
     (atomAuthor*
      & atomCategory*
      & atomContributor*
      & atomGenerator?
      & atomIcon?
      & atomId?
      & atomLink*
      & atomLogo?
      & atomRights?
      & atomSubtitle?
      & atomTitle?
      & atomUpdated?
      & extensionElement*)
   }
 


Nested Class Summary
 class Source.SourceHandler
          <atom:source> parser.
 
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler, ExtensionPoint.Manifest
 
Field Summary
protected  java.util.LinkedList<Person> authors
          Authors.
protected  java.util.HashSet<Category> categories
          Categories.
protected  java.util.LinkedList<Person> contributors
          Contributors.
protected  Generator generator
          Generator.
protected  java.lang.String icon
          Icon URI.
protected  java.lang.String id
          Feed ID.
protected  java.util.LinkedList<Link> links
          Links.
protected  java.lang.String logo
          Logo image URI.
protected  TextConstruct rights
          Rights.
protected  TextConstruct subtitle
          Subtitle.
protected  TextConstruct title
          Title.
protected  DateTime updated
          Last updated timestamp.
 
Fields inherited from class com.google.gdata.data.ExtensionPoint
xmlBlob
 
Constructor Summary
Source()
           
 
Method Summary
 void addHtmlLink(java.lang.String htmlUri, java.lang.String lang, java.lang.String title)
          Adds a link pointing to an HTML representation.
 void generateAtom(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates XML in the Atom format.
protected  void generateInnerAtom(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates inner XML content in the Atom format.
 java.util.List<Person> getAuthors()
           
 java.util.Set<Category> getCategories()
           
 java.util.List<Person> getContributors()
           
 Generator getGenerator()
           
 Link getHtmlLink()
          Retrieves the first HTML link.
 java.lang.String getIcon()
           
 java.lang.String getId()
           
 Link getLink(java.lang.String rel, java.lang.String type)
          Retrieves the first link with the supplied rel and/or type value.
 java.util.List<Link> getLinks()
           
 java.lang.String getLogo()
           
 TextConstruct getRights()
           
 TextConstruct getSubtitle()
           
 TextConstruct getTitle()
           
 DateTime getUpdated()
           
 void parseAtom(ExtensionProfile extProfile, java.io.InputStream stream)
          Parses XML in the Atom format.
 void parseAtom(ExtensionProfile extProfile, java.io.Reader reader)
          Parses XML in the Atom format.
 void setGenerator(Generator v)
           
 void setIcon(java.lang.String v)
           
 void setId(java.lang.String v)
           
 void setLogo(java.lang.String v)
           
 void setRights(TextConstruct v)
           
 void setSubtitle(TextConstruct v)
           
 void setTitle(TextConstruct v)
           
 void setUpdated(DateTime v)
           
 
Methods inherited from class com.google.gdata.data.ExtensionPoint
addExtension, addRepeatingExtension, checkRequiredExtensions, declareExtensions, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionHandler, getManifest, getRepeatingExtension, getXmlBlob, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
Feed ID.


updated

protected DateTime updated
Last updated timestamp.


categories

protected java.util.HashSet<Category> categories
Categories.


title

protected TextConstruct title
Title.


subtitle

protected TextConstruct subtitle
Subtitle.


rights

protected TextConstruct rights
Rights.


icon

protected java.lang.String icon
Icon URI.


logo

protected java.lang.String logo
Logo image URI.


links

protected java.util.LinkedList<Link> links
Links.


authors

protected java.util.LinkedList<Person> authors
Authors.


contributors

protected java.util.LinkedList<Person> contributors
Contributors.


generator

protected Generator generator
Generator.

Constructor Detail

Source

public Source()
Method Detail

getId

public java.lang.String getId()

setId

public void setId(java.lang.String v)

getUpdated

public DateTime getUpdated()

setUpdated

public void setUpdated(DateTime v)

getCategories

public java.util.Set<Category> getCategories()

getTitle

public TextConstruct getTitle()

setTitle

public void setTitle(TextConstruct v)

getSubtitle

public TextConstruct getSubtitle()

setSubtitle

public void setSubtitle(TextConstruct v)

getRights

public TextConstruct getRights()

setRights

public void setRights(TextConstruct v)

getIcon

public java.lang.String getIcon()

setIcon

public void setIcon(java.lang.String v)

getLogo

public java.lang.String getLogo()

setLogo

public void setLogo(java.lang.String v)

getLinks

public java.util.List<Link> getLinks()

getAuthors

public java.util.List<Person> getAuthors()

getContributors

public java.util.List<Person> getContributors()

getGenerator

public Generator getGenerator()

setGenerator

public void setGenerator(Generator v)

getLink

public Link getLink(java.lang.String rel,
                    java.lang.String type)
Retrieves the first link with the supplied rel and/or type value.

If either parameter is null, doesn't return matches for that parameter.


addHtmlLink

public void addHtmlLink(java.lang.String htmlUri,
                        java.lang.String lang,
                        java.lang.String title)
Adds a link pointing to an HTML representation.

Parameters:
htmlUri - link URI
lang - optional language code
title - optional title

getHtmlLink

public Link getHtmlLink()
Retrieves the first HTML link.

Returns:
the link

generateAtom

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

Parameters:
w - output writer
extProfile - extension profile
Throws:
java.io.IOException

generateInnerAtom

protected void generateInnerAtom(com.google.gdata.util.common.xml.XmlWriter w,
                                 ExtensionProfile extProfile)
                          throws java.io.IOException
Generates inner XML content in the Atom format.

Parameters:
w - output writer
extProfile - extension profile
Throws:
java.io.IOException

parseAtom

public void parseAtom(ExtensionProfile extProfile,
                      java.io.InputStream stream)
               throws java.io.IOException,
                      ParseException
Parses XML in the Atom format.

Parameters:
extProfile - extension profile
stream - XML input stream
Throws:
java.io.IOException
ParseException

parseAtom

public void parseAtom(ExtensionProfile extProfile,
                      java.io.Reader reader)
               throws java.io.IOException,
                      ParseException
Parses XML in the Atom format.

Parameters:
extProfile - extension profile
reader - XML Reader. The caller is responsible for ensuring that the character encoding is correct.
Throws:
java.io.IOException
ParseException