Interface Text

  • All Superinterfaces:
    Base, java.lang.Cloneable, Element, java.lang.Iterable<Element>

    public interface Text
    extends Element

    Represents an Atom Text Contruct.

    Atom allows three kinds of Text constructs:

    • Text, consisting of content that is to be interpreted as plain text with no markup. For instance, <title type="text">&lt;title&gt;</title> is interpreted as literal characer "<" followed by the word "content", followed by the literal character ">".
    • HTML, consisting of content that is to be interpreted as escaped HTML markup. For instance, <title type="html">&lt;b&gt;title&lt;/b&gt;</title> is interpreted as the word "content" surrounded by the HTML <b> and </b> tags.
    • XHTML, consisting of well-formed XHTML content wrapped in an XHTML div element. For instance, <title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><b>Title</b></div></title>.

    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
     
    • Method Detail

      • getTextType

        Text.Type getTextType()
        Return the Text.Type
        Returns:
        The Text.Type
      • setTextType

        Text 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

        Text 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

        Text 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

        Text setWrappedValue​(java.lang.String wrappedValue)
        Set the wrapped value
        Parameters:
        wrappedValue - The text value wrapped in a xhtml:div