Enum PageDocType

  • All Implemented Interfaces:
    Serializable, Comparable<PageDocType>

    public enum PageDocType
    extends Enum<PageDocType>
    Enumeration of the possible page doc types.
    Since:
    4.1.0
    Version:
    $Revision: 17981 $ $Date: 2015-11-23 15:03:43 -0200 (Mon, 23 Nov 2015) $
    • Enum Constant Detail

      • XHTML10_STRICT

        public static final PageDocType XHTML10_STRICT
        XHTML 1.0 Strict DOCTYPE
      • XHTML10_TRANSITIONAL

        public static final PageDocType XHTML10_TRANSITIONAL
        XHTML 1.0 Transitional DOCTYPE
      • XHTML10_FRAMESET

        public static final PageDocType XHTML10_FRAMESET
        XHTML 1.0 Frameset DOCTYPE
      • XHTML11_DTD

        public static final PageDocType XHTML11_DTD
        XHTML 1.1 DTD DOCTYPE
      • XHTMLBASIC10_DTD

        public static final PageDocType XHTMLBASIC10_DTD
        XHTML Basic 1.0 DTD DOCTYPE
      • XHTMLBASIC11_DTD

        public static final PageDocType XHTMLBASIC11_DTD
        XHTML Basic 1.1 DTD DOCTYPE
      • HTML401_STRICT

        public static final PageDocType HTML401_STRICT
        HTML 4.01 Strict DOCTYPE
      • HTML401_TRANSITIONAL

        public static final PageDocType HTML401_TRANSITIONAL
        HTML 4.01 Transitional DOCTYPE
      • HTML401_FRAMESET

        public static final PageDocType HTML401_FRAMESET
        HTML 4.01 Frameset DOCTYPE
      • HTML20_DTD

        public static final PageDocType HTML20_DTD
        HTML 2.0 DTD DOCTYPE
      • HTML32_DTD

        public static final PageDocType HTML32_DTD
        HTML 3.2 DTD DOCTYPE
      • NONE

        public static final PageDocType NONE
        Do not specify a Doctype
      • HTML5

        public static final PageDocType HTML5
        HTML 5 DOCTYPE
    • Method Detail

      • values

        public static PageDocType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PageDocType c : PageDocType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PageDocType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getDocTypeDeclaration

        public String getDocTypeDeclaration()
      • getPageDocTypeByName

        public static PageDocType getPageDocTypeByName​(String pageDocTypeName)
      • getPageDocTypeByPublicDTDName

        public static PageDocType getPageDocTypeByPublicDTDName​(String publicDTDName)
        Returns the PageDocType for a public DTD name.
        Parameters:
        publicDTDName - the public DTD name for the doctype.
        Returns:
        the PageDocType or null if none was found.
        Throws:
        IllegalArgumentException - if publicDTDName is null.
        Since:
        5.6.0
      • formatW3CClosedTag

        public String formatW3CClosedTag​(String tagValue)
        Depending on the DOCType, the closing xml tags may be in different formats.
        Parameters:
        tagValue -
        Returns:
        Since:
        4.1.0
      • isXHTML

        public boolean isXHTML()
        Returns whether this doctype is a XHTML doctype.
        Returns:
        true if this is a XHTML doctype, false otherwise.
        Since:
        5.6.0