com.google.gdata.data.extensions
Class EntryLink<E extends BaseEntry<?>>

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.EntryLink<E>
Type Parameters:
E - Nested entry type.
All Implemented Interfaces:
Extension, ILink, Reference

public class EntryLink<E extends BaseEntry<?>>
extends Link

The EntryLink class defines the object model for a link entity that refers to a GData entry. The entry content may be included inline via child elements of the entry 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 interface com.google.gdata.data.ILink
ILink.Rel, ILink.Type
 
Constructor Summary
EntryLink()
          Constructs an entry link that points to an Entry.
EntryLink(java.lang.Class<E> entryClass)
          Constructs an entry link that points to the given entry type.
 
Method Summary
 void generate(XmlWriter w, ExtensionProfile extProfile)
          Generates an XML representation for the extension.
static ExtensionDescription getDefaultDescription()
          Returns the suggested extension description.
 E getEntry()
           
 java.lang.Class<E> getEntryClass()
           
 XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
          The default implementation uses the AttributesHandler to handle parsing the extension.
 boolean getReadOnly()
           
 java.lang.String getType()
          Returns the mime type of the link.
 void setEntry(E v)
           
 void setReadOnly(boolean v)
           
 
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, addRepeatingExtension, declareExtensions, generateCumulativeXmlBlob, getExtension, getExtensions, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit
 
Methods inherited from class com.google.gdata.data.AbstractExtension
disableStrictValidation, enableStrictValidation, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryLink

public EntryLink()
Constructs an entry link that points to an Entry.


EntryLink

public EntryLink(java.lang.Class<E> entryClass)
Constructs an entry link that points to the given entry type.

Parameters:
entryClass - Entry class.
Method Detail

getReadOnly

public boolean getReadOnly()

setReadOnly

public void setReadOnly(boolean v)

getEntry

public E getEntry()

setEntry

public void setEntry(E v)

getEntryClass

public java.lang.Class<E> getEntryClass()

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

generate

public void generate(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 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