com.mizar.persistence.gdal
Class DcrawRunner

java.lang.Object
  extended by com.mizar.commons.io.CommandRunner
      extended by com.mizar.persistence.gdal.DcrawRunner

public class DcrawRunner
extends CommandRunner

See Also:
documentation

Field Summary
static int OUTPUT_JPEG
           
static int OUTPUT_PPM
           
static int OUTPUT_TIFF
           
 
Constructor Summary
DcrawRunner()
           
DcrawRunner(java.lang.String inputFile, java.lang.Integer outputMode)
           
DcrawRunner(java.lang.String inputFile, java.lang.Integer outputMode, boolean folderMode)
           
DcrawRunner(java.lang.String inputFile, java.lang.String outputFile)
           
 
Method Summary
 void buildCommandLine()
           
 boolean getFolderMode()
           
 java.lang.String getInputFile()
           
 java.lang.String getInputType()
           
 java.lang.String getOutputFile()
           
 java.lang.Integer getOutputMode()
           
 DcrawBean getParam()
           
 java.io.File getTargetFolder()
           
 java.lang.String getWorkFile()
          This method requires that inputFile has already been set.
 java.io.File getWorkFolder()
           
 boolean isMakeJpegThumbNail()
           
 boolean isRemoveWorkFile()
           
 boolean isVerbose()
           
static void main(java.lang.String[] args)
           
 java.util.List<java.lang.String> run()
           
 void setFolderMode(boolean folderMode)
          If set to true then inputFile is interpreted as a folder and all the files matching inputType.
 void setInputFile(java.lang.String inputFile)
           
 void setInputType(java.lang.String inputType)
           
 void setMakeJpegThumbNail(boolean makeJpegThumbNail)
           
 void setOutputFile(java.lang.String outputFile)
           
 void setOutputMode(java.lang.Integer outputMode)
           
 void setParam(DcrawBean param)
           
 void setRemoveWorkFile(boolean removeWorkFile)
           
 void setTargetFolder(java.io.File targetFolder)
           
 void setVerbose(boolean verbose)
           
 void setWorkFolder(java.io.File workFolder)
          The default JPEG output requires the creation of a TIFF file which is then converted to JPEG using gdal_translate.
 
Methods inherited from class com.mizar.commons.io.CommandRunner
clear, exec, exitValue, finalize, getCommandLine, getDir, getEnvp, getErrors, getResponse, run, run, run, run, run, setCommandLine, setDir, setEnvp, setLdLibraryPath, setLdLibraryPath, setOracleHome, setOracleHome, waitFor
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_JPEG

public static final int OUTPUT_JPEG
See Also:
Constant Field Values

OUTPUT_TIFF

public static final int OUTPUT_TIFF
See Also:
Constant Field Values

OUTPUT_PPM

public static final int OUTPUT_PPM
See Also:
Constant Field Values
Constructor Detail

DcrawRunner

public DcrawRunner()

DcrawRunner

public DcrawRunner(java.lang.String inputFile,
                   java.lang.String outputFile)

DcrawRunner

public DcrawRunner(java.lang.String inputFile,
                   java.lang.Integer outputMode)

DcrawRunner

public DcrawRunner(java.lang.String inputFile,
                   java.lang.Integer outputMode,
                   boolean folderMode)
Method Detail

main

public static void main(java.lang.String[] args)

run

public java.util.List<java.lang.String> run()
                                     throws java.io.IOException
Overrides:
run in class CommandRunner
Throws:
java.io.IOException

buildCommandLine

public void buildCommandLine()

setOutputMode

public void setOutputMode(java.lang.Integer outputMode)

getOutputMode

public java.lang.Integer getOutputMode()

setInputFile

public void setInputFile(java.lang.String inputFile)

getInputFile

public java.lang.String getInputFile()

setOutputFile

public void setOutputFile(java.lang.String outputFile)

getOutputFile

public java.lang.String getOutputFile()

setTargetFolder

public void setTargetFolder(java.io.File targetFolder)

getTargetFolder

public java.io.File getTargetFolder()

setFolderMode

public void setFolderMode(boolean folderMode)
If set to true then inputFile is interpreted as a folder and all the files matching inputType. If targetFolder is not already defined it will be set to the folder or folder containing outputFile. If neither targetFolder nor outputFile is defined the caller must set targetFolder before calling run() Files will be created using the same name as the input files folder but with the appropriate extension for the outputMode.

Parameters:
folderMode -

getFolderMode

public boolean getFolderMode()

setInputType

public void setInputType(java.lang.String inputType)

getInputType

public java.lang.String getInputType()

setWorkFolder

public void setWorkFolder(java.io.File workFolder)
The default JPEG output requires the creation of a TIFF file which is then converted to JPEG using gdal_translate. The workFolder defaults to the folder holding the outputFile but can be set differently using this parameter.

Parameters:
workFolder - a folder to use for any working files.

getWorkFolder

public java.io.File getWorkFolder()
Returns:

getWorkFile

public java.lang.String getWorkFile()
This method requires that inputFile has already been set.

Returns:
a workfile based on workFolder and inputFile

setRemoveWorkFile

public void setRemoveWorkFile(boolean removeWorkFile)
Parameters:
removeWorkFile - if true and if

isRemoveWorkFile

public boolean isRemoveWorkFile()

setMakeJpegThumbNail

public void setMakeJpegThumbNail(boolean makeJpegThumbNail)

isMakeJpegThumbNail

public boolean isMakeJpegThumbNail()

setVerbose

public void setVerbose(boolean verbose)

isVerbose

public boolean isVerbose()

setParam

public void setParam(DcrawBean param)

getParam

public DcrawBean getParam()