Package adams.doc.xml

Class AbstractSimpleTag

    • Field Detail

      • m_Content

        protected String m_Content
        the content.
      • m_ConvertEntities

        protected boolean m_ConvertEntities
        whether to convert HTML entities.
    • Constructor Detail

      • AbstractSimpleTag

        public AbstractSimpleTag​(String tag)
        Initializes the tag.
        Parameters:
        tag - the name of the tag
      • AbstractSimpleTag

        public AbstractSimpleTag​(String tag,
                                 String content)
        Initializes the tag.
        Parameters:
        tag - the name of the tag
        content - the content of the tag
    • Method Detail

      • setAllowsChildren

        public void setAllowsChildren​(boolean allows)
        Does not allow children.
        Overrides:
        setAllowsChildren in class DefaultMutableTreeNode
        Parameters:
        allows - ignored, always false
      • setContent

        public void setContent​(String value)
        Sets the content of the tag.
        Parameters:
        value - the string content
      • getContent

        public String getContent()
        Returns the string content.
        Returns:
        the content
      • hasContent

        public boolean hasContent()
        Description copied from class: AbstractTag
        Checks whether there is any content to append.
        Specified by:
        hasContent in class AbstractTag
        Returns:
        true if content available
      • setConvertEntities

        public void setConvertEntities​(boolean value)
        Sets whether to convert HTML entities or not.

        CAUTION: caller must ensure that content is XHTML compliant if this is turned off!
        Parameters:
        value - if true then HTML entities get converted
      • getConvertEntities

        public boolean getConvertEntities()
        Returns whether HTML entities get converted or not.
        Returns:
        true if HTML entities get converted
      • appendContent

        protected void appendContent​(StringBuilder buffer)
        Appends the content of the element to the buffer.
        Specified by:
        appendContent in class AbstractTag
        Parameters:
        buffer - the buffer to append the content to