public class OutOfLineContent extends Content implements IOutOfLineContent, Reference
Content
for entries that reference external content.IContent.Type
Modifier and Type | Field and Description |
---|---|
static AttributeKey<java.lang.String> |
ETAG
The gd:etag attribute.
|
static ElementKey<java.lang.String,OutOfLineContent> |
KEY
The key for this element.
|
static java.lang.String |
KIND
The kind name for adaptation.
|
static AttributeKey<java.lang.Long> |
LENGTH
Metadata for the length attribute (hidden by default).
|
Modifier | Constructor and Description |
---|---|
|
OutOfLineContent()
Constructs a new instance using the default metadata.
|
|
OutOfLineContent(Content content)
Constructs a new instance from a more generic
Content type. |
protected |
OutOfLineContent(ElementKey<?,?> key)
Constructs a new instance using the specified element metadata.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEtag()
Returns the HTTP etag for the referenced content or
null if
unknown. |
java.lang.String |
getHref()
Returns the external URI or
null if none exists. |
long |
getLength() |
int |
getType()
Returns this content's type.
|
java.lang.String |
getUri()
Deprecated.
Use
Content.getSrc() instead. |
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
|
void |
setEtag(java.lang.String etag)
Sets the HTTP etag for the referenced content.
|
void |
setHref(java.lang.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(java.net.URI v)
Specifies the external URI.
|
void |
setUri(java.lang.String v)
Deprecated.
Use
setSrc(URI) instead. |
getLang, getMimeType, getSrc, narrow, setLang
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, lock, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, visit
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getMimeType
public static final java.lang.String KIND
public static final ElementKey<java.lang.String,OutOfLineContent> KEY
public static final AttributeKey<java.lang.Long> LENGTH
public static final AttributeKey<java.lang.String> ETAG
public OutOfLineContent()
public OutOfLineContent(Content content)
Content
type.content
- generic contentprotected OutOfLineContent(ElementKey<?,?> key)
key
- the element key for this element.public static void registerMetadata(MetadataRegistry registry)
public int getType()
Content
IContent.Type
.public void setMimeType(ContentType v)
@Deprecated public java.lang.String getUri()
Content.getSrc()
instead.getUri
in interface IOutOfLineContent
@Deprecated public void setUri(java.lang.String v)
setSrc(URI)
instead.v
- external URIpublic void setSrc(java.net.URI v)
public void setLength(long length)
public java.lang.String getHref()
null
if none exists.
This method exists only so that Content
implements
Reference
. Callers should use Content.getSrc()
instead whenever possible.public void setHref(java.lang.String href)
Content
implements
Reference
. Callers should use setSrc(URI)
instead whenever possible.public long getLength()
public java.lang.String getEtag()
null
if
unknown.getEtag
in interface IOutOfLineContent
public void setEtag(java.lang.String etag)
null
indicates it is unknown.etag
- HTTP etag value