|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.Link
public class Link
External link type.
Nested Class Summary | |
---|---|
class |
Link.AtomHandler
<atom:link> parser. |
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint |
---|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler |
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension |
---|
AbstractExtension.AttributesHandler |
Nested classes/interfaces inherited from interface com.google.gdata.data.ILink |
---|
ILink.Rel, ILink.Type |
Field Summary | |
---|---|
protected Content |
content
Nested atom:content element or null if no inlined link content. |
protected java.lang.String |
etag
Etag of linked resource, or null if unknown |
protected java.lang.String |
href
Link URI. |
protected java.lang.String |
hrefLang
Language of resource pointed to by href. |
protected long |
length
Length of the resource pointed to by href, in bytes. |
protected java.lang.String |
rel
Link relation type. |
protected java.lang.String |
title
Link title. |
protected java.lang.String |
titleLang
Language of link title. |
protected java.lang.String |
type
MIME type of the link target. |
Fields inherited from class com.google.gdata.data.ExtensionPoint |
---|
xmlBlob |
Fields inherited from class com.google.gdata.data.AbstractExtension |
---|
localName, namespace |
Constructor Summary | |
---|---|
Link()
|
|
Link(java.lang.String rel,
java.lang.String type,
java.lang.String href)
|
Method Summary | |
---|---|
void |
generate(com.google.gdata.util.common.xml.XmlWriter w,
ExtensionProfile p)
Generates an XML representation for the extension. |
void |
generateAtom(com.google.gdata.util.common.xml.XmlWriter w,
ExtensionProfile extProfile)
Generates XML in the Atom format. |
void |
generateRss(com.google.gdata.util.common.xml.XmlWriter w)
Generates XML in the RSS format. |
Content |
getContent()
|
java.lang.String |
getEtag()
|
XmlParser.ElementHandler |
getHandler(ExtensionProfile p,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
The default implementation uses the AbstractExtension.AttributesHandler to handle
parsing the extension. |
java.lang.String |
getHref()
Returns the value of the resource reference. |
java.lang.String |
getHrefLang()
|
long |
getLength()
|
java.lang.String |
getRel()
Returns the link relation type. |
java.lang.String |
getTitle()
|
java.lang.String |
getTitleLang()
|
java.lang.String |
getType()
Returns the mime type of the link. |
boolean |
matches(java.lang.String relToMatch,
java.lang.String typeToMatch)
Returns whether this link matches the given rel and type
values. |
void |
setContent(Content c)
|
void |
setEtag(java.lang.String v)
|
void |
setHref(java.lang.String v)
Sets the value of the resource reference. |
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 com.google.gdata.data.AbstractExtension |
---|
consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String rel
self
, prev
, next
, enclosure
, etc.
protected java.lang.String type
protected java.lang.String href
protected java.lang.String hrefLang
protected java.lang.String title
protected java.lang.String titleLang
protected long length
protected Content content
null
if no inlined link content.
protected java.lang.String etag
null
if unknown
Constructor Detail |
---|
public Link()
public Link(java.lang.String rel, java.lang.String type, java.lang.String href)
Method Detail |
---|
public java.lang.String getRel()
ILink
ILink.Rel
class.
getRel
in interface ILink
ILink.Rel
public void setRel(java.lang.String v)
ILink
setRel
in interface ILink
public java.lang.String getType()
ILink
getType
in interface ILink
public void setType(java.lang.String v)
ILink
setType
in interface ILink
public java.lang.String getHref()
Reference
getHref
in interface Reference
public void setHref(java.lang.String v)
Reference
setHref
in interface Reference
v
- the resource href.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 Content getContent()
public void setContent(Content c)
public java.lang.String getEtag()
public void setEtag(java.lang.String v)
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.public XmlParser.ElementHandler getHandler(ExtensionProfile p, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
AbstractExtension
AbstractExtension.AttributesHandler
to handle
parsing the extension.
getHandler
in interface Extension
getHandler
in class ExtensionPoint
p
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributes
public void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile p) throws java.io.IOException
Extension
generate
in interface Extension
generate
in class AbstractExtension
w
- XML writerp
- extension profile
java.io.IOException
public void generateAtom(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
w
- Output writer.extProfile
- Extension profile.
java.io.IOException
public void generateRss(com.google.gdata.util.common.xml.XmlWriter w) throws java.io.IOException
w
- Output writer.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |