org.apache.abdera.model
Interface Text

All Superinterfaces:
Base, java.lang.Cloneable, Element

public interface Text
extends Element

Represents an Atom Text Contruct.

Atom allows three kinds of Text constructs:

Per RFC4287:

  A Text construct contains human-readable text, usually in small
  quantities.  The content of Text constructs is Language-Sensitive.

  atomPlainTextConstruct =
     atomCommonAttributes,
     attribute type { "text" | "html" }?,
     text

  atomXHTMLTextConstruct =
     atomCommonAttributes,
     attribute type { "xhtml" },
     xhtmlDiv

  atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct
 


Nested Class Summary
static class Text.Type
          Text Constructs can be either Text, HTML or XHTML
 
Method Summary
 Text.Type getTextType()
          Return the Text.Type
 java.lang.String getValue()
          Return the text value
 Div getValueElement()
          Return the text value element
 java.lang.String getWrappedValue()
          Return the wrapped value
 void setTextType(Text.Type type)
          Set the Text.Type
 void setValue(java.lang.String value)
          Set the text value
 void setValueElement(Div value)
          Set the text value element
 void setWrappedValue(java.lang.String wrappedValue)
          Set the wrapped value
 
Methods inherited from interface org.apache.abdera.model.Element
declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setParentElement, setText
 
Methods inherited from interface org.apache.abdera.model.Base
addComment, clone, getFactory, writeTo, writeTo
 

Method Detail

getTextType

Text.Type getTextType()
Return the Text.Type

Returns:
The Text.Type

setTextType

void setTextType(Text.Type type)
Set the Text.Type

Parameters:
type - The Text.Type

getValueElement

Div getValueElement()
Return the text value element

Returns:
A xhtml:div

setValueElement

void setValueElement(Div value)
Set the text value element

Parameters:
value - The xhtml:div

getValue

java.lang.String getValue()
Return the text value

Returns:
The text value

setValue

void setValue(java.lang.String value)
Set the text value

Parameters:
value - The text value

getWrappedValue

java.lang.String getWrappedValue()
Return the wrapped value

Returns:
The text value wrapped in a xhtml:div

setWrappedValue

void setWrappedValue(java.lang.String wrappedValue)
Set the wrapped value

Parameters:
wrappedValue - The text value wrapped in a xhtml:div