stella.util
Class CommandLineTarget

java.lang.Object
  extended by util.CommandLineParser
      extended by stella.util.CommandLineTarget
Direct Known Subclasses:
AxelList, KlausList, Landolt83List, Landolt92List

public class CommandLineTarget
extends CommandLineParser

A command line tool to generate target-xml files. This class tries to infer most of the target information from a default setting, but still provide enough flexibility to allow this tool to construct most of the targets relevant for STELLA. It is used with the following switches, number in parenthesis give the number of arguments.

Example:
   java stella.util.CommandLineTarget -tel STELLA-I -type doppler -name "HD 12545 DI" -user Strassmeier -setup set1 ExposureTime 300 -object main "HD 12545" -guide main 02:03:45 35:35:20 -o hd_12545.xml


Nested Class Summary
static class CommandLineTarget.Batch
          Takes a list of input objects and process them with a standard set of command line switches.
static class CommandLineTarget.Cohen
          Takes a list of Cohen standards and creates flux standards out of it.
static class CommandLineTarget.Coravel
          Takes a list of Coravel radial velocity standards and makes STELLA targets out of it.
static class CommandLineTarget.Hipparchos
          Generates a sublist of the hipparchos catalog for acquire tests.
static class CommandLineTarget.Pointing
          Generates all hr objects for pointing model.
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
private  String dtd
          Not null if the dtd-path was set.
private static String FOOT
          An example of use
private  TargetHelper help
          The target helper to construct the xml-file.
private static String ONESWITCH
          The switches taking one argument.
private static String THREESWITCH
          The switches taking three arguments.
private static String TWOSWITCH
          The switches taking two arguments.
private static Map USE
          The detailed use of the switches.
 
Constructor Summary
CommandLineTarget()
          Constructs a new command-line parser and registers its switches.
 
Method Summary
 Document createTarget()
          We have successfully processed all command line arguments and hope that we can now build a document.
static void main(String[] arg)
          Parse the command line arguments and save the target as an xml file.
 boolean process(String[] arg)
          Processes the command line arguments.
 boolean saveXML(Document target)
          Save the document as an xml-file.
 
Methods inherited from class util.CommandLineParser
getArguments, getCommandLine, getCommands, getRegisteredSwitches, hasAnySwitch, hasSwitch, hasSwitch, haveAllSwitches, parse, printCommandLine, registerLine, registerSwitches, setCommands, staticUsage, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONESWITCH

private static final String ONESWITCH
The switches taking one argument.

See Also:
Constant Field Values

TWOSWITCH

private static final String TWOSWITCH
The switches taking two arguments.

See Also:
Constant Field Values

THREESWITCH

private static final String THREESWITCH
The switches taking three arguments.

See Also:
Constant Field Values

USE

private static final Map USE
The detailed use of the switches.


FOOT

private static final String FOOT
An example of use

See Also:
Constant Field Values

help

private TargetHelper help
The target helper to construct the xml-file.


dtd

private String dtd
Not null if the dtd-path was set.

Constructor Detail

CommandLineTarget

public CommandLineTarget()
Constructs a new command-line parser and registers its switches. The target helper is intialized using no properties.

Method Detail

process

public boolean process(String[] arg)
                throws ParseException
Processes the command line arguments.

Throws:
ParseException

createTarget

public Document createTarget()
We have successfully processed all command line arguments and hope that we can now build a document.


saveXML

public boolean saveXML(Document target)
Save the document as an xml-file. If we can not determine the save file, we pipe to standard out


main

public static void main(String[] arg)
                 throws ParseException
Parse the command line arguments and save the target as an xml file.

Throws:
ParseException