Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.anakia
Class AnakiaTask

    java.lang.Object
      MatchingTask
          org.apache.anakia.AnakiaTask

public class AnakiaTask
extends MatchingTask

The purpose of this Ant Task is to allow you to use Velocity as an XML transformation tool like XSLT is. So, instead of using XSLT, you will be able to use this class instead to do your transformations. It works very similar in concept to Ant's <style> task.

You can find more documentation about this class on the Velocity Website.

Version:
  $Id: AnakiaTask.java 524478 2007-03-31 20:51:49Z wglass $
Author:
  Jon S. Stevens, Attila Szegedi
See Also:
  Serialized Form

Nested Class Summary
`class` | `AnakiaTask.Context` A context implementation that loads all values from an XML file.

Constructor Summary
`AnakiaTask()` Constructor creates the SAXBuilder.

Method Summary
`AnakiaTask.Context` | `createContext()` Create a new context.
`void` | `execute()` Main body of the application
`void` | `setBasedir(File dir)` Set the base directory.
`void` | `setDestdir(File dir)` Set the destination directory into which the VSL result files should be copied to
`void` | `setExtension(String extension)` Allow people to set the default output file extension
`void` | `setLastModifiedCheck(String lastmod)` Turn on/off last modified checking.
`void` | `setProjectFile(String projectAttribute)` Allow people to set the path to the project.xml file
`void` | `setStyle(String style)` Allow people to set the path to the .vsl file
`void` | `setTemplatePath(File templatePath)` Set the path to the templates.
`void` | `setVelocityPropertiesFile(File velocityPropertiesFile)` Allow people to set the path to the velocity.properties file This file is found relative to the path where the JVM was run.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AnakiaTask

    public AnakiaTask()

  Constructor creates the SAXBuilder.

Method Detail

### setBasedir

    public void setBasedir(File dir)

  Set the base directory.

  Parameters:
    `dir` -

### setDestdir

    public void setDestdir(File dir)

  Set the destination directory into which the VSL result files should be copied to

  Parameters:
    `dir` - the name of the destination directory

### setExtension

    public void setExtension(String extension)

  Allow people to set the default output file extension

  Parameters:
    `extension` -

### setStyle

    public void setStyle(String style)

  Allow people to set the path to the .vsl file

  Parameters:
    `style` -

### setProjectFile

    public void setProjectFile(String projectAttribute)

  Allow people to set the path to the project.xml file

  Parameters:
    `projectAttribute` -

### setTemplatePath

    public void setTemplatePath(File templatePath)

  Set the path to the templates. The way it works is this: If you have a Velocity.properties file defined, this method will override whatever is set in the Velocity.properties file. This allows one to not have to define a Velocity.properties file, therefore using Velocity's defaults only.

  Parameters:
    `templatePath` -

### setVelocityPropertiesFile

    public void setVelocityPropertiesFile(File velocityPropertiesFile)

  Allow people to set the path to the velocity.properties file This file is found relative to the path where the JVM was run. For example, if build.sh was executed in the ./build directory, then the path would be relative to this directory. This is optional based on the setting of setTemplatePath().

  Parameters:
    `velocityPropertiesFile` -

### setLastModifiedCheck

    public void setLastModifiedCheck(String lastmod)

  Turn on/off last modified checking. by default, it is on.

  Parameters:
    `lastmod` -

### execute

    public void execute()
                 throws BuildException

  Main body of the application

  Throws:
    `BuildException`

### createContext

    public AnakiaTask.Context createContext()

  Create a new context.

  Returns:
    A new context.

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-${build.year} Apache Software Foundation. All Rights Reserved.