public class ValidateLauncher
extends java.lang.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(java.util.Map<java.net.URL,java.lang.String> checksumManifest)
Performs validation.
|
Report |
getReport()
Gets the object representation of the Validation Report.
|
static void |
main(java.lang.String[] args)
Main class that launches the Validate Tool.
|
org.apache.commons.cli.CommandLine |
parse(java.lang.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(java.io.File configuration)
Query the configuration file.
|
void |
setCatalogs(java.util.List<java.lang.String> catalogs)
Set the catalogs.
|
void |
setCheckData(boolean flag)
Sets the flag that enables/disables data content validation.
|
void |
setChecksumManifest(java.lang.String manifest)
Set the checksum manifest.
|
void |
setForce(boolean value) |
void |
setManifestBasePath(java.lang.String path)
Set the base path to look up relative file references in a
given checksum manifest file.
|
void |
setMaxErrors(long value) |
void |
setModelVersion(java.lang.String version)
Sets the model version to use during validation.
|
void |
setRegExps(java.util.List<java.lang.String> patterns)
Sets the list of file patterns to look for if traversing a directory.
|
void |
setReport(java.io.File report)
Sets the report file.
|
void |
setReportStyle(java.lang.String style)
Set the output style for the report.
|
void |
setSchemas(java.util.List<java.lang.String> schemas)
Set the schemas.
|
void |
setSchematrons(java.util.List<java.lang.String> schematrons)
Set the schematrons.
|
void |
setSeverity(int level)
Sets the severity level for the report.
|
void |
setTargets(java.util.List<java.lang.String> targets)
Set the target.
|
void |
setTraverse(boolean value)
Sets the flag to enable/disable directory recursion.
|
void |
setupReport()
Setup the report.
|
void |
setValidationRule(java.lang.String value)
Sets the validation rule name to use.
|
public ValidateLauncher() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public org.apache.commons.cli.CommandLine parse(java.lang.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 java.lang.Exception
line
- A CommandLine object containing the flags that were set.java.lang.Exception
- If an error occurred while processing the
command-line options.public void query(java.io.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(java.util.List<java.lang.String> targets) throws java.net.MalformedURLException
targets
- A list of targets.java.net.MalformedURLException
public void setChecksumManifest(java.lang.String manifest) throws java.net.MalformedURLException
manifest
- A checksum manifest file.java.net.MalformedURLException
public void setManifestBasePath(java.lang.String path) throws java.net.MalformedURLException
path
- A path.java.net.MalformedURLException
public void setSchemas(java.util.List<java.lang.String> schemas) throws java.net.MalformedURLException
schemas
- A list of schemas.java.net.MalformedURLException
public void setSchematrons(java.util.List<java.lang.String> schematrons) throws java.net.MalformedURLException
schematrons
- A list of schematrons.java.net.MalformedURLException
public void setCatalogs(java.util.List<java.lang.String> catalogs)
catalogs
- A list of catalogs.public void setReport(java.io.File report)
report
- A report file.public Report getReport()
public void setReportStyle(java.lang.String style) throws java.lang.Exception
style
- 'sum' for a summary report, 'min' for a minimal report,
and 'full' for a full reportorg.omg.CORBA.portable.ApplicationException
java.lang.Exception
public void setTraverse(boolean value)
value
- A boolean value.public void setSeverity(int level)
level
- An interger value.public void setRegExps(java.util.List<java.lang.String> patterns)
patterns
- A list of file patterns.public void setModelVersion(java.lang.String version)
version
- The model version.public void setForce(boolean value)
public void setValidationRule(java.lang.String value)
value
- the validation rule namepublic void setCheckData(boolean flag)
flag
- True or False.public void setMaxErrors(long value)
public void displayHelp()
public void displayVersion() throws java.io.IOException
java.io.IOException
- If there was an error that occurred while
getting the tool information.public void setupReport() throws java.io.IOException
java.io.IOException
- If an error occurred while setting up the report.public void doValidation(java.util.Map<java.net.URL,java.lang.String> checksumManifest) throws java.lang.Exception
java.lang.Exception
public void printReportFooter()
public static void main(java.lang.String[] args) throws javax.xml.transform.TransformerConfigurationException
args
- A list of command-line arguments.javax.xml.transform.TransformerConfigurationException
Copyright © 2010-2018 Planetary Data System. All Rights Reserved.