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 java.lang.String |
html
HTML contents.
|
lang
Constructor and Description |
---|
HtmlTextConstruct()
Class constructor.
|
HtmlTextConstruct(java.lang.String html)
Class constructor specifying the HTML content for this
text construct to contain.
|
HtmlTextConstruct(java.lang.String html,
java.lang.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,
java.lang.String elementName)
Generates XML in the Atom format.
|
void |
generateRss(XmlWriter w,
java.lang.String elementName,
TextConstruct.RssFormat rssFormat)
Generates XML in the RSS format.
|
java.lang.String |
getHtml() |
java.lang.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(java.lang.String v)
Specifies the HTML contents of this text construct.
|
create, getChildHandler, getLang, html, plainText, setLang, xhtml
public HtmlTextConstruct()
public HtmlTextConstruct(java.lang.String html)
public HtmlTextConstruct(java.lang.String html, java.lang.String lang)
public int getType()
TextConstruct
getType
in interface ITextConstruct
getType
in class TextConstruct
public boolean isEmpty()
TextConstruct
true
if this text construct has no contents.isEmpty
in class TextConstruct
true
if this text construct has no contentspublic java.lang.String getHtml()
public void setHtml(java.lang.String v)
public java.lang.String getPlainText()
TextConstruct
getPlainText
in interface ITextConstruct
getPlainText
in class TextConstruct
null
if there is no html content.public void generateAtom(XmlWriter w, java.lang.String elementName) throws java.io.IOException
generateAtom
in class TextConstruct
w
- output writerelementName
- Atom element namejava.io.IOException
public void generateRss(XmlWriter w, java.lang.String elementName, TextConstruct.RssFormat rssFormat) throws java.io.IOException
generateRss
in class TextConstruct
w
- output writerelementName
- RSS element namerssFormat
- the restrictions on what HTML tags are allowedjava.io.IOException