public class

Source

extends Element
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.atom.Source
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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*)
   }
 

Summary

Nested Classes
class Source.Generator Class representing atom:generator. 
Fields
public static final ElementKey<Void, Source> CONSTRUCT The key for Source used as a construct.
public static final ElementKey<URI, Element> ICON atom:icon
public static final ElementKey<String, Element> ID The atom:id element.
public static final ElementKey<Void, Source> KEY The key for this element.
public static final ElementKey<URI, Element> LOGO atom:logo
public static final ElementKey<String, TextContent> RIGHTS atom:rights
public static final ElementKey<String, TextContent> SUBTITLE atom:subtitle
public static final ElementKey<String, TextContent> TITLE atom:title
public static final ElementKey<DateTimeElement> UPDATED atom:updated
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
Source()
Constructs a new instance using the default metadata.
Protected Constructors
Source(ElementKey<?, ? extends Source> key)
Constructs a new instance using the specified element metadata.
Source(Source sourceSource)
Copy constructor that initializes a new Source instance to have identical contents to another instance, using a shared reference to the same child element instances.
Source(ElementKey<?, ? extends Source> key, Element source)
Copy constructor that initializes a new Source instance to have identical contents to another element, using a shared state.
Public Methods
void addAuthor(Person v)
void addAuthors(List<Person> v)
void addCategory(Category v)
void addContributor(Person v)
void addContributors(List<Person> v)
void addHtmlLink(String htmlUrl, String lang, String title)
Adds a link pointing to an HTML representation.
void addLink(Link v)
Link addLink(String rel, String type, String href)
void clearAuthors()
void clearCategories()
void clearContributors()
void clearLinks()
List<Person> getAuthors()
Set<Category> getCategories()
List<Person> getContributors()
Source.Generator getGenerator()
Link getHtmlLink()
Retrieves the first HTML link.
String getIcon()
This method is deprecated. Use getIconUri() instead.
URI getIconUri()
Gets icon URI associated with source.
String getId()
Link getLink(String rel, String type)
Retrieves the first link with the supplied rel and/or type value.
List<Link> getLinks()
List<Link> getLinks(String relToMatch, String typeToMatch)
Return the links that match the given rel and type values.
String getLogo()
This method is deprecated. Use getLogoUri() instead.
URI getLogoUri()
Gets logo URI associated with source.
TextContent getRights()
TextContent getSubtitle()
TextContent getTitle()
DateTime getUpdated()
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
boolean removeAuthor(Person v)
boolean removeContributor(Person v)
boolean removeLink(Link link)
void removeLinks(String relToMatch, String typeToMatch)
Remove all links that match the given rel and type values.
Source.Generator setGenerator(String version, String uri, String name)
void setGenerator(Source.Generator v)
void setIcon(URI v)
Sets icon URI associated with source.
void setIcon(String v)
This method is deprecated. Use setIcon(URI) instead.
void setId(String v)
void setLogo(String v)
This method is deprecated. Use setLogo(URI) instead.
void setLogo(URI v)
Sets logo URI associated with source.
void setRights(TextContent v)
void setSubtitle(TextContent v)
void setTitle(TextContent v)
void setUpdated(DateTime v)
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final ElementKey<Void, Source> CONSTRUCT

The key for Source used as a construct. This will apply to all uses of Source regardless of QName, in particular to Feed.

public static final ElementKey<URI, Element> ICON

atom:icon

public static final ElementKey<String, Element> ID

The atom:id element. somewhere else.

public static final ElementKey<Void, Source> KEY

The key for this element.

public static final ElementKey<URI, Element> LOGO

atom:logo

public static final ElementKey<String, TextContent> RIGHTS

atom:rights

public static final ElementKey<String, TextContent> SUBTITLE

atom:subtitle

public static final ElementKey<String, TextContent> TITLE

atom:title

public static final ElementKey<DateTimeElement> UPDATED

atom:updated

Public Constructors

public Source ()

Constructs a new instance using the default metadata.

Protected Constructors

protected Source (ElementKey<?, ? extends Source> key)

Constructs a new instance using the specified element metadata.

Parameters
key Element key for this element.

protected Source (Source sourceSource)

Copy constructor that initializes a new Source instance to have identical contents to another instance, using a shared reference to the same child element instances. Default metadata is used.

Parameters
sourceSource

protected Source (ElementKey<?, ? extends Source> key, Element source)

Copy constructor that initializes a new Source instance to have identical contents to another element, using a shared state. The element key is given by the caller.

Parameters
key Element key to associate with copy
source Source to copy data from

Public Methods

public void addAuthor (Person v)

Parameters
v

public void addAuthors (List<Person> v)

Parameters
v

public void addCategory (Category v)

Parameters
v

public void addContributor (Person v)

Parameters
v

public void addContributors (List<Person> v)

Parameters
v

public void addHtmlLink (String htmlUrl, String lang, String title)

Adds a link pointing to an HTML representation.

Parameters
htmlUrl Link URL
lang Optional language code
title Optional title

public void addLink (Link v)

Parameters
v

public Link addLink (String rel, String type, String href)

Parameters
rel
type
href

public void clearAuthors ()

public void clearCategories ()

public void clearContributors ()

public void clearLinks ()

public List<Person> getAuthors ()

public Set<Category> getCategories ()

public List<Person> getContributors ()

public Source.Generator getGenerator ()

public Link getHtmlLink ()

Retrieves the first HTML link.

Returns
  • the link

public String getIcon ()

This method is deprecated.
Use getIconUri() instead.

Gets icon URI associated with source.

Returns
  • icon URI

public URI getIconUri ()

Gets icon URI associated with source.

Returns
  • icon URI

public String getId ()

public Link getLink (String rel, 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.

Parameters
rel
type

public List<Link> getLinks ()

public List<Link> getLinks (String relToMatch, String typeToMatch)

Return the links that match the given rel and type values.

Parameters
relToMatch rel value to match or null to match any rel value.
typeToMatch type value to match or null to match any type value.
Returns
  • matching links.

public String getLogo ()

This method is deprecated.
Use getLogoUri() instead.

Gets logo URI associated with source.

Returns
  • logo URI

public URI getLogoUri ()

Gets logo URI associated with source.

Returns
  • logo URI

public TextContent getRights ()

public TextContent getSubtitle ()

public TextContent getTitle ()

public DateTime getUpdated ()

public static void registerMetadata (MetadataRegistry registry)

Registers the metadata for this element.

Parameters
registry

public boolean removeAuthor (Person v)

Parameters
v

public boolean removeContributor (Person v)

Parameters
v

public boolean removeLink (Link link)

Parameters
link

public void removeLinks (String relToMatch, String typeToMatch)

Remove all links that match the given rel and type values.

Parameters
relToMatch rel value to match or null to match any rel value.
typeToMatch type value to match or null to match any type value.

public Source.Generator setGenerator (String version, String uri, String name)

Parameters
version
uri
name

public void setGenerator (Source.Generator v)

Parameters
v

public void setIcon (URI v)

Sets icon URI associated with source.

Parameters
v Icon URI

public void setIcon (String v)

This method is deprecated.
Use setIcon(URI) instead.

Sets icon URI associated with source.

Parameters
v Icon URI

public void setId (String v)

Parameters
v

public void setLogo (String v)

This method is deprecated.
Use setLogo(URI) instead.

Sets logo URI associated with source.

Parameters
v Logo URI

public void setLogo (URI v)

Sets logo URI associated with source.

Parameters
v Logo URI

public void setRights (TextContent v)

Parameters
v

public void setSubtitle (TextContent v)

Parameters
v

public void setTitle (TextContent v)

Parameters
v

public void setUpdated (DateTime v)

Parameters
v