net.sourceforge.chaperon.ant
Class ExtendedParserTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.MatchingTask
              extended by net.sourceforge.chaperon.ant.ExtendedParserTask
All Implemented Interfaces:
java.lang.Cloneable, org.apache.tools.ant.types.selectors.SelectorContainer

public class ExtendedParserTask
extends org.apache.tools.ant.taskdefs.MatchingTask

A ant task for parsing text files

Version:
CVS $Id: ExtendedParserTask.java,v 1.3 2004/01/09 10:48:06 benedikta Exp $
Author:
Stephan Michels

Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset
 
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
ExtendedParserTask()
          Constructs the task
 
Method Summary
 void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog xmlCatalog)
          Add the catalog to our internal catalog
 org.apache.tools.ant.types.Mapper createMapper()
          Creates a mapper.
 void execute()
          Executes the task
 void init()
          Initialize internal instance of XMLCatalog
 void setBasedir(java.io.File dir)
          Set the base directory.
 void setDestdir(java.io.File dir)
          Set the destination directory into which the result files should be copied to
 void setEncoding(java.lang.String encoding)
          Sets the encoding for the input file
 void setGrammar(java.io.File grammarFile)
          Set the grammar, which should be used.
 void setIndent(boolean indent)
          Set if the output document should be indented
 void setInputtype(java.lang.String inputtype)
          If the input document is a XML or a text document.
 void setMsglevel(java.lang.String msgLevel)
          Sets the message level.
 void setParser(java.lang.String parserFactory)
          Name of the parser factory.
 void setSrcdir(java.io.File dir)
          Set the source directory
 void setTransformer(java.lang.String transformerFactory)
          Name of the transformer factory.
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, 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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedParserTask

public ExtendedParserTask()
Constructs the task

Method Detail

execute

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

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

setBasedir

public void setBasedir(java.io.File dir)
Set the base directory.

Parameters:
dir - Base directory

setSrcdir

public void setSrcdir(java.io.File dir)
Set the source directory

Parameters:
dir - Source directory

setDestdir

public void setDestdir(java.io.File dir)
Set the destination directory into which the result files should be copied to

Parameters:
dir - Destination directory

createMapper

public org.apache.tools.ant.types.Mapper createMapper()
                                               throws org.apache.tools.ant.BuildException
Creates a mapper.

Returns:
New mapper.
Throws:
org.apache.tools.ant.BuildException

setGrammar

public void setGrammar(java.io.File grammarFile)
Set the grammar, which should be used.

Parameters:
grammarFile - Grammar file.

setMsglevel

public void setMsglevel(java.lang.String msgLevel)
Sets the message level.

Parameters:
msgLevel - Message level.

setEncoding

public void setEncoding(java.lang.String encoding)
Sets the encoding for the input file

Parameters:
encoding - Encoding of the document

setIndent

public void setIndent(boolean indent)
Set if the output document should be indented

Parameters:
indent - If the output should be indented

setInputtype

public void setInputtype(java.lang.String inputtype)
If the input document is a XML or a text document.

Parameters:
inputtype - Type of the input document.

setParser

public void setParser(java.lang.String parserFactory)
Name of the parser factory.

Parameters:
parserFactory - Name of the parser factory.

setTransformer

public void setTransformer(java.lang.String transformerFactory)
Name of the transformer factory.

Parameters:
transformerFactory - Name of the transformer factory.

addConfiguredXMLCatalog

public void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog xmlCatalog)
Add the catalog to our internal catalog

Parameters:
xmlCatalog - the XMLCatalog instance to use to look up DTDs

init

public void init()
          throws org.apache.tools.ant.BuildException
Initialize internal instance of XMLCatalog

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


Copyright ? 2003 Chaperon project. All Rights Reserved.