info.bliki.api.creator
Class DocumentCreator

java.lang.Object
  extended by info.bliki.api.creator.DocumentCreator

public class DocumentCreator
extends java.lang.Object

Create an HTML or PDF file from a Mediawiki wiki which supports the api.php interface from http://en.wikipedia.org/w/api.php.


Constructor Summary
DocumentCreator(info.bliki.wiki.model.IWikiModel model, info.bliki.api.User user, java.lang.String[] listOfTitleStrings)
           
 
Method Summary
 java.lang.String getFooter()
          Get the HTML footer of this creator.
 java.lang.String getHeader()
          Get the HTML header of this creator.
 void readPages()
           
 void render(java.lang.Appendable appendable)
          Render the given Wikipedia texts into an HTML string and use the default HTMLConverter.
 void render(info.bliki.wiki.filter.ITextConverter converter, java.lang.Appendable appendable)
          Render the given Wikipedia texts into a string for a given converter
 void renderPDF(java.lang.Appendable appendable)
          Render the given Wikipedia texts into an HTML string and use the default PDFConverter.
 void renderPDFToFile(java.lang.String baseDirectoryName, java.lang.String filename, java.lang.String cssStyle)
          Render the given Wikipedia texts into a PDF file.
 void renderToFile(info.bliki.wiki.filter.ITextConverter converter, java.lang.String filename)
          Render the given Wikipedia texts into an HTML file for the given converter.
 void renderToFile(java.lang.String filename)
          Render the given Wikipedia texts into an HTML file.
 void setFooter(java.lang.String footer)
          Set the HTML footer of this creator.
 void setHeader(java.lang.String header)
          Set the HTML header set of this creator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentCreator

public DocumentCreator(info.bliki.wiki.model.IWikiModel model,
                       info.bliki.api.User user,
                       java.lang.String[] listOfTitleStrings)
Method Detail

readPages

public void readPages()

render

public void render(info.bliki.wiki.filter.ITextConverter converter,
                   java.lang.Appendable appendable)
            throws java.io.IOException
Render the given Wikipedia texts into a string for a given converter

Parameters:
converter - a text converter. Note the converter may be null, if you only would like to analyze the raw wiki text and don't need to convert. This speeds up the parsing process.
Throws:
java.io.IOException

render

public void render(java.lang.Appendable appendable)
            throws java.io.IOException
Render the given Wikipedia texts into an HTML string and use the default HTMLConverter.

Throws:
java.io.IOException

renderPDF

public void renderPDF(java.lang.Appendable appendable)
               throws java.io.IOException
Render the given Wikipedia texts into an HTML string and use the default PDFConverter. The resulting XHTML could be used as input for the Flying Saucer PDF renderer

Throws:
java.io.IOException

renderToFile

public void renderToFile(info.bliki.wiki.filter.ITextConverter converter,
                         java.lang.String filename)
                  throws java.io.IOException
Render the given Wikipedia texts into an HTML file for the given converter.

Throws:
java.io.IOException

renderToFile

public void renderToFile(java.lang.String filename)
                  throws java.io.IOException
Render the given Wikipedia texts into an HTML file.

Throws:
java.io.IOException

renderPDFToFile

public void renderPDFToFile(java.lang.String baseDirectoryName,
                            java.lang.String filename,
                            java.lang.String cssStyle)
                     throws java.io.IOException
Render the given Wikipedia texts into a PDF file.

Parameters:
baseDirectoryName - the base directory, where all files should be stored
filename - the filename relative to the baseDirectory
cssStyle - CSS styles which should be used for rendering the PDF file
Throws:
java.io.IOException

getHeader

public java.lang.String getHeader()
Get the HTML header of this creator.

Returns:
null if no HTML header is set

setHeader

public void setHeader(java.lang.String header)
Set the HTML header set of this creator.


getFooter

public java.lang.String getFooter()
Get the HTML footer of this creator.

Returns:
null if no HTML footer is set

setFooter

public void setFooter(java.lang.String footer)
Set the HTML footer of this creator.



Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.