Google Data APIs Client Library (1.41.1)



com.google.gdata.data.extensions
Class FeedLink<F extends BaseFeed<?,?>>

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ExtensionPoint
          extended by com.google.gdata.data.Link
              extended by com.google.gdata.data.extensions.FeedLink<F>
Type Parameters:
F - Nested feed type.
All Implemented Interfaces:
Extension, ILink, Reference
Direct Known Subclasses:
DocumentListAclFeedLink, DocumentListRevisionFeedLink, PortfolioFeedLink, PositionFeedLink

public class FeedLink<F extends BaseFeed<?,?>>
extends Link

The FeedLink class defines the object model for a link entity that refers to a GData feed. The feed content may be included inline via child elements of the feed link or only included by reference.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.data.Link
Link.AtomHandler
 
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Nested classes/interfaces inherited from interface com.google.gdata.data.ILink
ILink.Rel, ILink.Type
 
Field Summary
protected  java.lang.Integer countHint
          Count hint.
protected  BaseFeed<?,?> feed
          Nested feed (optional).
protected  java.lang.Class<F> feedClass
          Nested feed class.
protected  boolean readOnly
          Read only flag.
 
Fields inherited from class com.google.gdata.data.Link
content, etag, href, hrefLang, length, rel, title, titleLang, type
 
Fields inherited from class com.google.gdata.data.ExtensionPoint
xmlBlob
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
FeedLink()
          Constructs a feed link that points to a Feed.
FeedLink(java.lang.Class<F> feedClass)
          Constructs a feed link that points to the given feed type.
 
Method Summary
 void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates an XML representation for the extension.
 java.lang.Integer getCountHint()
           
static ExtensionDescription getDefaultDescription()
          Returns the suggested extension description.
 F getFeed()
           
 java.lang.Class<F> getFeedClass()
           
 XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
          The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.
 boolean getReadOnly()
           
 java.lang.String getType()
          Returns the mime type of the link.
 void setCountHint(java.lang.Integer v)
           
 void setFeed(F v)
           
 void setReadOnly(boolean v)
           
protected  void visitChildren(ExtensionVisitor ev)
          Called to visit all children of this extension point.
 
Methods inherited from class com.google.gdata.data.Link
generateAtom, generateRss, getContent, getEtag, getHref, getHrefLang, getLength, getRel, getTitle, getTitleLang, matches, setContent, setEtag, setHref, setHrefLang, setLength, setRel, setTitle, setTitleLang, setType
 
Methods inherited from class com.google.gdata.data.ExtensionPoint
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild
 
Methods inherited from class com.google.gdata.data.AbstractExtension
consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

readOnly

protected boolean readOnly
Read only flag.


countHint

protected java.lang.Integer countHint
Count hint.


feed

protected BaseFeed<?,?> feed
Nested feed (optional).


feedClass

protected final java.lang.Class<F extends BaseFeed<?,?>> feedClass
Nested feed class.

Constructor Detail

FeedLink

public FeedLink()
Constructs a feed link that points to a Feed.


FeedLink

public FeedLink(java.lang.Class<F> feedClass)
Constructs a feed link that points to the given feed type.

Parameters:
feedClass - Feed class.
Method Detail

getReadOnly

public boolean getReadOnly()

setReadOnly

public void setReadOnly(boolean v)

getCountHint

public java.lang.Integer getCountHint()

setCountHint

public void setCountHint(java.lang.Integer v)

getFeed

public F getFeed()

setFeed

public void setFeed(F v)

getFeedClass

public java.lang.Class<F> getFeedClass()

getDefaultDescription

public static ExtensionDescription getDefaultDescription()
Returns the suggested extension description.


getType

public java.lang.String getType()
Description copied from interface: ILink
Returns the mime type of the link.

Specified by:
getType in interface ILink
Overrides:
getType in class Link

visitChildren

protected void visitChildren(ExtensionVisitor ev)
                      throws ExtensionVisitor.StoppedException
Description copied from class: ExtensionPoint
Called to visit all children of this extension point.

Overrides:
visitChildren in class ExtensionPoint
Parameters:
ev - the extension visitor.
Throws:
ExtensionVisitor.StoppedException

generate

public void generate(com.google.gdata.util.common.xml.XmlWriter w,
                     ExtensionProfile extProfile)
              throws java.io.IOException
Description copied from interface: Extension
Generates an XML representation for the extension.

Specified by:
generate in interface Extension
Overrides:
generate in class Link
Parameters:
w - XML writer
extProfile - extension profile
Throws:
java.io.IOException

getHandler

public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile,
                                           java.lang.String namespace,
                                           java.lang.String localName,
                                           org.xml.sax.Attributes attrs)
Description copied from class: AbstractExtension
The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.

Specified by:
getHandler in interface Extension
Overrides:
getHandler in class Link
Parameters:
extProfile - extension profile
namespace - extension namespace
localName - tag name, without the namespace prefix
attrs - tag attributes
Returns:
an element handler