Class DocType

All Implemented Interfaces:
IEngineTemplateEvent, IDocType, ITemplateEvent

final class DocType extends AbstractTemplateEvent implements IDocType, IEngineTemplateEvent
  • Field Details

  • Constructor Details

  • Method Details

    • getKeyword

      public 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 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 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 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 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 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 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 String computeDocType()
    • computeType

      private static String computeType(String publicId, String systemId)
    • accept

      public void accept(IModelVisitor visitor)
      Description copied from interface: ITemplateEvent

      Accept a visitor, implementation of IModelVisitor.

      Specified by:
      accept in interface ITemplateEvent
      Parameters:
      visitor - the visitor.
    • write

      public void write(Writer writer) throws 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:
      IOException - if an input/output exception occurs.
    • asEngineDocType

      static DocType asEngineDocType(IDocType docType)
    • beHandled

      public void beHandled(ITemplateHandler handler)
      Specified by:
      beHandled in interface IEngineTemplateEvent
    • toString

      public String toString()
      Overrides:
      toString in class Object