gov.nasa.pds.tools.label.validate
Class FileReferenceValidator

java.lang.Object
  extended by gov.nasa.pds.tools.label.validate.FileReferenceValidator
All Implemented Interfaces:
ExternalValidator

public class FileReferenceValidator
extends Object
implements ExternalValidator

Validator class that looks for file references in the PDS4 product label and performs the following checks: - Verify that the generated checksum matches the supplied checksum, if provided - Verify that the casing of the file reference matches the file name casing on the file system

Author:
mcayanan

Constructor Summary
FileReferenceValidator()
           
 
Method Summary
 boolean validate(ExceptionContainer container, File labelFile)
          Method signature for checking to see if a label is valid.
 boolean validate(ExceptionContainer container, URL labelUrl)
          Method signature for checking to see if a label is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileReferenceValidator

public FileReferenceValidator()
Method Detail

validate

public boolean validate(ExceptionContainer container,
                        URL labelUrl)
Description copied from interface: ExternalValidator
Method signature for checking to see if a label is valid.

Specified by:
validate in interface ExternalValidator
Parameters:
container - An exception container.
labelUrl - URL of the PDS4 label.
Returns:
flag indicating whether or not the step in validation was passed.

validate

public boolean validate(ExceptionContainer container,
                        File labelFile)
Description copied from interface: ExternalValidator
Method signature for checking to see if a label is valid.

Specified by:
validate in interface ExternalValidator
Parameters:
container - An exception container.
labelFile - PDS4 label file.
Returns:
flag indicating whether or not the step in validation was passed.


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