org.wdssii.core
Class WDSSIIProgram

java.lang.Object
  extended by org.wdssii.core.WDSSIIProgram
Direct Known Subclasses:
Algorithm, Ingestor, TelnetToLdm

public abstract class WDSSIIProgram
extends Object

Base class of algorithms and tools

Author:
lakshman

Field Summary
private static org.apache.commons.logging.Log log
           
private  String outputDir
           
private  boolean realTime
           
 
Constructor Summary
protected WDSSIIProgram()
          initializes wdssii
 
Method Summary
abstract  void execute()
          Start doing main task.
 String getOutputDir()
           
 Properties getPropertiesFromCommandLine(String[] args, Properties defaults)
          Gets properties from the file specified on command-line backed by defaults.
 String getSubTypeForElevation(float elevation)
          uses 00.00 as the format.
 boolean isRealTime()
           
 void printUsage(Properties defaults, boolean exit)
           
 void setOutputDir(String outputDir)
           
 void setRealTime(boolean realTime)
           
 void setup(Properties props)
          Will use reflection to set up all the properties on the algorithm object.
 void setup(String[] args)
          convenience function
 void setupAndExecute(String[] args)
          convenience function
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

outputDir

private String outputDir

realTime

private boolean realTime
Constructor Detail

WDSSIIProgram

protected WDSSIIProgram()
initializes wdssii

Method Detail

getOutputDir

public String getOutputDir()

setOutputDir

public void setOutputDir(String outputDir)

isRealTime

public boolean isRealTime()

setRealTime

public void setRealTime(boolean realTime)

printUsage

public void printUsage(Properties defaults,
                       boolean exit)

getPropertiesFromCommandLine

public Properties getPropertiesFromCommandLine(String[] args,
                                               Properties defaults)
Gets properties from the file specified on command-line backed by defaults. To autogenerate defaults, consider using:
 Properties defaults = PropertyGetterSetter.getProperties(this);
 
Prints usage and exits on error.


setup

public void setup(Properties props)
Will use reflection to set up all the properties on the algorithm object.


setup

public void setup(String[] args)
convenience function


setupAndExecute

public void setupAndExecute(String[] args)
convenience function


execute

public abstract void execute()
Start doing main task.


getSubTypeForElevation

public String getSubTypeForElevation(float elevation)
uses 00.00 as the format. Override if necessary