|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.krtool.KRTool
public class KRTool
Main class of the Keyword Report Tool (KRTool). KRTool will report a list of statements that match the user supplied list of keywords.
Field Summary |
---|
Fields inherited from interface gov.nasa.pds.krtool.options.KRToolFlags |
---|
IGNOREDIR, IGNOREFILE, KEYWORDS, LOCAL, REGEXP, TARGET, WHATIS_IGNOREDIR, WHATIS_IGNOREFILE, WHATIS_KEYWORDS, WHATIS_LOCAL, WHATIS_REGEXP, WHATIS_TARGET |
Fields inherited from interface gov.nasa.pds.tools.flags.ToolsFlags |
---|
ARGNAME, CONFIG, DICT, HELP, LONG, REPORT, SHORT, VERSION, WHATIS_CONFIG, WHATIS_DICT, WHATIS_HELP, WHATIS_REPORT, WHATIS_VERSION |
Constructor Summary | |
---|---|
KRTool()
|
Method Summary | |
---|---|
gov.nasa.pds.tools.file.FileList |
crawl(java.lang.String target,
boolean traverse)
Crawl the given target. |
void |
doProcessing()
Method that does the KRTool processing. |
void |
doQuery(org.apache.commons.cli.CommandLine commandLine)
Process the options that were found in the command-line. |
static void |
main(java.lang.String[] argv)
|
gov.nasa.pds.tools.label.Label |
parse(java.net.URL url)
Parse the given URL. |
org.apache.commons.cli.CommandLine |
parseLine(java.lang.String[] argv)
Parses the command-line. |
void |
runStatementFinder(java.util.List targets,
boolean recurse,
java.util.List<java.lang.String> identifiers)
Find statements in a set of targets, that match the user supplied keywords. |
java.util.Map<java.lang.String,java.util.List<gov.nasa.pds.tools.label.AttributeStatement>> |
runStatementFinder(java.net.URL url,
java.util.List<java.lang.String> identifiers)
Find statements in a single file, that match the user supplied keywords. |
void |
showHelp()
Show the KRTool usage. |
void |
showVersion()
Show the version and disclaimer notice. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KRTool()
Method Detail |
---|
public org.apache.commons.cli.CommandLine parseLine(java.lang.String[] argv) throws ApplicationException
argv
- Arguments given on the command-line.
ApplicationException
- If there was an error in parsing
the command-line.public void doQuery(org.apache.commons.cli.CommandLine commandLine) throws InvalidOptionException
commandLine
- An object that holds information about the options
that were set on the command-line.
InvalidOptionException
- If an error occurred while doing the
query.public void showVersion() throws java.io.IOException
java.io.IOException
- If the properties file could not be read.public void showHelp()
public gov.nasa.pds.tools.label.Label parse(java.net.URL url)
url
- The URL to parse.
public gov.nasa.pds.tools.file.FileList crawl(java.lang.String target, boolean traverse) throws ApplicationException
target
- A file, URL, or directory.traverse
- 'true' to perform directory recursion, 'false'
otherwise
ApplicationException
- If there was an error crawling the
target.public void runStatementFinder(java.util.List targets, boolean recurse, java.util.List<java.lang.String> identifiers) throws ApplicationException, java.net.MalformedURLException
targets
- A list of files, URLs, or directories.recurse
- Whether to perform directory recursion on a directory.identifiers
- A list of keywords to find in a PDS label.
ApplicationException
- If there was an error crawling a
target directory.
java.net.MalformedURLException
- If a target could not be made into a URL.public java.util.Map<java.lang.String,java.util.List<gov.nasa.pds.tools.label.AttributeStatement>> runStatementFinder(java.net.URL url, java.util.List<java.lang.String> identifiers)
url
- URL of the PDS label.identifiers
- a list of keywords to find in the PDS label.
public void doProcessing() throws ApplicationException, java.net.MalformedURLException
ApplicationException
java.net.MalformedURLException
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |