|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.Element
com.google.gdata.model.atom.Link
public class Link
Class representing atom:link.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.google.gdata.data.ILink |
---|
ILink.Rel, ILink.Type |
Field Summary | |
---|---|
static AttributeKey<java.lang.String> |
ETAG
The etag attribute. |
static AttributeKey<java.lang.String> |
HREF
The href attribute. |
static AttributeKey<java.lang.String> |
HREFLANG
The hreflang attribute. |
static ElementKey<java.lang.Void,Link> |
KEY
The key for this element. |
static AttributeKey<java.lang.Long> |
LENGTH
The length attribute. |
static AttributeKey<java.lang.String> |
REL
The rel attribute. |
static AttributeKey<java.lang.String> |
TITLE
The title attribute. |
static AttributeKey<java.lang.String> |
TYPE
The type attribute. |
static AttributeKey<java.lang.String> |
XML_LANG
The xml:lang attribute. |
Constructor Summary | |
---|---|
Link()
Constructs a new instance using the default metadata. |
|
Link(java.lang.String rel,
java.lang.String type,
java.lang.String href)
Deprecated. Use Link(String, String, URI) instead. |
|
Link(java.lang.String rel,
java.lang.String type,
java.net.URI href)
Constructs a new instance using the default metadata, and setting the links rel, type, and href attributes. |
Method Summary | |
---|---|
Content |
getContent()
Return the content of the link, or null if no content has been set. |
java.lang.String |
getEtag()
Etag of linked resource or null if unknown. |
java.lang.String |
getHref()
Link URI. |
java.lang.String |
getHrefLang()
Language of resource pointed to by href. |
java.net.URI |
getHrefUri()
|
long |
getLength()
|
java.lang.String |
getRel()
Link relation type. |
java.lang.String |
getTitle()
Link title. |
java.lang.String |
getTitleLang()
Language of link title. |
java.lang.String |
getType()
MIME type of the link target. |
boolean |
matches(java.lang.String relToMatch,
java.lang.String typeToMatch)
Returns whether this link matches the given rel and type
values. |
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element. |
void |
setContent(Content c)
Sets the atom:content element nested inside this atom:link. |
void |
setEtag(java.lang.String v)
|
void |
setHref(java.lang.String v)
Sets the value of the resource reference. |
void |
setHref(java.net.URI v)
|
void |
setHrefLang(java.lang.String v)
|
void |
setLength(long v)
|
void |
setRel(java.lang.String v)
Sets the link relation type. |
void |
setTitle(java.lang.String v)
|
void |
setTitleLang(java.lang.String v)
|
void |
setType(java.lang.String v)
Sets the mime type of the link. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ElementKey<java.lang.Void,Link> KEY
public static final AttributeKey<java.lang.String> HREF
public static final AttributeKey<java.lang.String> REL
public static final AttributeKey<java.lang.String> TYPE
public static final AttributeKey<java.lang.String> HREFLANG
public static final AttributeKey<java.lang.String> TITLE
public static final AttributeKey<java.lang.String> XML_LANG
public static final AttributeKey<java.lang.Long> LENGTH
public static final AttributeKey<java.lang.String> ETAG
Constructor Detail |
---|
public Link()
@Deprecated public Link(java.lang.String rel, java.lang.String type, java.lang.String href)
Link(String, String, URI)
instead.
public Link(java.lang.String rel, java.lang.String type, java.net.URI href)
Method Detail |
---|
public static void registerMetadata(MetadataRegistry registry)
public java.lang.String getRel()
self
, prev
, next
, enclosure
, etc.
getRel
in interface ILink
ILink.Rel
public void setRel(java.lang.String v)
ILink
setRel
in interface ILink
public java.lang.String getType()
getType
in interface ILink
public void setType(java.lang.String v)
ILink
setType
in interface ILink
public java.lang.String getHref()
getHref
in interface Reference
public java.net.URI getHrefUri()
public void setHref(java.lang.String v)
Reference
setHref
in interface Reference
v
- the resource href.public void setHref(java.net.URI v)
public java.lang.String getHrefLang()
public void setHrefLang(java.lang.String v)
public java.lang.String getTitle()
public void setTitle(java.lang.String v)
public java.lang.String getTitleLang()
public void setTitleLang(java.lang.String v)
public long getLength()
public void setLength(long v)
public java.lang.String getEtag()
null
if unknown.
public void setEtag(java.lang.String v)
public Content getContent()
null
if no content has been set.
This is used to inline an atom:content element inside an atom:link element.
public void setContent(Content c)
c
- the content to place inside the link.public boolean matches(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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |