Class DocBookCreator

java.lang.Object
com.nomagic.magicreport.format.html.AbstractDocumentCreator
com.nomagic.magicreport.format.html.DocBookCreator
All Implemented Interfaces:
IHTMLHandler, IDocumentCreator

@OpenApiAll public class DocBookCreator extends AbstractDocumentCreator implements IHTMLHandler
The class use for create DocBook content.
Since:
Jan 30, 2013
Version:
1.0 Jan 30, 2013
  • Constructor Details

    • DocBookCreator

      public DocBookCreator()
  • Method Details

    • convert

      public void convert(Reader reader, Writer writer) throws IOException
      Convert the HTML content from reader into DocBook document.
      Specified by:
      convert in interface IDocumentCreator
      Parameters:
      reader - the reader containing HTML source.
      writer - the writer containing DocBook document.
      Throws:
      IOException - If any IO errors occur.
      See Also:
    • setPaperWidth

      public void setPaperWidth(float width)
      Description copied from interface: IDocumentCreator
      set width of paper.
      Specified by:
      setPaperWidth in interface IDocumentCreator
      Parameters:
      width - paper width.
    • setPaperHeight

      public void setPaperHeight(float height)
      Description copied from interface: IDocumentCreator
      set height of paper.
      Specified by:
      setPaperHeight in interface IDocumentCreator
      Parameters:
      height - paper width.
    • setProperties

      public void setProperties(Properties properties)
      Description copied from interface: IDocumentCreator
      Set properties.
      Specified by:
      setProperties in interface IDocumentCreator
      Parameters:
      properties - properties
    • comment

      public void comment(char[] data)
      Description copied from interface: IHTMLHandler
      Receive notification of comment data.
      Specified by:
      comment in interface IHTMLHandler
      Parameters:
      data - An array holding the characters in the document.
    • startTag

      public void startTag(HTML.Tag tag, AttributeSet attributes)
      Description copied from interface: IHTMLHandler
      Receive notification of the start of a tag.
      Specified by:
      startTag in interface IHTMLHandler
      Parameters:
      tag - HTML Tag.
      attributes - The attributes attached to the tag. If there are no attributes, it shall be an empty Attributes object.
    • endTag

      public void endTag(HTML.Tag tag)
      Description copied from interface: IHTMLHandler
      Receive notification of the end of a tag.
      Specified by:
      endTag in interface IHTMLHandler
      Parameters:
      tag - HTML Tag.
    • characters

      public void characters(char[] data)
      Description copied from interface: IHTMLHandler
      Receive notification of character data inside a tag.
      Specified by:
      characters in interface IHTMLHandler
      Parameters:
      data - The characters.
    • endDocument

      public void endDocument()
      Description copied from interface: IHTMLHandler
      Receive notification of end document.
      Specified by:
      endDocument in interface IHTMLHandler
    • putAttributeToStack

      public void putAttributeToStack(AttributeSet attributes)
      put start tag attributes in to htmlTagStack.
      Parameters:
      attributes - set of attribute
    • setDocumentPage

      public void setDocumentPage(com.nomagic.magicreport.DocumentPage page)
      Description copied from interface: IDocumentCreator
      set document page property.
      Specified by:
      setDocumentPage in interface IDocumentCreator
      Parameters:
      page - page property.