edu.umd.cfar.lamp.apploader.prefs
Class OptionsManager

java.lang.Object
  extended byedu.umd.cfar.lamp.apploader.prefs.OptionsManager

public class OptionsManager
extends java.lang.Object

Manages command-line arguments.


Constructor Summary
OptionsManager()
          Constructs a new, empty options manager.
 
Method Summary
 void addTrigger(com.hp.hpl.jena.rdf.model.Resource trigger)
          Loads the three maps with trigger functor by name.
 PrefsManager getPrefs()
           
 void invokePropertyTriggers()
          Apply all the bound triggers to any matching system properties.
 void parseArgumentList(java.lang.String[] args)
          Parses the given command line arguments and invokes the corresponding triggers.
 void printUsage()
          Prints the command line usage to the system error stream.
 void printUsage(int lod)
          Prints usage to the given level of detail, a non-negative integer.
 void removeTrigger(com.hp.hpl.jena.rdf.model.Resource trigger)
          Removes the specified trigger.
 void setPrefs(PrefsManager manager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionsManager

public OptionsManager()
Constructs a new, empty options manager.

Method Detail

invokePropertyTriggers

public void invokePropertyTriggers()
Apply all the bound triggers to any matching system properties.


parseArgumentList

public void parseArgumentList(java.lang.String[] args)
                       throws ArgumentException
Parses the given command line arguments and invokes the corresponding triggers.

Parameters:
args - the command line arguments
Throws:
ArgumentException

printUsage

public void printUsage()
                throws PreferenceException
Prints the command line usage to the system error stream.

Throws:
PreferenceException

printUsage

public void printUsage(int lod)
                throws PreferenceException
Prints usage to the given level of detail, a non-negative integer. Zero just prints out a one-line command. One prints out all abbreviated commands with have rdfs:descriptions. Two prints out all labeled commands with rdfs:descriptions. Three prints out all commands. Four or more prints out commands with their dc:descriptions.

Parameters:
lod -
Throws:
PreferenceException

addTrigger

public void addTrigger(com.hp.hpl.jena.rdf.model.Resource trigger)
                throws PreferenceException
Loads the three maps with trigger functor by name.

Parameters:
trigger - the trigger to add
Throws:
PreferenceException - if the trigger has no name

removeTrigger

public void removeTrigger(com.hp.hpl.jena.rdf.model.Resource trigger)
                   throws PreferenceException
Removes the specified trigger. Won't do anything about triggers that have already been executed, though.

Parameters:
trigger - the trigger to remove
Throws:
PreferenceException - if the trigger wasn't found

getPrefs

public PrefsManager getPrefs()
Returns:

setPrefs

public void setPrefs(PrefsManager manager)
Parameters:
manager -