|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.Element
com.google.gdata.model.atom.Source
public class Source
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 | |
---|---|
static class |
Source.Generator
Class representing atom:generator. |
Field Summary | |
---|---|
static ElementKey<java.lang.Void,Source> |
CONSTRUCT
The key for Source used as a construct. |
static ElementKey<java.net.URI,Element> |
ICON
atom:icon |
static ElementKey<java.lang.String,Element> |
ID
The atom:id element. |
static ElementKey<java.lang.Void,Source> |
KEY
The key for this element. |
static ElementKey<java.net.URI,Element> |
LOGO
atom:logo |
static ElementKey<java.lang.String,TextContent> |
RIGHTS
atom:rights |
static ElementKey<java.lang.String,TextContent> |
SUBTITLE
atom:subtitle |
static ElementKey<java.lang.String,TextContent> |
TITLE
atom:title |
static ElementKey<DateTime,Element> |
UPDATED
atom:updated |
Constructor Summary | |
---|---|
|
Source()
Constructs a new instance using the default metadata. |
protected |
Source(ElementKey<?,? extends Source> key)
Constructs a new instance using the specified element metadata. |
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. |
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. |
Method Summary | |
---|---|
void |
addAuthor(Person v)
|
void |
addAuthors(java.util.List<Person> v)
|
void |
addCategory(Category v)
|
void |
addContributor(Person v)
|
void |
addContributors(java.util.List<Person> v)
|
void |
addHtmlLink(java.lang.String htmlUrl,
java.lang.String lang,
java.lang.String title)
Adds a link pointing to an HTML representation. |
void |
addLink(Link v)
|
Link |
addLink(java.lang.String rel,
java.lang.String type,
java.lang.String href)
|
void |
clearAuthors()
|
void |
clearCategories()
|
void |
clearContributors()
|
void |
clearLinks()
|
java.util.List<Person> |
getAuthors()
|
java.util.Set<Category> |
getCategories()
|
java.util.List<Person> |
getContributors()
|
Source.Generator |
getGenerator()
|
Link |
getHtmlLink()
Retrieves the first HTML link. |
java.lang.String |
getIcon()
Deprecated. Use getIconUri() instead. |
java.net.URI |
getIconUri()
Gets icon URI associated with source. |
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.util.List<Link> |
getLinks(java.lang.String relToMatch,
java.lang.String typeToMatch)
Return the links that match the given rel and type values. |
java.lang.String |
getLogo()
Deprecated. Use getLogoUri() instead. |
java.net.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(java.lang.String relToMatch,
java.lang.String typeToMatch)
Remove all links that match the given rel and type values. |
void |
setGenerator(Source.Generator v)
|
Source.Generator |
setGenerator(java.lang.String version,
java.lang.String uri,
java.lang.String name)
|
void |
setIcon(java.lang.String v)
Deprecated. Use setIcon(URI) instead. |
void |
setIcon(java.net.URI v)
Sets icon URI associated with source. |
void |
setId(java.lang.String v)
|
void |
setLogo(java.lang.String v)
Deprecated. Use setLogo(URI) instead. |
void |
setLogo(java.net.URI v)
Sets logo URI associated with source. |
void |
setRights(TextContent v)
|
void |
setSubtitle(TextContent v)
|
void |
setTitle(TextContent v)
|
void |
setUpdated(DateTime v)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ElementKey<java.lang.Void,Source> CONSTRUCT
public static final ElementKey<java.lang.Void,Source> KEY
public static final ElementKey<java.lang.String,Element> ID
public static final ElementKey<DateTime,Element> UPDATED
public static final ElementKey<java.lang.String,TextContent> TITLE
public static final ElementKey<java.lang.String,TextContent> SUBTITLE
public static final ElementKey<java.lang.String,TextContent> RIGHTS
public static final ElementKey<java.net.URI,Element> ICON
public static final ElementKey<java.net.URI,Element> LOGO
Constructor Detail |
---|
public Source()
protected Source(ElementKey<?,? extends Source> key)
key
- element key for this element.protected Source(Source sourceSource)
protected Source(ElementKey<?,? extends Source> key, Element source)
key
- element key to associate with copysource
- source to copy data fromMethod Detail |
---|
public static void registerMetadata(MetadataRegistry registry)
public java.lang.String getId()
public void setId(java.lang.String v)
public DateTime getUpdated()
public void setUpdated(DateTime v)
public java.util.Set<Category> getCategories()
public void addCategory(Category v)
public void clearCategories()
public TextContent getTitle()
public void setTitle(TextContent v)
public TextContent getSubtitle()
public void setSubtitle(TextContent v)
public TextContent getRights()
public void setRights(TextContent v)
@Deprecated public java.lang.String getIcon()
getIconUri()
instead.
public java.net.URI getIconUri()
@Deprecated public void setIcon(java.lang.String v)
setIcon(URI)
instead.
v
- icon URIpublic void setIcon(java.net.URI v)
v
- icon URI@Deprecated public java.lang.String getLogo()
getLogoUri()
instead.
public java.net.URI getLogoUri()
@Deprecated public void setLogo(java.lang.String v)
setLogo(URI)
instead.
v
- logo URIpublic void setLogo(java.net.URI v)
v
- logo URIpublic java.util.List<Link> getLinks()
public void addLink(Link v)
public Link addLink(java.lang.String rel, java.lang.String type, java.lang.String href)
public boolean removeLink(Link link)
public void clearLinks()
public java.util.List<Person> getAuthors()
public void addAuthor(Person v)
public void addAuthors(java.util.List<Person> v)
public boolean removeAuthor(Person v)
public void clearAuthors()
public java.util.List<Person> getContributors()
public void addContributor(Person v)
public void addContributors(java.util.List<Person> v)
public boolean removeContributor(Person v)
public void clearContributors()
public Source.Generator getGenerator()
public void setGenerator(Source.Generator v)
public Source.Generator setGenerator(java.lang.String version, java.lang.String uri, java.lang.String name)
public Link getLink(java.lang.String rel, java.lang.String type)
rel
and/or type
value.
If either parameter is null
, doesn't return matches for that
parameter.
public java.util.List<Link> getLinks(java.lang.String relToMatch, java.lang.String typeToMatch)
rel
and type
values.
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 void removeLinks(java.lang.String relToMatch, java.lang.String typeToMatch)
rel
and type
values.
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 void addHtmlLink(java.lang.String htmlUrl, java.lang.String lang, java.lang.String title)
htmlUrl
- link URLlang
- optional language codetitle
- optional titlepublic Link getHtmlLink()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |