gov.nasa.pds.citool.validate
Class ReferenceFinderValidator

java.lang.Object
  extended by gov.nasa.pds.citool.validate.ReferenceFinderValidator
All Implemented Interfaces:
gov.nasa.pds.tools.label.validate.LabelValidator

public class ReferenceFinderValidator
extends java.lang.Object
implements gov.nasa.pds.tools.label.validate.LabelValidator

Class that finds references in a statement and makes sure that it is found in a REFERENCE_KEY_ID within the label. References in a non REFERENCE_KEY_ID statement are denoted within square brackets [].

Author:
mcayanan

Constructor Summary
ReferenceFinderValidator()
           
 
Method Summary
 boolean isValid(gov.nasa.pds.tools.label.Label catalog)
          Validates a label by checking references and matching that with REFERENCE_KEY_ID values found within the given label.
 boolean isValid(gov.nasa.pds.tools.label.Label catalog, gov.nasa.pds.tools.label.validate.ValidationListener listener)
          Validates a label by checking references and matching that with REFERENCE_KEY_ID values found within the given label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceFinderValidator

public ReferenceFinderValidator()
Method Detail

isValid

public boolean isValid(gov.nasa.pds.tools.label.Label catalog,
                       gov.nasa.pds.tools.label.validate.ValidationListener listener)
Validates a label by checking references and matching that with REFERENCE_KEY_ID values found within the given label.

Specified by:
isValid in interface gov.nasa.pds.tools.label.validate.LabelValidator
Parameters:
catalog - An object representation of a catalog file.
listener - A listener to record warnings or errors.
Returns:
A flag indicating wheter or not a reference catalog if valid.

isValid

public boolean isValid(gov.nasa.pds.tools.label.Label catalog)
Validates a label by checking references and matching that with REFERENCE_KEY_ID values found within the given label.

Specified by:
isValid in interface gov.nasa.pds.tools.label.validate.LabelValidator
Parameters:
catalog - An object representation of a catalog file.
Returns:
A flag indicating wheter or not a reference catalog if valid.


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