public class Link
extends java.lang.Object
Constructor and Description |
---|
Link()
Constructor.
|
Link(Reference href,
Relation rel,
MediaType type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Content |
getContent()
Returns the content of the entry or links to it.
|
Reference |
getHref()
Returns the link's IRI.
|
Language |
getHrefLang()
Returns the language of the resource pointed to by the href attribute.
|
long |
getLength()
Returns the advisory length of the linked content in octets.
|
Relation |
getRel()
Returns the link's relation type.
|
java.lang.String |
getTitle()
Returns the human-readable information about the link.
|
MediaType |
getType()
Returns the advisoty media type.
|
void |
setContent(Content content)
Sets the content of the entry or links to it.
|
void |
setHref(Reference href)
Sets the link's IRI.
|
void |
setHrefLang(Language hrefLang)
Sets the language of the resource pointed to by the href attribute.
|
void |
setLength(long length)
Sets the advisory length of the linked content in octets.
|
void |
setRel(Relation rel)
Sets the link's relation type.
|
void |
setTitle(java.lang.String title)
Sets the human-readable information about the link.
|
void |
setType(MediaType type)
Sets the advisoty media type.
|
void |
writeElement(XmlWriter writer)
Writes the current object as an XML element using the given SAX writer.
|
public Content getContent()
public Reference getHref()
public Language getHrefLang()
public long getLength()
public Relation getRel()
public java.lang.String getTitle()
public MediaType getType()
public void setContent(Content content)
content
- The content of the entry or links to it.public void setHref(Reference href)
href
- The link's IRI.public void setHrefLang(Language hrefLang)
hrefLang
- The language of the resource pointed to by the href attribute.public void setLength(long length)
length
- The advisory length of the linked content in octets.public void setRel(Relation rel)
rel
- The link's relation type.public void setTitle(java.lang.String title)
title
- The human-readable information about the link.public void setType(MediaType type)
type
- The advisoty media type.public void writeElement(XmlWriter writer) throws org.xml.sax.SAXException
writer
- The SAX writer.org.xml.sax.SAXException
Copyright © 2005-2020 Restlet.