gov.nasa.pds.validate
Class DirectoryValidator

java.lang.Object
  extended by gov.nasa.pds.validate.Validator
      extended by gov.nasa.pds.validate.DirectoryValidator

public class DirectoryValidator
extends Validator

Class that validates a directory containing PDS products.

Author:
mcayanan

Field Summary
 
Fields inherited from class gov.nasa.pds.validate.Validator
catalogs, modelVersion, report, schemas, schematrons
 
Constructor Summary
DirectoryValidator(String modelVersion, Report report)
          Constructor.
 
Method Summary
 void setFileFilters(List<String> filters)
          Sets the file filter.
 void setRecurse(boolean value)
          Sets the recursion flag.
 void validate(File file)
          Validate a PDS product.
 void validate(URL directory)
          Perform validation on a directory.
 
Methods inherited from class gov.nasa.pds.validate.Validator
setCatalogs, setSchemas, setSchematrons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryValidator

public DirectoryValidator(String modelVersion,
                          Report report)
Constructor.

Parameters:
modelVersion - The model version to use for validation.
report - A Report object to output the results.
Method Detail

setRecurse

public void setRecurse(boolean value)
Sets the recursion flag. By default, it is set to 'true'.

Parameters:
value - A boolean value.

setFileFilters

public void setFileFilters(List<String> filters)
Sets the file filter.

Parameters:
filters - A list of file patterns to look for while traversing a directory.

validate

public void validate(URL directory)
              throws Exception
Perform validation on a directory.

Specified by:
validate in class Validator
Parameters:
directory - A directory path to start traversing.
Throws:
Exception

validate

public void validate(File file)
              throws Exception
Description copied from class: Validator
Validate a PDS product.

Specified by:
validate in class Validator
Parameters:
file - A PDS product file.
Throws:
gov.nasa.pds.tools.label.ValidatorException
Exception


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