org.apache.lucene.gdata.data
Class ServerBaseFeed

java.lang.Object
  extended by org.apache.lucene.gdata.data.ServerBaseFeed

public class ServerBaseFeed
extends Object

The GData-Server uses the GDATA-Client API for an interal representation of entries. These entities have dynamic elements like Links being generated using the requested URL.
Some components of the server also need additional infomation like the service type ProvidedService of the feed. All these information are encapsulated in the ServerBaseFeed decoration a concrete subl class of BaseFeed. The type of the BaseEntry contained it this feed will be passed to the ServerBaseFeed at creation time via the constructor. To retrieve the original entry call getFeed() returns a BaseFeed instance which can be casted into the actual type. To use the ServerBaseEntry for generation a provided format like RSS/ATOM the corresponding ExtensionProfile has to be provided to the generation method.

Author:
Simon Willnauer

Constructor Summary
ServerBaseFeed()
          Creates a new ServerBaseFeed and decorates a basic instance of Feed
ServerBaseFeed(com.google.gdata.data.BaseFeed feed)
           
 
Method Summary
 void addAuthor(com.google.gdata.data.Person person)
           
 void addExtension(com.google.gdata.data.Extension arg0)
           
 void addHtmlLink(String arg0, String arg1, String arg2)
           
 void addLink(com.google.gdata.data.Link link)
           
 void addLinks(Collection<com.google.gdata.data.Link> collection)
           
 void addRepeatingExtension(com.google.gdata.data.Extension arg0)
           
 com.google.gdata.data.BaseEntry createEntry()
           
 void declareExtensions(com.google.gdata.data.ExtensionProfile extProfile)
           
 void generateAtom(com.google.gdata.util.common.xml.XmlWriter arg0, com.google.gdata.data.ExtensionProfile arg1)
           
 void generateAtomColl(com.google.gdata.util.common.xml.XmlWriter arg0)
           
 void generateRss(com.google.gdata.util.common.xml.XmlWriter arg0, com.google.gdata.data.ExtensionProfile arg1)
           
 GDataAccount getAccount()
           
 List<com.google.gdata.data.Person> getAuthors()
           
 boolean getCanPost()
           
 Set<com.google.gdata.data.Category> getCategories()
           
 List<com.google.gdata.data.Person> getContributors()
           
 List getEntries()
           
 com.google.gdata.data.Link getEntryPostLink()
           
<T extends com.google.gdata.data.Extension>
T
getExtension(Class<T> arg0)
           
 com.google.gdata.data.BaseFeed getFeed()
           
 com.google.gdata.data.Generator getGenerator()
           
 com.google.gdata.data.Link getHtmlLink()
           
 String getIcon()
           
 String getId()
           
 int getItemsPerPage()
           
 com.google.gdata.data.Link getLink(String arg0, String arg1)
           
 List<com.google.gdata.data.Link> getLinks()
           
 String getLogo()
           
<T extends com.google.gdata.data.Extension>
List<T>
getRepeatingExtension(Class<T> arg0)
           
 com.google.gdata.data.TextConstruct getRights()
           
 com.google.gdata.data.BaseFeed getSelf()
           
 com.google.gdata.data.Link getSelfLink()
           
 com.google.gdata.client.Service getService()
           
 ProvidedService getServiceConfig()
           
 String getServiceType()
           
 int getStartIndex()
           
 com.google.gdata.data.TextConstruct getSubtitle()
           
 com.google.gdata.data.TextConstruct getTitle()
           
 int getTotalResults()
           
 com.google.gdata.data.DateTime getUpdated()
           
 com.google.gdata.util.XmlBlob getXmlBlob()
           
 com.google.gdata.data.BaseEntry insert(com.google.gdata.data.BaseEntry arg0)
           
 void parseAtom(com.google.gdata.data.ExtensionProfile arg0, InputStream arg1)
           
 void parseAtom(com.google.gdata.data.ExtensionProfile arg0, Reader arg1)
           
 void parseCumulativeXmlBlob(com.google.gdata.util.XmlBlob arg0, com.google.gdata.data.ExtensionProfile arg1, Class arg2)
           
 void removeExtension(Class arg0)
           
 void removeExtension(com.google.gdata.data.Extension arg0)
           
 void removeRepeatingExtension(com.google.gdata.data.Extension arg0)
           
 void setAccount(GDataAccount account)
           
 void setCanPost(boolean arg0)
           
 void setExtension(com.google.gdata.data.Extension arg0)
           
 void setFeed(com.google.gdata.data.BaseFeed feed)
           
 void setGenerator(com.google.gdata.data.Generator arg0)
           
 void setIcon(String arg0)
           
 void setId(String arg0)
           
 void setItemsPerPage(int arg0)
           
 void setLogo(String arg0)
           
 void setRights(com.google.gdata.data.TextConstruct arg0)
           
 void setService(com.google.gdata.client.Service arg0)
           
 void setServiceConfig(ProvidedService serviceConfig)
           
 void setServiceType(String serviceType)
           
 void setStartIndex(int arg0)
           
 void setSubtitle(com.google.gdata.data.TextConstruct arg0)
           
 void setTitle(com.google.gdata.data.TextConstruct arg0)
           
 void setTotalResults(int arg0)
           
 void setUpdated(com.google.gdata.data.DateTime arg0)
           
 void setXmlBlob(com.google.gdata.util.XmlBlob arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerBaseFeed

public ServerBaseFeed()
Creates a new ServerBaseFeed and decorates a basic instance of Feed


ServerBaseFeed

public ServerBaseFeed(com.google.gdata.data.BaseFeed feed)
Parameters:
feed - - the feed to decorate
Method Detail

getAccount

public GDataAccount getAccount()
Returns:
Returns the account.

setAccount

public void setAccount(GDataAccount account)
Parameters:
account - The account to set.

getFeed

public com.google.gdata.data.BaseFeed getFeed()
Returns:
Returns the feed.

setFeed

public void setFeed(com.google.gdata.data.BaseFeed feed)
Parameters:
feed - The feed to set.

declareExtensions

public void declareExtensions(com.google.gdata.data.ExtensionProfile extProfile)
See Also:
BaseFeed.declareExtensions(com.google.gdata.data.ExtensionProfile)

addLink

public void addLink(com.google.gdata.data.Link link)
Parameters:
link - - a link added to the link list of the feed

addLinks

public void addLinks(Collection<com.google.gdata.data.Link> collection)
Parameters:
collection - - a collection of Link instance to be added to the feeds link list

getServiceType

public String getServiceType()
Returns:
- the name of the service related of the feed represented by this ServerBaseFeed

setServiceType

public void setServiceType(String serviceType)
Parameters:
serviceType - - the name of the service related of the feed represented by this ServerBaseFeed

getServiceConfig

public ProvidedService getServiceConfig()
Returns:
- the provided service

setServiceConfig

public void setServiceConfig(ProvidedService serviceConfig)
Parameters:
serviceConfig - - - the provided service

addAuthor

public void addAuthor(com.google.gdata.data.Person person)
Parameters:
person - - adds an author to the feed

createEntry

public com.google.gdata.data.BaseEntry createEntry()
See Also:
BaseFeed.createEntry()

generateAtom

public void generateAtom(com.google.gdata.util.common.xml.XmlWriter arg0,
                         com.google.gdata.data.ExtensionProfile arg1)
                  throws IOException
Throws:
IOException
See Also:
BaseFeed.generateAtom(com.google.gdata.util.common.xml.XmlWriter, com.google.gdata.data.ExtensionProfile)

generateAtomColl

public void generateAtomColl(com.google.gdata.util.common.xml.XmlWriter arg0)
                      throws IOException
Throws:
IOException
See Also:
BaseFeed.generateAtomColl(com.google.gdata.util.common.xml.XmlWriter)

generateRss

public void generateRss(com.google.gdata.util.common.xml.XmlWriter arg0,
                        com.google.gdata.data.ExtensionProfile arg1)
                 throws IOException
Throws:
IOException
See Also:
BaseFeed.generateRss(com.google.gdata.util.common.xml.XmlWriter, com.google.gdata.data.ExtensionProfile)

getCanPost

public boolean getCanPost()
See Also:
BaseFeed.getCanPost()

getEntries

public List getEntries()
See Also:
BaseFeed.getEntries()

getEntryPostLink

public com.google.gdata.data.Link getEntryPostLink()
See Also:
BaseFeed.getEntryPostLink()

getItemsPerPage

public int getItemsPerPage()
See Also:
BaseFeed.getItemsPerPage()

getSelf

public com.google.gdata.data.BaseFeed getSelf()
                                       throws IOException,
                                              com.google.gdata.util.ServiceException
Throws:
IOException
com.google.gdata.util.ServiceException
See Also:
BaseFeed.getSelf()

getSelfLink

public com.google.gdata.data.Link getSelfLink()
See Also:
BaseFeed.getSelfLink()

getService

public com.google.gdata.client.Service getService()
See Also:
BaseFeed.getService()

getStartIndex

public int getStartIndex()
See Also:
BaseFeed.getStartIndex()

getTotalResults

public int getTotalResults()
See Also:
BaseFeed.getTotalResults()

insert

public com.google.gdata.data.BaseEntry insert(com.google.gdata.data.BaseEntry arg0)
                                       throws com.google.gdata.util.ServiceException,
                                              IOException
Throws:
com.google.gdata.util.ServiceException
IOException
See Also:
com.google.gdata.data.BaseFeed#insert(E)

parseAtom

public void parseAtom(com.google.gdata.data.ExtensionProfile arg0,
                      InputStream arg1)
               throws IOException,
                      com.google.gdata.util.ParseException
Throws:
IOException
com.google.gdata.util.ParseException
See Also:
BaseFeed.parseAtom(com.google.gdata.data.ExtensionProfile, java.io.InputStream)

parseAtom

public void parseAtom(com.google.gdata.data.ExtensionProfile arg0,
                      Reader arg1)
               throws IOException,
                      com.google.gdata.util.ParseException
Throws:
IOException
com.google.gdata.util.ParseException
See Also:
BaseFeed.parseAtom(com.google.gdata.data.ExtensionProfile, java.io.Reader)

setCanPost

public void setCanPost(boolean arg0)
See Also:
BaseFeed.setCanPost(boolean)

setItemsPerPage

public void setItemsPerPage(int arg0)
See Also:
BaseFeed.setItemsPerPage(int)

setService

public void setService(com.google.gdata.client.Service arg0)
See Also:
BaseFeed.setService(com.google.gdata.client.Service)

setStartIndex

public void setStartIndex(int arg0)
See Also:
BaseFeed.setStartIndex(int)

setTotalResults

public void setTotalResults(int arg0)
See Also:
BaseFeed.setTotalResults(int)

addHtmlLink

public void addHtmlLink(String arg0,
                        String arg1,
                        String arg2)
See Also:
Source.addHtmlLink(java.lang.String, java.lang.String, java.lang.String)

getAuthors

public List<com.google.gdata.data.Person> getAuthors()
See Also:
Source.getAuthors()

getCategories

public Set<com.google.gdata.data.Category> getCategories()
See Also:
Source.getCategories()

getContributors

public List<com.google.gdata.data.Person> getContributors()
See Also:
Source.getContributors()

getGenerator

public com.google.gdata.data.Generator getGenerator()
See Also:
Source.getGenerator()

getHtmlLink

public com.google.gdata.data.Link getHtmlLink()
See Also:
Source.getHtmlLink()

getIcon

public String getIcon()
See Also:
Source.getIcon()

getId

public String getId()
See Also:
Source.getId()

getLink

public com.google.gdata.data.Link getLink(String arg0,
                                          String arg1)
See Also:
Source.getLink(java.lang.String, java.lang.String)

getLinks

public List<com.google.gdata.data.Link> getLinks()
See Also:
Source.getLinks()

getLogo

public String getLogo()
See Also:
Source.getLogo()

getRights

public com.google.gdata.data.TextConstruct getRights()
See Also:
Source.getRights()

getSubtitle

public com.google.gdata.data.TextConstruct getSubtitle()
See Also:
Source.getSubtitle()

getTitle

public com.google.gdata.data.TextConstruct getTitle()
See Also:
Source.getTitle()

getUpdated

public com.google.gdata.data.DateTime getUpdated()
See Also:
Source.getUpdated()

setGenerator

public void setGenerator(com.google.gdata.data.Generator arg0)
See Also:
Source.setGenerator(com.google.gdata.data.Generator)

setIcon

public void setIcon(String arg0)
See Also:
Source.setIcon(java.lang.String)

setId

public void setId(String arg0)
See Also:
Source.setId(java.lang.String)

setLogo

public void setLogo(String arg0)
See Also:
Source.setLogo(java.lang.String)

setRights

public void setRights(com.google.gdata.data.TextConstruct arg0)
See Also:
Source.setRights(com.google.gdata.data.TextConstruct)

setSubtitle

public void setSubtitle(com.google.gdata.data.TextConstruct arg0)
See Also:
Source.setSubtitle(com.google.gdata.data.TextConstruct)

setTitle

public void setTitle(com.google.gdata.data.TextConstruct arg0)
See Also:
Source.setTitle(com.google.gdata.data.TextConstruct)

setUpdated

public void setUpdated(com.google.gdata.data.DateTime arg0)
See Also:
Source.setUpdated(com.google.gdata.data.DateTime)

addExtension

public void addExtension(com.google.gdata.data.Extension arg0)
See Also:
ExtensionPoint.addExtension(com.google.gdata.data.Extension)

addRepeatingExtension

public void addRepeatingExtension(com.google.gdata.data.Extension arg0)
See Also:
ExtensionPoint.addRepeatingExtension(com.google.gdata.data.Extension)

getExtension

public <T extends com.google.gdata.data.Extension> T getExtension(Class<T> arg0)
See Also:
ExtensionPoint.getExtension(java.lang.Class)

getRepeatingExtension

public <T extends com.google.gdata.data.Extension> List<T> getRepeatingExtension(Class<T> arg0)
See Also:
ExtensionPoint.getRepeatingExtension(java.lang.Class)

getXmlBlob

public com.google.gdata.util.XmlBlob getXmlBlob()
See Also:
ExtensionPoint.getXmlBlob()

parseCumulativeXmlBlob

public void parseCumulativeXmlBlob(com.google.gdata.util.XmlBlob arg0,
                                   com.google.gdata.data.ExtensionProfile arg1,
                                   Class arg2)
                            throws IOException,
                                   com.google.gdata.util.ParseException
Throws:
IOException
com.google.gdata.util.ParseException
See Also:
ExtensionPoint.parseCumulativeXmlBlob(com.google.gdata.util.XmlBlob, com.google.gdata.data.ExtensionProfile, java.lang.Class)

removeExtension

public void removeExtension(Class arg0)
See Also:
ExtensionPoint.removeExtension(java.lang.Class)

removeExtension

public void removeExtension(com.google.gdata.data.Extension arg0)
See Also:
ExtensionPoint.removeExtension(com.google.gdata.data.Extension)

removeRepeatingExtension

public void removeRepeatingExtension(com.google.gdata.data.Extension arg0)
See Also:
ExtensionPoint.removeRepeatingExtension(com.google.gdata.data.Extension)

setExtension

public void setExtension(com.google.gdata.data.Extension arg0)
See Also:
ExtensionPoint.setExtension(com.google.gdata.data.Extension)

setXmlBlob

public void setXmlBlob(com.google.gdata.util.XmlBlob arg0)
See Also:
ExtensionPoint.setXmlBlob(com.google.gdata.util.XmlBlob)


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.