gov.nasa.pds.vtool.validate
Class ValidationRecord

java.lang.Object
  extended by gov.nasa.pds.vtool.validate.ValidationRecord
All Implemented Interfaces:
gov.nasa.pds.tools.label.validate.Status

public class ValidationRecord
extends java.lang.Object
implements gov.nasa.pds.tools.label.validate.Status

Class that can be used to save the results of a validation run.

Author:
mcayanan

Field Summary
 
Fields inherited from interface gov.nasa.pds.tools.label.validate.Status
FAIL, PASS, SKIP, UNKNOWN
 
Constructor Summary
ValidationRecord()
          Constructor
ValidationRecord(java.lang.String status, int warns, int errors)
          Constructor
 
Method Summary
 void add(java.lang.String status, int warns, int errors)
          Record the results of a label validation.
 void add(ValidationRecord record)
          Record the results of a label validation.
 int getFilesFailed()
           
 int getFilesPassed()
           
 int getFilesSkipped()
           
 int getTotalErrors()
           
 int getTotalWarnings()
           
 boolean hasErrors()
          Determines if any errors are present in the record.
 boolean hasWarnings()
          Determines if any warnings are present in the record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationRecord

public ValidationRecord()
Constructor


ValidationRecord

public ValidationRecord(java.lang.String status,
                        int warns,
                        int errors)
                 throws UnknownLabelStatusException
Constructor

Parameters:
status - Indicates the success or failure of a validation.
warns - Number of warnings encountered during validation.
errors - Number of errors encountered during validation.
Throws:
UnknownLabelStatusException
Method Detail

add

public void add(ValidationRecord record)
Record the results of a label validation.

Parameters:
record - A validationRecord object.

add

public void add(java.lang.String status,
                int warns,
                int errors)
         throws UnknownLabelStatusException
Record the results of a label validation.

Parameters:
status - Indicates the success or failure of a validation. Argument must be 'PASS', 'FAIL', or 'SKIP'.
warns - The number of warnings encountered during validation.
errors - The number of errors encountered during validation.
Throws:
UnknownLabelStatusException

hasWarnings

public boolean hasWarnings()
Determines if any warnings are present in the record.

Returns:
'true' if there were warnings, 'false' otherwise.

getTotalWarnings

public int getTotalWarnings()
Returns:
The total number of warnings encountered.

hasErrors

public boolean hasErrors()
Determines if any errors are present in the record.

Returns:
'true' if there were errors, 'false' otherwise.

getTotalErrors

public int getTotalErrors()
Returns:
The total number of errors encountered.

getFilesPassed

public int getFilesPassed()
Returns:
The total number of files that passed the PDS validation step.

getFilesSkipped

public int getFilesSkipped()
Returns:
The total number of files that skipped the PDS validation step.

getFilesFailed

public int getFilesFailed()
Returns:
The total number of files that failed the PDS validation step.


Copyright © 2005-2009 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.