public class Source extends ExtensionPoint
<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 |
---|---|
class |
Source.SourceHandler
<atom:source> parser. |
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
Constructor and Description |
---|
Source()
Constructs a new
Source instance with no initial state. |
Modifier and Type | Method and Description |
---|---|
void |
addHtmlLink(java.lang.String htmlUri,
java.lang.String lang,
java.lang.String title)
Adds a link pointing to an HTML representation.
|
void |
addLink(Link link) |
Link |
addLink(java.lang.String rel,
java.lang.String type,
java.lang.String href) |
void |
generateAtom(XmlWriter w,
ExtensionProfile extProfile)
Generates XML in the Atom format.
|
java.util.List<Person> |
getAuthors() |
java.util.Set<Category> |
getCategories() |
java.util.List<Person> |
getContributors() |
Generator |
getGenerator() |
Link |
getHtmlLink()
Retrieves the first HTML link.
|
java.lang.String |
getIcon() |
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() |
TextConstruct |
getRights() |
TextConstruct |
getSubtitle() |
TextConstruct |
getTitle() |
DateTime |
getUpdated() |
void |
parseAtom(ExtensionProfile extProfile,
java.io.InputStream stream)
Parses XML in the Atom format.
|
void |
parseAtom(ExtensionProfile extProfile,
java.io.Reader reader)
Parses XML in the Atom format.
|
void |
removeLinks()
Removes all links.
|
void |
removeLinks(java.lang.String relToMatch,
java.lang.String typeToMatch)
Remove all links that match the given
rel and type values. |
void |
setGenerator(Generator v) |
Generator |
setGenerator(java.lang.String version,
java.lang.String uri,
java.lang.String name) |
void |
setIcon(java.lang.String v) |
void |
setId(java.lang.String v) |
void |
setLogo(java.lang.String v) |
void |
setRights(TextConstruct v) |
void |
setSubtitle(TextConstruct v) |
void |
setTitle(TextConstruct v) |
void |
setUpdated(DateTime v) |
addExtension, addRepeatingExtension, declareExtensions, generateCumulativeXmlBlob, getExtension, getExtensions, getHandler, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit
disableStrictValidation, enableStrictValidation, generate, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable
public Source()
Source
instance with no initial state.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 TextConstruct getTitle()
public void setTitle(TextConstruct v)
public TextConstruct getSubtitle()
public void setSubtitle(TextConstruct v)
public TextConstruct getRights()
public void setRights(TextConstruct v)
public java.lang.String getIcon()
public void setIcon(java.lang.String v)
public java.lang.String getLogo()
public void setLogo(java.lang.String v)
public java.util.List<Link> getLinks()
public java.util.List<Person> getAuthors()
public java.util.List<Person> getContributors()
public Generator getGenerator()
public void setGenerator(Generator v)
public 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 addLink(Link link)
public Link addLink(java.lang.String rel, java.lang.String type, java.lang.String href)
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 removeLinks()
public void addHtmlLink(java.lang.String htmlUri, java.lang.String lang, java.lang.String title)
htmlUri
- link URIlang
- optional language codetitle
- optional titlepublic Link getHtmlLink()
public void generateAtom(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
w
- output writerextProfile
- extension profilejava.io.IOException
public void parseAtom(ExtensionProfile extProfile, java.io.InputStream stream) throws java.io.IOException, ParseException
extProfile
- extension profilestream
- XML input streamjava.io.IOException
ParseException
public void parseAtom(ExtensionProfile extProfile, java.io.Reader reader) throws java.io.IOException, ParseException
extProfile
- extension profilereader
- XML Reader. The caller is responsible for ensuring that
the character encoding is correct.java.io.IOException
ParseException