public class Source extends Element
<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*)
}
| Modifier and Type | Class and Description |
|---|---|
static class |
Source.Generator
Class representing atom:generator.
|
| Modifier and Type | Field and Description |
|---|---|
static ElementKey<Void,Source> |
CONSTRUCT
The key for Source used as a construct.
|
static ElementKey<URI,Element> |
ICON
atom:icon
|
static ElementKey<String,Element> |
ID
The atom:id element.
|
static ElementKey<Void,Source> |
KEY
The key for this element.
|
static ElementKey<URI,Element> |
LOGO
atom:logo
|
static ElementKey<String,TextContent> |
RIGHTS
atom:rights
|
static ElementKey<String,TextContent> |
SUBTITLE
atom:subtitle
|
static ElementKey<String,TextContent> |
TITLE
atom:title
|
static ElementKey<DateTime,Element> |
UPDATED
atom:updated
|
| Modifier | Constructor and Description |
|---|---|
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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()
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()
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. |
void |
setGenerator(Source.Generator v) |
Source.Generator |
setGenerator(String version,
String uri,
String name) |
void |
setIcon(String v)
Deprecated.
Use
setIcon(URI) instead. |
void |
setIcon(URI v)
Sets icon URI associated with source.
|
void |
setId(String v) |
void |
setLogo(String v)
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) |
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, lock, narrow, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, visitpublic static final ElementKey<Void,Source> CONSTRUCT
public static final ElementKey<Void,Source> KEY
public static final ElementKey<String,Element> ID
public static final ElementKey<DateTime,Element> UPDATED
public static final ElementKey<String,TextContent> TITLE
public static final ElementKey<String,TextContent> SUBTITLE
public static final ElementKey<String,TextContent> RIGHTS
public static final ElementKey<URI,Element> ICON
public static final ElementKey<URI,Element> LOGO
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 frompublic static void registerMetadata(MetadataRegistry registry)
public String getId()
public void setId(String v)
public DateTime getUpdated()
public void setUpdated(DateTime v)
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 String getIcon()
getIconUri() instead.public URI getIconUri()
@Deprecated public void setIcon(String v)
setIcon(URI) instead.v - icon URIpublic void setIcon(URI v)
v - icon URI@Deprecated public String getLogo()
getLogoUri() instead.public URI getLogoUri()
@Deprecated public void setLogo(String v)
setLogo(URI) instead.v - logo URIpublic void setLogo(URI v)
v - logo URIpublic void addLink(Link v)
public boolean removeLink(Link link)
public void clearLinks()
public void addAuthor(Person v)
public boolean removeAuthor(Person v)
public void clearAuthors()
public void addContributor(Person v)
public boolean removeContributor(Person v)
public void clearContributors()
public Source.Generator getGenerator()
public void setGenerator(Source.Generator v)
public Source.Generator setGenerator(String version, String uri, String name)
public Link getLink(String rel, String type)
rel and/or type
value.
If either parameter is null, doesn't return matches for that
parameter.
public List<Link> getLinks(String relToMatch, 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(String relToMatch, 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(String htmlUrl, String lang, String title)
htmlUrl - link URLlang - optional language codetitle - optional titlepublic Link getHtmlLink()
Copyright © 2012. All Rights Reserved.