public class Link extends ExtensionPoint implements ILink
| Modifier and Type | Class and Description |
|---|---|
class |
Link.AtomHandler
<atom:link> parser.
|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandlerAbstractExtension.AttributesHandlerILink.Rel, ILink.Type| Modifier and Type | Field and Description |
|---|---|
protected Content |
content
Nested atom:content element or
null if no inlined link content. |
protected String |
etag
Etag of linked resource, or
null if unknown |
protected String |
href
Link URI.
|
protected String |
hrefLang
Language of resource pointed to by href.
|
protected long |
length
Length of the resource pointed to by href, in bytes.
|
protected String |
rel
Link relation type.
|
protected String |
title
Link title.
|
protected String |
titleLang
Language of link title.
|
protected String |
type
MIME type of the link target.
|
xmlBloblocalName, namespace| Constructor and Description |
|---|
Link() |
Link(String rel,
String type,
String href) |
| Modifier and Type | Method and Description |
|---|---|
void |
generate(XmlWriter w,
ExtensionProfile p)
Generates an XML representation for the extension.
|
void |
generateAtom(XmlWriter w,
ExtensionProfile extProfile)
Generates XML in the Atom format.
|
void |
generateRss(XmlWriter w)
Generates XML in the RSS format.
|
Content |
getContent() |
String |
getEtag() |
XmlParser.ElementHandler |
getHandler(ExtensionProfile p,
String namespace,
String localName,
Attributes attrs)
The default implementation uses the
AbstractExtension.AttributesHandler to handle
parsing the extension. |
String |
getHref()
Returns the value of the resource reference.
|
String |
getHrefLang() |
long |
getLength() |
String |
getRel()
Returns the link relation type.
|
String |
getTitle() |
String |
getTitleLang() |
String |
getType()
Returns the mime type of the link.
|
boolean |
matches(String relToMatch,
String typeToMatch)
Returns whether this link matches the given
rel and type
values. |
void |
setContent(Content c) |
void |
setEtag(String v) |
void |
setHref(String v)
Sets the value of the resource reference.
|
void |
setHrefLang(String v) |
void |
setLength(long v) |
void |
setRel(String v)
Sets the link relation type.
|
void |
setTitle(String v) |
void |
setTitleLang(String v) |
void |
setType(String v)
Sets the mime type of the link.
|
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildrenconsumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validateprotected String rel
self, prev, next, enclosure, etc.protected String type
protected String href
protected String hrefLang
protected String title
protected String titleLang
protected long length
protected Content content
null if no inlined link content.protected String etag
null if unknownpublic String getRel()
ILinkILink.Rel class.public void setRel(String v)
ILinkpublic String getType()
ILinkpublic void setType(String v)
ILinkpublic String getHref()
Referencepublic void setHref(String v)
Referencepublic String getHrefLang()
public void setHrefLang(String v)
public String getTitle()
public void setTitle(String v)
public String getTitleLang()
public void setTitleLang(String v)
public long getLength()
public void setLength(long v)
public Content getContent()
public void setContent(Content c)
public String getEtag()
public void setEtag(String v)
public boolean matches(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 XmlParser.ElementHandler getHandler(ExtensionProfile p, String namespace, String localName, Attributes attrs)
AbstractExtensionAbstractExtension.AttributesHandler to handle
parsing the extension.getHandler in interface ExtensiongetHandler in class ExtensionPointp - extension profilenamespace - extension namespacelocalName - tag name, without the namespace prefixattrs - tag attributespublic void generate(XmlWriter w, ExtensionProfile p) throws IOException
Extensiongenerate in interface Extensiongenerate in class AbstractExtensionw - XML writerp - extension profileIOExceptionpublic void generateAtom(XmlWriter w, ExtensionProfile extProfile) throws IOException
w - Output writer.extProfile - Extension profile.IOExceptionpublic void generateRss(XmlWriter w) throws IOException
w - Output writer.IOExceptionCopyright © 2012. All Rights Reserved.