public class

OutOfLineContent

extends Content
implements IOutOfLineContent Reference
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.atom.Content
       ↳ com.google.gdata.model.atom.OutOfLineContent

Class Overview

Variant of Content for entries that reference external content.

Summary

Constants
String KIND The kind name for adaptation.
Fields
public static final AttributeKey<String> ETAG The gd:etag attribute.
public static final ElementKey<String, OutOfLineContent> KEY The key for this element.
public static final AttributeKey<Long> LENGTH Metadata for the length attribute (hidden by default).
[Expand]
Inherited Fields
From class com.google.gdata.model.atom.Content
From class com.google.gdata.model.Element
Public Constructors
OutOfLineContent()
Constructs a new instance using the default metadata.
OutOfLineContent(Content content)
Constructs a new instance from a more generic Content type.
Protected Constructors
OutOfLineContent(ElementKey<?, ?> key)
Constructs a new instance using the specified element metadata.
Public Methods
String getEtag()
Returns the HTTP etag for the referenced content or null if unknown.
String getHref()
Returns the external URI or null if none exists.
long getLength()
int getType()
Returns this content's type.
String getUri()
This method is deprecated. Use getSrc() instead.
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
void setEtag(String etag)
Sets the HTTP etag for the referenced content.
void setHref(String href)
Sets the external URI.
void setLength(long length)
Specifies the file length (RSS only).
void setMimeType(ContentType v)
Specifies the MIME Content type.
void setSrc(URI v)
Specifies the external URI.
void setUri(String v)
This method is deprecated. Use setSrc(URI) instead.
[Expand]
Inherited Methods
From class com.google.gdata.model.atom.Content
From class com.google.gdata.model.Element
From class java.lang.Object
From interface com.google.gdata.data.IContent
From interface com.google.gdata.data.IOutOfLineContent
From interface com.google.gdata.data.Reference

Constants

public static final String KIND

The kind name for adaptation.

Constant Value: "out-of-line"

Fields

public static final AttributeKey<String> ETAG

The gd:etag attribute. See RFC 2616, Section 3.11.

public static final ElementKey<String, OutOfLineContent> KEY

The key for this element.

public static final AttributeKey<Long> LENGTH

Metadata for the length attribute (hidden by default).

Public Constructors

public OutOfLineContent ()

Constructs a new instance using the default metadata.

public OutOfLineContent (Content content)

Constructs a new instance from a more generic Content type.

Parameters
content Generic content

Protected Constructors

protected OutOfLineContent (ElementKey<?, ?> key)

Constructs a new instance using the specified element metadata.

Parameters
key The element key for this element.

Public Methods

public String getEtag ()

Returns the HTTP etag for the referenced content or null if unknown.

public String getHref ()

Returns the external URI or null if none exists. This method exists only so that Content implements Reference. Callers should use getSrc() instead whenever possible.

public long getLength ()

public int getType ()

Returns this content's type. The list of valid value is defined in IContent.Type.

Returns
  • the type of this content

public String getUri ()

This method is deprecated.
Use getSrc() instead.

Gets the external URI associated with this out-of-line content.

Returns
  • external URI

public static void registerMetadata (MetadataRegistry registry)

Registers the metadata for this element.

Parameters
registry

public void setEtag (String etag)

Sets the HTTP etag for the referenced content. A value of null indicates it is unknown.

Parameters
etag HTTP etag value

public void setHref (String href)

Sets the external URI. This method exists only so that Content implements Reference. Callers should use setSrc(URI) instead whenever possible.

Parameters
href External URI or null
Throws
IllegalArgumentException if href is not a valid URI

public void setLength (long length)

Specifies the file length (RSS only).

Parameters
length

public void setMimeType (ContentType v)

Specifies the MIME Content type.

Parameters
v

public void setSrc (URI v)

Specifies the external URI.

Parameters
v

public void setUri (String v)

This method is deprecated.
Use setSrc(URI) instead.

Specifies the external URI.

Parameters
v External URI