View Javadoc

1   // Copyright 2006-2007, by the California Institute of Technology.
2   // ALL RIGHTS RESERVED. United States Government Sponsorship acknowledged.
3   // Any commercial use must be negotiated with the Office of Technology Transfer
4   // at the California Institute of Technology.
5   //
6   // This software is subject to U. S. export control laws and regulations
7   // (22 C.F.R. 120-130 and 15 C.F.R. 730-774). To the extent that the software
8   // is subject to U.S. export control laws and regulations, the recipient has
9   // the responsibility to obtain export licenses or other export authority as
10  // may be required before exporting such information to foreign countries or
11  // providing access to foreign nationals.
12  //
13  // $Id$ 
14  //
15  
16  package gov.nasa.pds.tools.label.validate;
17  
18  import gov.nasa.pds.tools.label.Label;
19  
20  /***
21   * This interface is a means to define an extension point for the parser to perform further validation.
22   * This type of validation is outside the realm of the syntax defined by the grammar and data dictionary.
23   * An example of this would be required file characteristic elements.
24   * 
25   * @author pramirez
26   * @version $Revision$
27   * 
28   */
29  public interface LabelValidator {
30      /***
31       * Method signature for checking to see if a label is valid.
32       * @param label object returned from parsing that reprsents the PDS label
33       * @return flag indicating whether or not the step in validation was passed.
34       */
35      public boolean isValid(Label label);
36      
37      public boolean isValid(Label label, ValidationListener listener);
38  }