Package gov.nasa.pds.transform
Class TransformLauncher
- java.lang.Object
-
- gov.nasa.pds.transform.TransformLauncher
-
public class TransformLauncher extends Object
Front end class of the Transform Tool that handles the command-line processing.- Author:
- mcayanan
-
-
Constructor Summary
Constructors Constructor Description TransformLauncher()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisplayHelp()Displays tool usage.voiddisplayVersion()Displays the current version and disclaimer notice.static voidmain(String[] args)org.apache.commons.cli.CommandLineparse(String[] args)A method to parse the command-line arguments.voidquery(org.apache.commons.cli.CommandLine line)Examines the command-line arguments passed into the Harvest Tool and takes the appropriate action based on what flags were set.voidsetIncludePaths(List<String> i)Set the paths to search for files referenced by pointers.voidsetTargets(List<String> targets)Set the target.
-
-
-
Constructor Detail
-
TransformLauncher
public TransformLauncher() throws IOExceptionConstructor.- Throws:
IOException
-
-
Method Detail
-
parse
public final org.apache.commons.cli.CommandLine parse(String[] args) throws org.apache.commons.cli.ParseException
A method to parse the command-line arguments.- Parameters:
args- The command-line arguments- Returns:
- A class representation of the command-line arguments
- Throws:
org.apache.commons.cli.ParseException- If there was an error during parsing.
-
query
public final void query(org.apache.commons.cli.CommandLine line) throws InvalidOptionException, IOExceptionExamines the command-line arguments passed into the Harvest Tool and takes the appropriate action based on what flags were set.- Parameters:
line- A class representation of the command-line arguments.- Throws:
Exception- If there was an error while querying the options that were set on the command-line.InvalidOptionExceptionIOException
-
displayHelp
public final void displayHelp()
Displays tool usage.
-
displayVersion
public final void displayVersion()
Displays the current version and disclaimer notice.
-
setTargets
public void setTargets(List<String> targets) throws MalformedURLException
Set the target.- Parameters:
targets- A list of targets.- Throws:
MalformedURLException
-
setIncludePaths
public void setIncludePaths(List<String> i)
Set the paths to search for files referenced by pointers.Default is to always look first in the same directory as the label, then search specified directories.
- Parameters:
i- List of paths
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-