Package org.restlet.ext.atom
Class Link
- java.lang.Object
-
- org.restlet.ext.atom.Link
-
public class Link extends java.lang.ObjectDefines a reference from an entry or feed to a Web resource.- Author:
- Jerome Louvel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentgetContent()Returns the content of the entry or links to it.org.restlet.data.ReferencegetHref()Returns the link's IRI.org.restlet.data.LanguagegetHrefLang()Returns the language of the resource pointed to by the href attribute.longgetLength()Returns the advisory length of the linked content in octets.RelationgetRel()Returns the link's relation type.java.lang.StringgetTitle()Returns the human-readable information about the link.org.restlet.data.MediaTypegetType()Returns the advisoty media type.voidsetContent(Content content)Sets the content of the entry or links to it.voidsetHref(org.restlet.data.Reference href)Sets the link's IRI.voidsetHrefLang(org.restlet.data.Language hrefLang)Sets the language of the resource pointed to by the href attribute.voidsetLength(long length)Sets the advisory length of the linked content in octets.voidsetRel(Relation rel)Sets the link's relation type.voidsetTitle(java.lang.String title)Sets the human-readable information about the link.voidsetType(org.restlet.data.MediaType type)Sets the advisoty media type.voidwriteElement(XmlWriter writer)Writes the current object as an XML element using the given SAX writer.
-
-
-
Constructor Detail
-
Link
public Link()
Constructor.
-
Link
public Link(org.restlet.data.Reference href, Relation rel, org.restlet.data.MediaType type)Constructor.- Parameters:
href- The link's IRI.rel- The link's relation type.type- Advisory media type.
-
-
Method Detail
-
getContent
public Content getContent()
Returns the content of the entry or links to it.- Returns:
- The content of the entry or links to it.
-
getHref
public org.restlet.data.Reference getHref()
Returns the link's IRI.- Returns:
- The link's IRI.
-
getHrefLang
public org.restlet.data.Language getHrefLang()
Returns the language of the resource pointed to by the href attribute.- Returns:
- The language of the resource pointed to by the href attribute.
-
getLength
public long getLength()
Returns the advisory length of the linked content in octets.- Returns:
- The advisory length of the linked content in octets.
-
getRel
public Relation getRel()
Returns the link's relation type.- Returns:
- The link's relation type.
-
getTitle
public java.lang.String getTitle()
Returns the human-readable information about the link.- Returns:
- The human-readable information about the link.
-
getType
public org.restlet.data.MediaType getType()
Returns the advisoty media type.- Returns:
- The advisoty media type.
-
setContent
public void setContent(Content content)
Sets the content of the entry or links to it.- Parameters:
content- The content of the entry or links to it.
-
setHref
public void setHref(org.restlet.data.Reference href)
Sets the link's IRI.- Parameters:
href- The link's IRI.
-
setHrefLang
public void setHrefLang(org.restlet.data.Language hrefLang)
Sets the language of the resource pointed to by the href attribute.- Parameters:
hrefLang- The language of the resource pointed to by the href attribute.
-
setLength
public void setLength(long length)
Sets the advisory length of the linked content in octets.- Parameters:
length- The advisory length of the linked content in octets.
-
setRel
public void setRel(Relation rel)
Sets the link's relation type.- Parameters:
rel- The link's relation type.
-
setTitle
public void setTitle(java.lang.String title)
Sets the human-readable information about the link.- Parameters:
title- The human-readable information about the link.
-
setType
public void setType(org.restlet.data.MediaType type)
Sets the advisoty media type.- Parameters:
type- The advisoty media type.
-
writeElement
public void writeElement(XmlWriter writer) throws org.xml.sax.SAXException
Writes the current object as an XML element using the given SAX writer.- Parameters:
writer- The SAX writer.- Throws:
org.xml.sax.SAXException
-
-