public abstract class AbstractTextElement extends AbstractExtension
AbstractExtension.AttributesHandler
localName, namespace
Constructor and Description |
---|
AbstractTextElement() |
Modifier and Type | Method and Description |
---|---|
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) |
disableStrictValidation, enableStrictValidation, eq, generate, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
public boolean isEmpty()
public TextConstruct getContent()
public void setHtmlContent(java.lang.String html)
public void setPlainTextContent(java.lang.String text)
public java.lang.String getPlainTextContent()
public void putAttributes(AttributeGenerator generator)
AbstractExtension
AbstractExtension.generate(XmlWriter,ExtensionProfile)
. Default implementation
does nothing, though generally this is discouraged unless there really are
no attributes.putAttributes
in class AbstractExtension
generator
- attribute generatorprotected void consumeAttributes(AttributeHelper attrsHelper) throws ParseException
consumeAttributes
in class AbstractExtension
attrsHelper
- attribute helperParseException
- from subclasses.public final XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs) throws ParseException
AbstractExtension
AbstractExtension.AttributesHandler
to handle
parsing the extension.getHandler
in interface Extension
getHandler
in class AbstractExtension
extProfile
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributesParseException
- when an unexpected tag or badly-formatted
XML is detected