org.eclipse.mylyn.wikitext.core.util.anttask
Class MarkupTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.eclipse.mylyn.wikitext.core.util.anttask.MarkupTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
MarkupToDitaTask, MarkupToDocbookTask, MarkupToHtmlTask, MarkupToXslfoTask

public abstract class MarkupTask
extends org.apache.tools.ant.Task

An abstract class for Ant tasks that use a configurable MarkupLanguage.

Author:
David Green

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
MarkupTask()
           
 
Method Summary
 void addConfiguredMarkupLanguageConfiguration(MarkupLanguageConfiguration markupLanguageConfiguration)
          Support a nested markup language configuration.
protected  MarkupLanguage createMarkupLanguage()
          Create a markup language parser for the specified markup language.
 String getInternalLinkPattern()
           
 String getMarkupLanguage()
          The markup language to use.
 MarkupLanguageConfiguration getMarkupLanguageConfiguration()
           
 String getSourceEncoding()
          The source encoding.
 boolean isFailOnValidationError()
          Indicate if WikiText validation errors should cause the Ant build to fail.
 boolean isFailOnValidationWarning()
          Indicate if WikiText validation warnings should cause the Ant build to fail.
 boolean isValidate()
          Indicate if WikiText markup should be validated.
protected  void performValidation(File source, String markupContent)
           
protected  String readFully(File inputFile)
           
 void setFailOnValidationError(boolean failOnValidationError)
          Indicate if WikiText validation errors should cause the Ant build to fail.
 void setFailOnValidationWarning(boolean failOnValidationWarning)
          Indicate if WikiText validation warnings should cause the Ant build to fail.
 void setInternalLinkPattern(String internalLinkPattern)
           
 void setMarkupLanguage(String markupLanguage)
          The markup language to use.
 void setMarkupLanguageConfiguration(MarkupLanguageConfiguration markupLanguageConfiguration)
           
 void setSourceEncoding(String sourceEncoding)
          The source encoding.
 void setValidate(boolean validate)
          Indicate if WikiText markup should be validated.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, execute, 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

MarkupTask

public MarkupTask()
Method Detail

getMarkupLanguage

public String getMarkupLanguage()
The markup language to use. Should correspond to a markup language name.


setMarkupLanguage

public void setMarkupLanguage(String markupLanguage)
The markup language to use. Should correspond to a markup language name.


getMarkupLanguageConfiguration

public MarkupLanguageConfiguration getMarkupLanguageConfiguration()
Since:
1.3

setMarkupLanguageConfiguration

public void setMarkupLanguageConfiguration(MarkupLanguageConfiguration markupLanguageConfiguration)
Since:
1.3

createMarkupLanguage

protected MarkupLanguage createMarkupLanguage()
                                       throws org.apache.tools.ant.BuildException
Create a markup language parser for the specified markup language.

Returns:
the markup language
Throws:
org.apache.tools.ant.BuildException - if the markup language is not specified or if it is unknown.

setInternalLinkPattern

public void setInternalLinkPattern(String internalLinkPattern)
See Also:
MarkupLanguage.setInternalLinkPattern(String)

getInternalLinkPattern

public String getInternalLinkPattern()
See Also:
MarkupLanguage.getInternalLinkPattern()

isValidate

public boolean isValidate()
Indicate if WikiText markup should be validated. The default is true.


setValidate

public void setValidate(boolean validate)
Indicate if WikiText markup should be validated. The default is true.


isFailOnValidationError

public boolean isFailOnValidationError()
Indicate if WikiText validation errors should cause the Ant build to fail. The default is true.


setFailOnValidationError

public void setFailOnValidationError(boolean failOnValidationError)
Indicate if WikiText validation errors should cause the Ant build to fail. The default is true.


isFailOnValidationWarning

public boolean isFailOnValidationWarning()
Indicate if WikiText validation warnings should cause the Ant build to fail. The default is false.


setFailOnValidationWarning

public void setFailOnValidationWarning(boolean failOnValidationWarning)
Indicate if WikiText validation warnings should cause the Ant build to fail. The default is false.


getSourceEncoding

public String getSourceEncoding()
The source encoding.

Returns:
the source encoding, or null if the default encoding is to be used.
Since:
1.1
See Also:
Charset

setSourceEncoding

public void setSourceEncoding(String sourceEncoding)
The source encoding. The is the character encoding to be used when reading source files.

Parameters:
sourceEncoding - the source encoding, or null if the default encoding is to be used.
Since:
1.1
See Also:
Charset

performValidation

protected void performValidation(File source,
                                 String markupContent)

addConfiguredMarkupLanguageConfiguration

public void addConfiguredMarkupLanguageConfiguration(MarkupLanguageConfiguration markupLanguageConfiguration)
Support a nested markup language configuration.

Since:
1.1

readFully

protected String readFully(File inputFile)
Since:
1.1


Copyright © 2011 FuseSource, Corp.. All Rights Reserved.