Class DocType

    • Field Detail

      • DEFAULT_ELEMENT_NAME

        public static final java.lang.String DEFAULT_ELEMENT_NAME
        See Also:
        Constant Field Values
      • DEFAULT_TYPE_PUBLIC

        public static final java.lang.String DEFAULT_TYPE_PUBLIC
        See Also:
        Constant Field Values
      • DEFAULT_TYPE_SYSTEM

        public static final java.lang.String DEFAULT_TYPE_SYSTEM
        See Also:
        Constant Field Values
      • keyword

        private final java.lang.String keyword
      • elementName

        private final java.lang.String elementName
      • type

        private final java.lang.String type
      • publicId

        private final java.lang.String publicId
      • systemId

        private final java.lang.String systemId
      • internalSubset

        private final java.lang.String internalSubset
      • docType

        private final java.lang.String docType
    • Constructor Detail

      • DocType

        DocType()
      • DocType

        DocType​(java.lang.String publicId,
                java.lang.String systemId)
      • DocType

        DocType​(java.lang.String keyword,
                java.lang.String elementName,
                java.lang.String publicId,
                java.lang.String systemId,
                java.lang.String internalSubset)
      • DocType

        DocType​(java.lang.String docType,
                java.lang.String keyword,
                java.lang.String elementName,
                java.lang.String publicId,
                java.lang.String systemId,
                java.lang.String internalSubset,
                java.lang.String templateName,
                int line,
                int col)
    • Method Detail

      • getKeyword

        public java.lang.String getKeyword()
        Description copied from interface: IDocType

        Returns the keyword of the DOCTYPE clause in its original case (usually DOCTYPE).

        Specified by:
        getKeyword in interface IDocType
        Returns:
        the DOCTYPE keyword.
      • getElementName

        public java.lang.String getElementName()
        Description copied from interface: IDocType

        Returns the root element name in the DOCTYPE clause. Will normally be html in HTML or XHTML documents.

        Specified by:
        getElementName in interface IDocType
        Returns:
        the element name
      • getType

        public java.lang.String getType()
        Description copied from interface: IDocType

        Returns the type of DOCTYPE, usually null, PUBLIC or SYSTEM.

        Specified by:
        getType in interface IDocType
        Returns:
        the type of DOCTYPE (might be null).
      • getPublicId

        public java.lang.String getPublicId()
        Description copied from interface: IDocType

        Returns the PUBLIC ID, if it has been specified.

        Specified by:
        getPublicId in interface IDocType
        Returns:
        the PUBLIC ID (might be null).
      • getSystemId

        public java.lang.String getSystemId()
        Description copied from interface: IDocType

        Returns the SYSTEM ID, if it has been specified.

        Specified by:
        getSystemId in interface IDocType
        Returns:
        the SYSTEM ID (might be null).
      • getInternalSubset

        public java.lang.String getInternalSubset()
        Description copied from interface: IDocType

        Returns the internal subset in the DOCTYPE, if it has been specified.

        Specified by:
        getInternalSubset in interface IDocType
        Returns:
        the internal subset (might be null).
      • getDocType

        public java.lang.String getDocType()
        Description copied from interface: IDocType

        Returns the complete DOCTYPE clause as a String.

        Specified by:
        getDocType in interface IDocType
        Returns:
        the complete DOCTYPE clause.
      • computeDocType

        private java.lang.String computeDocType()
      • computeType

        private static java.lang.String computeType​(java.lang.String publicId,
                                                    java.lang.String systemId)
      • write

        public void write​(java.io.Writer writer)
                   throws java.io.IOException
        Description copied from interface: ITemplateEvent

        Writes this event to the specified Writer.

        Template output performed at OutputTemplateHandler is done by calling these methods at each of the events resulting from template processing.

        Specified by:
        write in interface ITemplateEvent
        Parameters:
        writer - the writer this event should be written to.
        Throws:
        java.io.IOException - if an input/output exception occurs.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object