org.jcoderz.commons.taskdefs
Class Formatter

java.lang.Object
  extended by org.jcoderz.commons.taskdefs.Formatter

public abstract class Formatter
extends Object

Abstract class that defines the interface of a DocBook renderer.

Author:
Michael Griffel

Method Summary
protected  void executeSaxon(XtremeDocs parent, File in, File out)
           
abstract  String getFileExtension()
          Returns the filename extension.
 XtremeDocs.FormatterInfoData getInfoData()
          Returns the formatter's meta data.
static Formatter getInstance(XtremeDocs.FormatterInfoData f)
          Factory method to create a concrete instance of a formatter.
protected  boolean haveRenderX(XtremeDocs parent)
           
abstract  void transform(XtremeDocs parent, File in, File out)
          Transforms the given DocBook input file and writes the result to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Formatter getInstance(XtremeDocs.FormatterInfoData f)
Factory method to create a concrete instance of a formatter.

Parameters:
f - the meta data object initialized by the ant task.
Returns:
a concrete formatter instance.

transform

public abstract void transform(XtremeDocs parent,
                               File in,
                               File out)
Transforms the given DocBook input file and writes the result to out.

Parameters:
parent - the parent task.
in - the input file.
out - the ouput file.

getFileExtension

public abstract String getFileExtension()
Returns the filename extension. For example, the DocBook to HTML formatter will return "html".

Returns:
teh filename extension.

getInfoData

public XtremeDocs.FormatterInfoData getInfoData()
Returns the formatter's meta data. This data structure is set by the ant task.

Returns:
the formatter's meta data.

executeSaxon

protected void executeSaxon(XtremeDocs parent,
                            File in,
                            File out)

haveRenderX

protected boolean haveRenderX(XtremeDocs parent)


Copyright 2007 The jCoderZ Project.