com.pimeca.waster
Class InputFileHandler

java.lang.Object
  extended by com.pimeca.waster.InputFileHandler

public class InputFileHandler
extends java.lang.Object

wrapper to handle the whole process

Author:
maurel

Field Summary
private  java.lang.String cleanBaseDir
           
private  java.lang.String cleanWorkingDir
          if not null delete working dir when finished
private  java.lang.String cmdFileUri
          absolute uri of aster command file
private  CmdLineHandler cmdLineHandler
          command line handler
private  java.lang.String debug
          if not null debug executable is used
private  java.lang.String memory
          value of memjeveux in aster launch command must be a number
private  java.lang.String runtimeDirUri
          absolute uri of runtime directory where are all files necessary for aster execution
private  java.lang.String workDirUri
          absolute uri of temporary working directory
 
Constructor Summary
private InputFileHandler()
           
  InputFileHandler(java.lang.String[] args)
          constructor initialising arguments
 
Method Summary
private  java.lang.String checkCmdFileUri(java.lang.String candidateCmdFileUri)
          try to transform a windows file path into absolute uri and checks whether the runtime directory exists if candidateCmdFileUri is absolute uri only checks whether the file exists
private  java.lang.String checkRuntime(java.lang.String candidateRuntimeDirUri)
          try to transform a windows file path into absolute uri and checks whether the runtime directory exists if candidateRuntimeDirUri is absolute uri only checks whether the file exists
 void execute()
          launches aster execution with the file command that has been previously setup
 void execute(java.lang.String cmdFileUri)
          launches aster execution
 void setOptions()
          setup of this class data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

memory

private java.lang.String memory
value of memjeveux in aster launch command must be a number


cmdFileUri

private java.lang.String cmdFileUri
absolute uri of aster command file


runtimeDirUri

private java.lang.String runtimeDirUri
absolute uri of runtime directory where are all files necessary for aster execution


workDirUri

private java.lang.String workDirUri
absolute uri of temporary working directory


debug

private java.lang.String debug
if not null debug executable is used


cmdLineHandler

private CmdLineHandler cmdLineHandler
command line handler


cleanWorkingDir

private java.lang.String cleanWorkingDir
if not null delete working dir when finished


cleanBaseDir

private java.lang.String cleanBaseDir
Constructor Detail

InputFileHandler

private InputFileHandler()

InputFileHandler

public InputFileHandler(java.lang.String[] args)
constructor initialising arguments

Parameters:
args -
Method Detail

execute

public void execute(java.lang.String cmdFileUri)
launches aster execution

Parameters:
cmdFileUri - (abolute uri)

execute

public void execute()
launches aster execution with the file command that has been previously setup


setOptions

public void setOptions()
setup of this class data


checkRuntime

private java.lang.String checkRuntime(java.lang.String candidateRuntimeDirUri)
try to transform a windows file path into absolute uri and checks whether the runtime directory exists if candidateRuntimeDirUri is absolute uri only checks whether the file exists

Parameters:
candidateRuntimeDirUri - (absolute uri or file path)
Returns:
candidateRuntimeDirUri as abolute uri

checkCmdFileUri

private java.lang.String checkCmdFileUri(java.lang.String candidateCmdFileUri)
try to transform a windows file path into absolute uri and checks whether the runtime directory exists if candidateCmdFileUri is absolute uri only checks whether the file exists

Parameters:
candidateCmdFileUri - (absolute uri or file path)
Returns:
candidateCmdFileUri as abolute uri