fop 0.95

org.apache.fop.tools.anttasks
Class Fop

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.fop.tools.anttasks.Fop
All Implemented Interfaces:
java.lang.Cloneable

public class Fop
extends org.apache.tools.ant.Task

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


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
Fop()
           
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet set)
          Adds a set of XSL-FO files (nested fileset attribute).
 void execute()
          
 java.io.File getBasedir()
          Gets the base directory.
 java.util.List getFilesets()
          Returns the current list of filesets.
 java.io.File getFofile()
          Gets the input XSL-FO file.
 boolean getForce()
          Gets the force attribute
 java.lang.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.
 java.io.File getOutdir()
          Gets the output directory.
 java.io.File getOutfile()
          Gets the output file.
 boolean getRelativebase()
          Gets the relative base attribute
 java.io.File getUserconfig()
          Returns the file for the userconfig.xml.
 void setBasedir(java.io.File baseDir)
          Sets the base directory for single FO file (non-fileset) usage
 void setFofile(java.io.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(java.lang.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(java.lang.String messageLevel)
          Sets the message level to be used while processing.
 void setOutdir(java.io.File outDir)
          Sets the output directory.
 void setOutfile(java.io.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(java.io.File userConfig)
          Sets the filename for the userconfig.xml.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fop

public Fop()
Method Detail

setUserconfig

public void setUserconfig(java.io.File userConfig)
Sets the filename for the userconfig.xml.

Parameters:
userConfig - Configuration to use

getUserconfig

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

Returns:
the userconfig.xml file

setFofile

public void setFofile(java.io.File foFile)
Sets the input XSL-FO file.

Parameters:
foFile - input XSL-FO file

getFofile

public java.io.File getFofile()
Gets the input XSL-FO file.

Returns:
input XSL-FO file

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet set)
Adds a set of XSL-FO files (nested fileset attribute).

Parameters:
set - a fileset

getFilesets

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

Returns:
the filesets

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.

getRelativebase

public boolean getRelativebase()
Gets the relative base attribute

Returns:
the relative base attribute

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.

getForce

public boolean getForce()
Gets the force attribute

Returns:
the force attribute

setOutfile

public void setOutfile(java.io.File outFile)
Sets the output file.

Parameters:
outFile - File to output to

getOutfile

public java.io.File getOutfile()
Gets the output file.

Returns:
the output file

setOutdir

public void setOutdir(java.io.File outDir)
Sets the output directory.

Parameters:
outDir - Directory to output to

getOutdir

public java.io.File getOutdir()
Gets the output directory.

Returns:
the output directory

setFormat

public void setFormat(java.lang.String format)
Sets output format (MIME type).

Parameters:
format - the output format

getFormat

public java.lang.String getFormat()
Gets the output format (MIME type).

Returns:
the output format

setMessagelevel

public void setMessagelevel(java.lang.String messageLevel)
Sets the message level to be used while processing.

Parameters:
messageLevel - (error | warn| info | verbose | debug)

getMessageType

public int getMessageType()
Returns the message type corresponding to Project.MSG_* representing the current message level.

See Also:
Project

setBasedir

public void setBasedir(java.io.File baseDir)
Sets the base directory for single FO file (non-fileset) usage

Parameters:
baseDir - File to use as a working directory

getBasedir

public java.io.File getBasedir()
Gets the base directory.

Returns:
the base directory

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

getLogFiles

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

Returns:
True if the filenames should be logged.

execute

public void execute()
             throws org.apache.tools.ant.BuildException

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

fop 0.95

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