|
|||||||||
| 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.Content
public class Content
Base class for entry content.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.google.gdata.data.IContent |
|---|
IContent.Type |
| Field Summary | |
|---|---|
static ElementKey<java.lang.String,Content> |
CONSTRUCT
The key for Content used as a construct. |
static ElementKey<java.lang.String,Content> |
KEY
The key for a Content element used as atom:content. |
static AttributeKey<java.net.URI> |
SRC
The src attribute. |
static AttributeKey<java.lang.String> |
TYPE
The content type attribute. |
static AttributeKey<java.lang.String> |
XML_LANG
Key for the XML lang attribute |
| Constructor Summary | |
|---|---|
|
Content(ElementKey<?,?> key)
Constructs a new instance using the specified element metadata. |
protected |
Content(ElementKey<?,?> key,
Element source)
Constructs a new instance using the specified element key and the source Element instance's data (attributes, child elements, text content). |
| Method Summary | |
|---|---|
java.lang.String |
getLang()
Returns the human language that this content is written in |
ContentType |
getMimeType()
|
java.net.URI |
getSrc()
|
int |
getType()
Returns this content's type. |
protected Element |
narrow(ElementMetadata<?,?> meta,
ValidationContext vc)
Narrow down element's type to the most specific one possible. |
static void |
registerMetadata(MetadataRegistry registry)
Registers the default metadata for this element. |
void |
setLang(java.lang.String lang)
Sets the human language that this content was is written in. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ElementKey<java.lang.String,Content> CONSTRUCT
public static final ElementKey<java.lang.String,Content> KEY
public static final AttributeKey<java.lang.String> XML_LANG
public static final AttributeKey<java.lang.String> TYPE
public static final AttributeKey<java.net.URI> SRC
| Constructor Detail |
|---|
public Content(ElementKey<?,?> key)
key - the element key for the content element.
protected Content(ElementKey<?,?> key,
Element source)
Element instance's data (attributes, child elements, text content).
key - the element key for the content element.source - source content.| Method Detail |
|---|
public static void registerMetadata(MetadataRegistry registry)
public int getType()
IContent.Type.
getType in interface IContentIContent.Typepublic java.lang.String getLang()
getLang in interface IContentpublic void setLang(java.lang.String lang)
public ContentType getMimeType()
null if none existspublic java.net.URI getSrc()
null if none exists
protected Element narrow(ElementMetadata<?,?> meta,
ValidationContext vc)
ElementAny validation errors discovered during narrowing are accumulated in the validation context.
Default action is to not do anything with current element. Subclasses may override this function to narrow the type in some custom fashion.
narrow in class Elementmeta - the element metadata to narrow to.vc - validation context
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||