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<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
|
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(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) |
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, visit
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
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 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()