org.apache.fop.tools.anttasks

Class Fop


public class Fop
extends Task

Wrapper for FOP which allows it to be accessed from within an Ant task. Accepts the inputs:

Method Summary

void
addFileset(FileSet set)
Adds a set of XSL-FO files (nested fileset attribute).
void
execute()
File
getBasedir()
Gets the base directory.
List
getFilesets()
Returns the current list of filesets.
File
getFofile()
Gets the input XSL-FO file.
boolean
getForce()
Gets the force attribute
String
getFormat()
Gets the output format (MIME type).
boolean
getLogFiles()
Returns True if the filename of each file processed should be logged.
int
getMessageType()
Returns the message type corresponding to Project.MSG_* representing the current message level.
File
getOutdir()
Gets the output directory.
File
getOutfile()
Gets the output file.
boolean
getRelativebase()
Gets the relative base attribute
File
getUserconfig()
Returns the file for the userconfig.xml.
void
setBasedir(File baseDir)
Sets the base directory for single FO file (non-fileset) usage
void
setFofile(File foFile)
Sets the input XSL-FO file.
void
setForce(boolean force)
Set whether to check dependencies, or to always generate; optional, default is false.
void
setFormat(String format)
Sets output format (MIME type).
void
setLogFiles(boolean logFiles)
Controls whether the filenames of the files that are processed are logged or not.
void
setMessagelevel(String messageLevel)
Sets the message level to be used while processing.
void
setOutdir(File outDir)
Sets the output directory.
void
setOutfile(File outFile)
Sets the output file.
void
setRelativebase(boolean relbase)
Set whether to include files (external-graphics, instream-foreign-object) from a path relative to the .fo file (true) or the working directory (false, default) only useful for filesets
void
setUserconfig(File userConfig)
Sets the filename for the userconfig.xml.

Method Details

addFileset

public void addFileset(FileSet set)
Adds a set of XSL-FO files (nested fileset attribute).
Parameters:
set - a fileset

execute

public void execute()
            throws BuildException

getBasedir

public File getBasedir()
Gets the base directory.
Returns:
the base directory

getFilesets

public List getFilesets()
Returns the current list of filesets.
Returns:
the filesets

getFofile

public File getFofile()
Gets the input XSL-FO file.
Returns:
input XSL-FO file

getForce

public boolean getForce()
Gets the force attribute
Returns:
the force attribute

getFormat

public String getFormat()
Gets the output format (MIME type).
Returns:
the output format

getLogFiles

public boolean getLogFiles()
Returns True if the filename of each file processed should be logged.
Returns:
True if the filenames should be logged.

getMessageType

public int getMessageType()
Returns the message type corresponding to Project.MSG_* representing the current message level.
See Also:
org.apache.tools.ant.Project

getOutdir

public File getOutdir()
Gets the output directory.
Returns:
the output directory

getOutfile

public File getOutfile()
Gets the output file.
Returns:
the output file

getRelativebase

public boolean getRelativebase()
Gets the relative base attribute
Returns:
the relative base attribute

getUserconfig

public File getUserconfig()
Returns the file for the userconfig.xml.
Returns:
the userconfig.xml file

setBasedir

public void setBasedir(File baseDir)
Sets the base directory for single FO file (non-fileset) usage
Parameters:
baseDir - File to use as a working directory

setFofile

public void setFofile(File foFile)
Sets the input XSL-FO file.
Parameters:
foFile - input XSL-FO file

setForce

public void setForce(boolean force)
Set whether to check dependencies, or to always generate; optional, default is false.
Parameters:
force - true if always generate.

setFormat

public void setFormat(String format)
Sets output format (MIME type).
Parameters:
format - the output format

setLogFiles

public void setLogFiles(boolean logFiles)
Controls whether the filenames of the files that are processed are logged or not.
Parameters:
logFiles - True if the feature should be enabled

setMessagelevel

public void setMessagelevel(String messageLevel)
Sets the message level to be used while processing.
Parameters:
messageLevel - (error | warn| info | verbose | debug)

setOutdir

public void setOutdir(File outDir)
Sets the output directory.
Parameters:
outDir - Directory to output to

setOutfile

public void setOutfile(File outFile)
Sets the output file.
Parameters:
outFile - File to output to

setRelativebase

public void setRelativebase(boolean relbase)
Set whether to include files (external-graphics, instream-foreign-object) from a path relative to the .fo file (true) or the working directory (false, default) only useful for filesets
Parameters:
relbase - true if paths are relative to file.

setUserconfig

public void setUserconfig(File userConfig)
Sets the filename for the userconfig.xml.
Parameters:
userConfig - Configuration to use

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.