public class HtmlTextConstruct extends TextConstruct
TextConstruct.| Modifier and Type | Class and Description |
|---|---|
class |
HtmlTextConstruct.AtomHandler
Parses XML in the Atom format.
|
TextConstruct.ChildHandlerInfo, TextConstruct.RssFormat, TextConstruct.Type| Modifier and Type | Field and Description |
|---|---|
protected String |
html
HTML contents.
|
lang| Constructor and Description |
|---|
HtmlTextConstruct()
Class constructor.
|
HtmlTextConstruct(String html)
Class constructor specifying the HTML content for this
text construct to contain.
|
HtmlTextConstruct(String html,
String lang)
Class constructor specifying the HTML content for this
text construct to contain, plus the human language that
the text is written in.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateAtom(XmlWriter w,
String elementName)
Generates XML in the Atom format.
|
void |
generateRss(XmlWriter w,
String elementName,
TextConstruct.RssFormat rssFormat)
Generates XML in the RSS format.
|
String |
getHtml() |
String |
getPlainText()
Returns a plain-text representation of this text construct.
|
int |
getType()
Returns this text construct's type (text, HTML, or XHTML).
|
boolean |
isEmpty()
Returns
true if this text construct has no contents. |
void |
setHtml(String v)
Specifies the HTML contents of this text construct.
|
create, getChildHandler, getLang, html, plainText, setLang, xhtmlprotected String html
public HtmlTextConstruct()
public HtmlTextConstruct(String html)
public int getType()
TextConstructgetType in interface ITextConstructgetType in class TextConstructpublic boolean isEmpty()
TextConstructtrue if this text construct has no contents.isEmpty in class TextConstructtrue if this text construct has no contentspublic String getHtml()
public void setHtml(String v)
public String getPlainText()
TextConstructgetPlainText in interface ITextConstructgetPlainText in class TextConstructnull if there is no html content.public void generateAtom(XmlWriter w, String elementName) throws IOException
generateAtom in class TextConstructw - output writerelementName - Atom element nameIOExceptionpublic void generateRss(XmlWriter w, String elementName, TextConstruct.RssFormat rssFormat) throws IOException
generateRss in class TextConstructw - output writerelementName - RSS element namerssFormat - the restrictions on what HTML tags are allowedIOExceptionCopyright © 2012. All Rights Reserved.