public abstract class Validator extends Object
Modifier and Type | Field and Description |
---|---|
protected List<String> |
catalogs
A list of user specified catalogs to use during validation.
|
protected boolean |
force
Flag to force validation against a label's schema and schematron.
|
protected LabelValidator |
labelValidator
LabelValidator object.
|
protected Report |
report
An object representation of a report to capture the results of
validation.
|
protected List<String> |
schemas
A list of user specified schemas to validate against.
|
protected SchematronTransformer |
schematronTransformer
A SchematronTransformer object.
|
protected SchemaValidator |
schemaValidator
Schema validator.
|
Constructor and Description |
---|
Validator(String modelVersion,
Report report)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValidator(DocumentValidator validator) |
void |
setCachedEntityResolver(CachedEntityResolver resolver) |
void |
setCachedLSResourceResolver(CachedLSResourceResolver resolver) |
void |
setCatalogs(List<String> catalogs)
Sets the catalogs to use during validation.
|
void |
setForce(boolean value) |
void |
setSchemas(List<URL> schemaFiles)
Sets the schemas to use during validation.
|
void |
setSchematrons(List<Transformer> schematrons)
Sets the schematrons to use during validation.
|
abstract void |
validate(File file)
Validate a PDS product.
|
abstract void |
validate(URL url) |
protected Report report
protected List<String> catalogs
protected LabelValidator labelValidator
protected boolean force
protected SchemaValidator schemaValidator
protected SchematronTransformer schematronTransformer
public Validator(String modelVersion, Report report) throws ParserConfigurationException, ValidatorException, TransformerConfigurationException
modelVersion
- The model version to use for validation.report
- A Report object to output the results of the validation
run.ParserConfigurationException
ValidatorException
TransformerConfigurationException
public void setSchemas(List<URL> schemaFiles) throws SAXException
schemaFiles
- A list of schema files.SAXException
public void setSchematrons(List<Transformer> schematrons)
schematrons
- A list of schematrons.public void setCachedEntityResolver(CachedEntityResolver resolver)
public void setCachedLSResourceResolver(CachedLSResourceResolver resolver)
public void setCatalogs(List<String> catalogs)
catalogs
- A list of catalog files.public void setForce(boolean value)
public void addValidator(DocumentValidator validator)
public abstract void validate(File file) throws Exception
file
- A PDS product file.ValidatorException
Exception
Copyright © 2010–2018 Planetary Data System. All rights reserved.