public interface Link extends ExtensibleElement
Represents an Atom Link element.
Per RFC4287:
The "atom:link" element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element. atomLink = element atom:link { atomCommonAttributes, attribute href { atomUri }, attribute rel { atomNCName | atomUri }?, attribute type { atomMediaType }?, attribute hreflang { atomLanguageTag }?, attribute title { text }?, attribute length { text }?, undefinedContent }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IANA_BASE |
static java.lang.String |
REL_ALTERNATE |
static java.lang.String |
REL_ALTERNATE_IANA |
static java.lang.String |
REL_CURRENT |
static java.lang.String |
REL_CURRENT_IANA |
static java.lang.String |
REL_EDIT |
static java.lang.String |
REL_EDIT_IANA |
static java.lang.String |
REL_EDIT_MEDIA |
static java.lang.String |
REL_EDIT_MEDIA_IANA |
static java.lang.String |
REL_ENCLOSURE |
static java.lang.String |
REL_ENCLOSURE_IANA |
static java.lang.String |
REL_FIRST |
static java.lang.String |
REL_FIRST_IANA |
static java.lang.String |
REL_LAST |
static java.lang.String |
REL_LAST_IANA |
static java.lang.String |
REL_LICENSE |
static java.lang.String |
REL_LICENSE_IANA |
static java.lang.String |
REL_NEXT |
static java.lang.String |
REL_NEXT_IANA |
static java.lang.String |
REL_PAYMENT |
static java.lang.String |
REL_PAYMENT_IANA |
static java.lang.String |
REL_PREVIOUS |
static java.lang.String |
REL_PREVIOUS_IANA |
static java.lang.String |
REL_RELATED |
static java.lang.String |
REL_RELATED_IANA |
static java.lang.String |
REL_REPLIES |
static java.lang.String |
REL_REPLIES_IANA |
static java.lang.String |
REL_SELF |
static java.lang.String |
REL_SELF_IANA |
static java.lang.String |
REL_SERVICE |
static java.lang.String |
REL_SERVICE_IANA |
static java.lang.String |
REL_VIA |
static java.lang.String |
REL_VIA_IANA |
Modifier and Type | Method and Description |
---|---|
IRI |
getHref()
RFC4287: The "href" attribute contains the link's IRI.
|
java.lang.String |
getHrefLang()
RFC4287: The "hreflang" attribute's content describes the language of the
resource pointed to by the href attribute.
|
long |
getLength()
RFC4287: The "length" attribute indicates an advisory length of the linked
content in octets; it is a hint about the content length of the
representation returned when the URI in the href attribute is mapped
to a IRI and dereferenced.
|
javax.activation.MimeType |
getMimeType()
RFC4287: On the link element, the "type" attribute's value is an advisory
media type: it is a hint about the type of the representation that is
expected to be returned when the value of the href attribute is
dereferenced.
|
java.lang.String |
getRel()
RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link
relation type.
|
IRI |
getResolvedHref()
Returns the value of the link's href attribute resolved against the
in-scope Base IRI
|
java.lang.String |
getTitle()
RFC4287: The "title" attribute conveys human-readable information about the
link.
|
Link |
setHref(java.lang.String href)
RFC4287: The "href" attribute contains the link's IRI.
|
Link |
setHrefLang(java.lang.String lang)
RFC4287: The "hreflang" attribute's content describes the language of the
resource pointed to by the href attribute.
|
Link |
setLength(long length)
RFC4287: The "length" attribute indicates an advisory length of the linked
content in octets; it is a hint about the content length of the
representation returned when the IRI in the href attribute is mapped
to a URI and dereferenced.
|
Link |
setMimeType(java.lang.String type)
RFC4287: On the link element, the "type" attribute's value is an advisory
media type: it is a hint about the type of the representation that is
expected to be returned when the value of the href attribute is
dereferenced.
|
Link |
setRel(java.lang.String rel)
RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link
relation type.
|
Link |
setTitle(java.lang.String title)
RFC4287: The "title" attribute conveys human-readable information about the
link.
|
addExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtension
declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getElements, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText
static final java.lang.String REL_ALTERNATE
static final java.lang.String REL_CURRENT
static final java.lang.String REL_ENCLOSURE
static final java.lang.String REL_FIRST
static final java.lang.String REL_LAST
static final java.lang.String REL_NEXT
static final java.lang.String REL_PAYMENT
static final java.lang.String REL_PREVIOUS
static final java.lang.String REL_RELATED
static final java.lang.String REL_SELF
static final java.lang.String REL_VIA
static final java.lang.String REL_REPLIES
static final java.lang.String REL_LICENSE
static final java.lang.String REL_EDIT
static final java.lang.String REL_EDIT_MEDIA
static final java.lang.String REL_SERVICE
static final java.lang.String IANA_BASE
static final java.lang.String REL_ALTERNATE_IANA
static final java.lang.String REL_CURRENT_IANA
static final java.lang.String REL_ENCLOSURE_IANA
static final java.lang.String REL_FIRST_IANA
static final java.lang.String REL_LAST_IANA
static final java.lang.String REL_NEXT_IANA
static final java.lang.String REL_PAYMENT_IANA
static final java.lang.String REL_PREVIOUS_IANA
static final java.lang.String REL_RELATED_IANA
static final java.lang.String REL_SELF_IANA
static final java.lang.String REL_VIA_IANA
static final java.lang.String REL_REPLIES_IANA
static final java.lang.String REL_LICENSE_IANA
static final java.lang.String REL_EDIT_IANA
static final java.lang.String REL_EDIT_MEDIA_IANA
static final java.lang.String REL_SERVICE_IANA
IRI getHref()
IRISyntaxException
- if the href is malformedIRI getResolvedHref()
IRISyntaxException
- if the href is malformedLink setHref(java.lang.String href)
href
- The href IRIIRISyntaxException
- if the href is malformedjava.lang.String getRel()
RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate"... The value of "rel" MUST be a string that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987]. Note that use of a relative reference other than a simple name is not allowed. If a name is given, implementations MUST consider the link relation type equivalent to the same name registered within the IANA Registry of Link Relations (Section 7), and thus to the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on Atom Processors.
Link setRel(java.lang.String rel)
RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate"... The value of "rel" MUST be a string that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987]. Note that use of a relative reference other than a simple name is not allowed. If a name is given, implementations MUST consider the link relation type equivalent to the same name registered within the IANA Registry of Link Relations (Section 7), and thus to the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on Atom Processors.
rel
- The rel attribute valuejavax.activation.MimeType getMimeType()
MimeTypeParseException
- if the type is malformedLink setMimeType(java.lang.String type)
type
- The link typeMimeTypeParseException
- if the type is malformedjava.lang.String getHrefLang()
Link setHrefLang(java.lang.String lang)
lang
- The hreflang valuejava.lang.String getTitle()
Link setTitle(java.lang.String title)
title
- The title attributelong getLength()
Link setLength(long length)
length
- The length attribute valueCopyright © 2010 - 2020 Adobe. All Rights Reserved