public class ValidateLauncher extends Object
| Constructor and Description |
|---|
ValidateLauncher()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
displayHelp()
Displays tool usage.
|
void |
displayVersion()
Displays the current version and disclaimer notice.
|
void |
doValidation(Map<URL,String> checksumManifest)
Performs validation.
|
Report |
getReport()
Gets the object representation of the Validation Report.
|
static void |
main(String[] args)
Main class that launches the Validate Tool.
|
org.apache.commons.cli.CommandLine |
parse(String[] args)
Parse the command-line arguments
|
void |
printReportFooter()
Print the report footer.
|
void |
query(org.apache.commons.cli.CommandLine line)
Query the command-line and process the command-line option flags set.
|
void |
query(File configuration)
Query the configuration file.
|
void |
setCatalogs(List<String> catalogs)
Set the catalogs.
|
void |
setChecksumManifest(String manifest)
Set the checksum manifest.
|
void |
setForce(boolean value) |
void |
setManifestBasePath(String path)
Set the base path to look up relative file references in a
given checksum manifest file.
|
void |
setModelVersion(String version)
Sets the model version to use during validation.
|
void |
setRegExps(List<String> patterns)
Sets the list of file patterns to look for if traversing a directory.
|
void |
setReport(File report)
Sets the report file.
|
void |
setReportStyle(String style)
Set the output style for the report.
|
void |
setSchemas(List<String> schemas)
Set the schemas.
|
void |
setSchematrons(List<String> schematrons)
Set the schematrons.
|
void |
setSeverity(int level)
Sets the severity level for the report.
|
void |
setTargets(List<String> targets)
Set the target.
|
void |
setTraverse(boolean value)
Sets the flag to enable/disable directory recursion.
|
void |
setupReport()
Setup the report.
|
void |
setValidationRule(String value)
Sets the validation rule name to use.
|
public ValidateLauncher()
throws TransformerConfigurationException
public org.apache.commons.cli.CommandLine parse(String[] args) throws org.apache.commons.cli.ParseException
args - The command-line argumentsorg.apache.commons.cli.ParseException - If an error occurred during parsing.public void query(org.apache.commons.cli.CommandLine line)
throws Exception
line - A CommandLine object containing the flags that were set.Exception - If an error occurred while processing the
command-line options.public void query(File configuration) throws org.apache.commons.configuration.ConfigurationException
configuration - A configuration file.org.apache.commons.configuration.ConfigurationException - If an error occurred while querying
the configuration file.public void setTargets(List<String> targets) throws MalformedURLException
targets - A list of targets.MalformedURLExceptionpublic void setChecksumManifest(String manifest) throws MalformedURLException
manifest - A checksum manifest file.MalformedURLExceptionpublic void setManifestBasePath(String path) throws MalformedURLException
path - A path.MalformedURLExceptionpublic void setSchemas(List<String> schemas) throws MalformedURLException
schemas - A list of schemas.MalformedURLExceptionpublic void setSchematrons(List<String> schematrons) throws MalformedURLException
schematrons - A list of schematrons.MalformedURLExceptionpublic void setCatalogs(List<String> catalogs)
catalogs - A list of catalogs.public void setReport(File report)
report - A report file.public Report getReport()
public void setReportStyle(String style) throws Exception
style - 'sum' for a summary report, 'min' for a minimal report,
and 'full' for a full reportApplicationExceptionExceptionpublic void setTraverse(boolean value)
value - A boolean value.public void setSeverity(int level)
level - An interger value.public void setRegExps(List<String> patterns)
patterns - A list of file patterns.public void setModelVersion(String version)
version - The model version.public void setForce(boolean value)
public void setValidationRule(String value)
value - the validation rule namepublic void displayHelp()
public void displayVersion()
throws IOException
IOException - If there was an error that occurred while
getting the tool information.public void setupReport()
throws IOException
IOException - If an error occurred while setting up the report.public void doValidation(Map<URL,String> checksumManifest) throws Exception
Exceptionpublic void printReportFooter()
public static void main(String[] args) throws TransformerConfigurationException
args - A list of command-line arguments.TransformerConfigurationExceptionCopyright © 2010–2017 Planetary Data System. All rights reserved.