gov.nasa.pds.search.core
Class SearchCoreLauncher

java.lang.Object
  extended by gov.nasa.pds.search.core.SearchCoreLauncher

public class SearchCoreLauncher
extends Object

CLI the Search Core Tool.

Author:
jpadams

Constructor Summary
SearchCoreLauncher()
          Constructor method to initialize all globals.
 
Method Summary
 void displayHelp()
          Displays tool usage.
 void displayVersion()
          Displays the current version and disclaimer notice.
 void execute()
          Execute Search Core components depending on the flags specified.
static void main(String[] args)
          Main Method to capture CLI arguments.
 org.apache.commons.cli.CommandLine parse(String[] args)
          A method to parse the command-line arguments.
 void query(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.
 void setDefaultConfigHome()
          Sets the default for the configuration home directory.
 void setDefaultSearchHome()
          Sets the default value for the searchHome global.
 void setDefaultServiceUrl()
           
 void setProperties(File propsFile)
          Set the properties for a given registry/search-home/etc.
 void setSearchHome(String searchHome)
          Sets the searchHome global variable after getting its absolute path and ensuring its files existence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchCoreLauncher

public SearchCoreLauncher()
Constructor method to initialize all globals.

Method Detail

displayHelp

public final void displayHelp()
Displays tool usage.


displayVersion

public final void displayVersion()
Displays the current version and disclaimer notice.


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.
org.apache.commons.cli.ParseException

query

public final void query(org.apache.commons.cli.CommandLine line)
                 throws Exception
Examines 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.

setProperties

public final void setProperties(File propsFile)
                         throws InvalidOptionException
Set the properties for a given registry/search-home/etc.

Parameters:
propsFileList -
Throws:
InvalidOptionException - thrown if file does not exist

setSearchHome

public final void setSearchHome(String searchHome)
                         throws InvalidOptionException
Sets the searchHome global variable after getting its absolute path and ensuring its files existence.

Parameters:
searchHome -
Throws:
InvalidOptionException - thrown if directory does not exist

setDefaultSearchHome

public final void setDefaultSearchHome()
                                throws InvalidOptionException
Sets the default value for the searchHome global.

Throws:
InvalidOptionException - thrown if directory does not exist

setDefaultConfigHome

public final void setDefaultConfigHome()
Sets the default for the configuration home directory.


setDefaultServiceUrl

public final void setDefaultServiceUrl()

execute

public final void execute()
Execute Search Core components depending on the flags specified.


main

public static void main(String[] args)
                 throws Exception
Main Method to capture CLI arguments.

Parameters:
args - CLI arguments
Throws:
Exception - CLI parsing exception


Copyright © 2010-2013 Planetary Data System. All Rights Reserved.