Google Data APIs Client Library (1.38.0)
com.google.gdata.data.media.mediarss
Class AbstractTextElement
java.lang.Object
com.google.gdata.data.AbstractExtension
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.
| Methods inherited from class com.google.gdata.data.AbstractExtension |
eq, generate, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTextElement
public AbstractTextElement()
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 profilenamespace - extension namespacelocalName - tag name, without the namespace prefixattrs - tag attributes
- Returns:
- an element handler
- Throws:
ParseException - when an unexpected tag or badly-formatted
XML is detected