gov.nasa.pds.ltdt.gui
Class LTDTool

java.lang.Object
  extended by gov.nasa.pds.ltdt.gui.LTDTool
All Implemented Interfaces:
LTDTFlags, LTDTKeys, gov.nasa.pds.tools.flags.ToolsFlags, gov.nasa.pds.tools.license.ToolsLicense

public class LTDTool
extends java.lang.Object
implements LTDTFlags, LTDTKeys, gov.nasa.pds.tools.license.ToolsLicense


Field Summary
 
Fields inherited from interface gov.nasa.pds.ltdt.commandLine.LTDTFlags
PROJDIR, WHATIS_DICT, WHATIS_PROJDIR
 
Fields inherited from interface gov.nasa.pds.tools.flags.ToolsFlags
ARGNAME, CONFIG, DICT, HELP, LONG, REPORT, SHORT, VERSION, WHATIS_CONFIG, WHATIS_HELP, WHATIS_REPORT, WHATIS_VERSION
 
Fields inherited from interface gov.nasa.pds.ltdt.gui.configuration.LTDTKeys
ADDELEMENT, ADDELEMENTTITLE, ADDOBJECT, ADDOBJECTTITLE, ALL_TYPE, ALLTABINDEX, ALLTABNAME, ALLTYPES, CANCELLED, COMMANDLINEDICTIONARYADDED, CREATEFROMFILETITLE, CREATEFROMTEMPLATETITLE, DICTIONARIES, DICTIONARIESFROMCOMMAND, DICTIONARY_DELIMITER, DICTIONARYGENERICOBJECTTYPE, DICTIONARYSPECIFICOBJECTTYPE, DICTKEY, ELEMENT_TYPE, ELEMENTDEFINITIONTITLE, ELEMENTONLY, ELEMENTTABINDEX, ELEMENTTABNAME, ERROR, EXPORTTEMPLATE, EXPORTWDD, FAIL, FOUND_PROJECTDIR_NO_PROPERTY, FOUND_PROJECTDIR_NO_PROPERTY_AND_NOT_READWRITEABLE, GENERICDEFINITIONTITLE, GETDICTIONARYFROMFILE, GETDICTIONARYFROMURL, GROUP_TYPE, GROUPDEFINITIONTITLE, HOMEDIR, INVALID_DICTIONARY_NAME, LTDTPROPFILE, MODIFYELEMENT, MODIFYELEMENTTITLE, MODIFYOBJECT, MODIFYOBJECTTITLE, NEWEMPTYPROJECT, NEWFROMFILETABINDEX, NEWFROMFILETABNAME, NEWFROMTEMPLATETABINDEX, NEWFROMTEMPLATETABNAME, NEWPROJECT, NEWPROJECTTITLE, NO_PROJECT_REGISTERED, NO_PROJECTDIR_INFO, NOSELECTEDINDEX, OBJECT_TYPE, OBJECTDEFINITIONTITLE, OBJECTONLY, OBJECTTABINDEX, OBJECTTABNAME, OPENPROJECTTABINDEX, OPENPROJECTTABNAME, OPENPROJECTTITLE, PROJDIRKEY, PROJECTALTERED, PROJECTDIR, PROJECTDIR_NOT_FOUND, PROJECTDIR_NOT_READWRITEABLE, PROJECTDIR_PROPERTY_FOUND, PROJECTGALLERYTITLE, PROJECTLOGFILESUFFIX, PROJECTLOGNAME, PROJECTMODIFIEDTITLE, PROJECTNAME, PROJECTPROPERTYFILESUFFIX, PROJECTTEMPLATESUFFIX, PROJECTWDDSUFFIX, PROPERTYARRAY, PROPERTYFILENAME, QUOTEDTYPEARRAY, QUOTEDTYPESYMBOL, SAVEAS, SAVEASTITLE, SUCCESS, SUPPORTEDTYPEARRAY, TEMPLATEEXISTS, TEMPLATEFILENAME, TEMPLATETYPE, TOOLCOPYRIGHT, TOOLNAME, TOOLRELEASEDATE, TOOLVERSION, UNKNOWN_TYPE, UNTITLED, WARNING, WDDDEFAULTGENERALDATATYPE, WDDDEFAULTOBJECTTYPE, WDDDEFAULTSTANDARDVALUETYPE, WDDEXISTS, WDDFILENAME, WDDFINALSTATUSTYPE, WDDSTATUSTYPE
 
Fields inherited from interface gov.nasa.pds.tools.license.ToolsLicense
LICENSE
 
Constructor Summary
LTDTool()
          Constructor
 
Method Summary
static void main(java.lang.String[] args)
           
 org.apache.commons.cli.CommandLine parse(java.lang.String[] args)
          Parses the command line
 java.util.HashMap query(org.apache.commons.cli.CommandLine cmd)
          Finds the different flag options specified during the execution run.
 void readConfig(java.net.URL url)
          Reads a configuration file if it was passed into the tool.
 void setDict(java.util.List dictionaries)
          Set the list of dictionaries.
 void setProjDir(java.io.File p)
          Set the project directory.
 void showHelp(org.apache.commons.cli.Options opts)
          Display LTDTool usage.
 void showVersion()
          Show the version and disclaimer notice for LTDTool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LTDTool

public LTDTool()
Constructor

Method Detail

showVersion

public void showVersion()
                 throws java.io.IOException
Show the version and disclaimer notice for LTDTool.

Throws:
java.io.IOException

showHelp

public void showHelp(org.apache.commons.cli.Options opts)
Display LTDTool usage.


setDict

public void setDict(java.util.List dictionaries)
             throws java.net.MalformedURLException,
                    java.io.IOException
Set the list of dictionaries.

Parameters:
dictionaries - A list of data dictionary files.
Throws:
java.io.IOException - Gets thrown if there was an invalid dictionary URL
java.net.MalformedURLException

setProjDir

public void setProjDir(java.io.File p)
                throws java.io.IOException
Set the project directory.

Parameters:
p - The project directory.
Throws:
java.io.IOException - If the project directory does not exist.

parse

public org.apache.commons.cli.CommandLine parse(java.lang.String[] args)
                                         throws org.apache.commons.cli.ParseException
Parses the command line

Parameters:
args - The arguments specified on the command line.
Returns:
A CommandLine object that has the results of the parsing.
Throws:
org.apache.commons.cli.ParseException - Thrown if there was an invalid argument specified.

query

public java.util.HashMap query(org.apache.commons.cli.CommandLine cmd)
                        throws org.apache.commons.configuration.ConfigurationException,
                               org.apache.commons.configuration.ConversionException,
                               java.io.IOException
Finds the different flag options specified during the execution run.

Parameters:
cmd - Contains the option values specified on the command line.
Returns:
A HashMap containing values set for the different tool properties.
Throws:
org.apache.commons.configuration.ConfigurationException - Throws exception if a configuration file was specified and there was a problem during reading of the file.
java.io.IOException
org.apache.commons.configuration.ConversionException

readConfig

public void readConfig(java.net.URL url)
                throws org.apache.commons.configuration.ConfigurationException,
                       org.apache.commons.configuration.ConversionException,
                       java.io.IOException
Reads a configuration file if it was passed into the tool.

Parameters:
url - The URL supplied by the user.
Throws:
org.apache.commons.configuration.ConfigurationException - If there was a problem reading the file.
org.apache.commons.configuration.ConversionException - If there was an invalid value entered for a property.
java.io.IOException

main

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


Copyright © 2005-2008 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.