ru.novosoft.dc.rtf_to_xml
Class ConversionTask

java.lang.Object
  |
  +--ru.novosoft.dc.rtf_to_xml.ConversionTask

public class ConversionTask
extends java.lang.Object

An instance of this class provides preparation and execution of an RTF_TO_XML conversion task.


Constructor Summary
ConversionTask(java.io.PrintStream systemLog)
          Create a new conversion task.
 
Method Summary
 void addPath(java.lang.String value)
          Add a new path to the path list of converted files.
 RTF_TO_XMLContext context()
          Return the context of this task.
 boolean convert()
          Execute the task specified in this object and return true if the conversion has finished without errors.
 void outputWithIndents()
          Switch on the indented output to XML.
 void setDestinationPath(java.lang.String value)
          Set a destination path for the task.
 void setLogLevel(int value)
          Set a logging level for the task.
 void setSourcePath(java.lang.String value)
          Set a source path for the task.
 void skipExistingFiles()
          Switch on the skip-existing-files mode.
 void stopOnErrors()
          Switch on the error-stop mode.
 void useRecursion()
          Switch on the recursive conversion in subdirectories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionTask

public ConversionTask(java.io.PrintStream systemLog)
Create a new conversion task.
Method Detail

context

public final RTF_TO_XMLContext context()
Return the context of this task.

setLogLevel

public final void setLogLevel(int value)
Set a logging level for the task.
See Also:
NSDCContext

addPath

public final void addPath(java.lang.String value)
Add a new path to the path list of converted files. The path must specify a file or a group of files to be converted (the '*' and '?' wildcards can be used in the path).

outputWithIndents

public final void outputWithIndents()
Switch on the indented output to XML.

setSourcePath

public final void setSourcePath(java.lang.String value)
Set a source path for the task. The source path is used for batch conversion of directories when the destination directory is specified. In this case, the source path in absolute path of every converted file is replaced to the destination path. If the source path does not specified, the directory of the first path is considered as the source path.

setDestinationPath

public final void setDestinationPath(java.lang.String value)
Set a destination path for the task. If the destination path does not specified, the conversion results are stored together with converted files. If the destination path is specified, the source location directory in absolute paths of the converted files is replaced to the destination directory.

useRecursion

public final void useRecursion()
Switch on the recursive conversion in subdirectories.

stopOnErrors

public final void stopOnErrors()
Switch on the error-stop mode.

skipExistingFiles

public final void skipExistingFiles()
Switch on the skip-existing-files mode.

convert

public boolean convert()
Execute the task specified in this object and return true if the conversion has finished without errors.


Other Novosoft LLC products:
Handy Backup Handy Password manager