Google Data APIs Client Library (1.41.1)



com.google.gdata.data.media.mediarss
Class AbstractTextElement

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.media.mediarss.AbstractTextElement
All Implemented Interfaces:
Extension
Direct Known Subclasses:
MediaDescription, MediaText, MediaTitle

public abstract class AbstractTextElement
extends AbstractExtension

A media element with a 'type' attribute and text content.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Field Summary
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
AbstractTextElement()
           
 
Method Summary
protected  void consumeAttributes(AttributeHelper attrsHelper)
          The default implementation does nothing, subclasses can override to handle attributes.
 TextConstruct getContent()
           
 XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, 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 getPlainTextContent()
           
 boolean isEmpty()
           
 void putAttributes(AttributeGenerator generator)
          Puts attributes into the attribute generator.
 void setHtmlContent(java.lang.String html)
           
 void setPlainTextContent(java.lang.String text)
           
 
Methods inherited from class com.google.gdata.data.AbstractExtension
disableStrictValidation, enableStrictValidation, eq, generate, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTextElement

public AbstractTextElement()
Method Detail

isEmpty

public boolean isEmpty()

getContent

public TextConstruct getContent()

setHtmlContent

public void setHtmlContent(java.lang.String html)

setPlainTextContent

public void setPlainTextContent(java.lang.String text)

getPlainTextContent

public java.lang.String getPlainTextContent()

putAttributes

public void putAttributes(AttributeGenerator generator)
Description copied from class: AbstractExtension
Puts attributes into the attribute generator. Called from AbstractExtension.generate(XmlWriter,ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Overrides:
putAttributes in class AbstractExtension
Parameters:
generator - attribute generator

consumeAttributes

protected void consumeAttributes(AttributeHelper attrsHelper)
                          throws ParseException
The default implementation does nothing, subclasses can override to handle attributes.

Overrides:
consumeAttributes in class AbstractExtension
Parameters:
attrsHelper - attribute helper
Throws:
ParseException - from subclasses.

getHandler

public final XmlParser.ElementHandler getHandler(ExtensionProfile extProfile,
                                                 java.lang.String namespace,
                                                 java.lang.String localName,
                                                 org.xml.sax.Attributes attrs)
                                          throws ParseException
Description copied from class: AbstractExtension
The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.

Specified by:
getHandler in interface Extension
Overrides:
getHandler in class AbstractExtension
Parameters:
extProfile - extension profile
namespace - extension namespace
localName - tag name, without the namespace prefix
attrs - tag attributes
Returns:
an element handler
Throws:
ParseException - when an unexpected tag or badly-formatted XML is detected