de.bsd.x2svg.ant
Class ParserSubTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by de.bsd.x2svg.ant.X2SvgBaseTask
              extended by de.bsd.x2svg.ant.X2SvgSubTask
                  extended by de.bsd.x2svg.ant.ParserSubTask
All Implemented Interfaces:
java.lang.Cloneable

public class ParserSubTask
extends X2SvgSubTask

The X2SVG parsing sub-task. This task is responsible for parsing sets of files to create visualised output.

Since:
1.1
Author:
gfloodgate

Field Summary
private  Comment comment
          A comment to be added to all generated SVG items.
static java.lang.String ELEMENT_NAME
          The expected element name in ant for tasks instantiated from this class.
private  java.util.ArrayList<org.apache.tools.ant.types.FileSet> fileSets
          A holder for FileSet objects that need to be processed.
private  java.lang.String mode
          The parser mode, valid values are: auto, props, dtd, ant.
 
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
ParserSubTask()
           
 
Method Summary
 void addComment(Comment comment)
          Add a comment to be put in each generated file.
 void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
          Add any FileSet Type instances that are to be processed by this task.
 void execute()
          
 java.lang.String getMode()
          Get the mode that this parser is configured to operate in.
private  RuntimeParameters prepareRuntimeParameters(java.io.File source)
          Create runtime parameters specific to the file about to be processed, and the required output formats.
 void setMode(java.lang.String mode)
          Set the mode that this sub-task should operate in.
 
Methods inherited from class de.bsd.x2svg.ant.X2SvgSubTask
getOutputTypes, getRuntimeParameters, setOutputTypes, setRuntimeParameters
 
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
 

Field Detail

ELEMENT_NAME

public static final java.lang.String ELEMENT_NAME
The expected element name in ant for tasks instantiated from this class.

See Also:
Constant Field Values

fileSets

private final java.util.ArrayList<org.apache.tools.ant.types.FileSet> fileSets
A holder for FileSet objects that need to be processed.


comment

private Comment comment
A comment to be added to all generated SVG items.


mode

private java.lang.String mode
The parser mode, valid values are: auto, props, dtd, ant.

Constructor Detail

ParserSubTask

public ParserSubTask()
Method Detail

addComment

public void addComment(Comment comment)
Add a comment to be put in each generated file.

Parameters:
comment - The comment to add to the generated outputs.

setMode

public void setMode(java.lang.String mode)
Set the mode that this sub-task should operate in.

Parameters:
mode - The mode that represents the parser type to be used (auto - to detect).

getMode

public java.lang.String getMode()
Get the mode that this parser is configured to operate in.

Returns:
The mode that represents the parser type to be used (auto - to detect).

addFileSet

public void addFileSet(org.apache.tools.ant.types.FileSet fileSet)
Add any FileSet Type instances that are to be processed by this task.

Parameters:
fileSet - The file set, as from the build.xml that should be used when executing this task.

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

prepareRuntimeParameters

private RuntimeParameters prepareRuntimeParameters(java.io.File source)
Create runtime parameters specific to the file about to be processed, and the required output formats.

Parameters:
source - The source file (thing being parsed) that is being also being converted.
Returns:
The runtime parameters specific to this file, and it's required output formats.


x2svg version 1.2.1