View Javadoc

1   // Copyright 2006-2008, by the California Institute of 
2   // Technology. ALL RIGHTS RESERVED. United States Government 
3   // Sponsorship acknowledged. Any commercial use must be negotiated with 
4   // the Office of Technology Transfer at the California Institute of 
5   // Technology.
6   //
7   // This software may be subject to U.S. export control laws. By 
8   // accepting this software, the user agrees to comply with all 
9   // applicable U.S. export laws and regulations. User has the 
10  // responsibility to obtain export licenses, or other export authority 
11  // as may be required before exporting such information to foreign 
12  // countries or providing access to foreign persons.
13  //
14  // $Id: CountListener.java 3461 2008-08-07 17:43:26Z pramirez $ 
15  //
16  
17  package gov.nasa.pds.tools.label.validate;
18  
19  /***
20   * @author pramirez
21   * @version $Revision: 3461 $
22   * 
23   */
24  public class CountListener implements ValidationListener {
25      private int numErrors = 0;
26      private int numWarnings = 0;
27  
28      /* (non-Javadoc)
29       * @see gov.nasa.pds.tools.label.validate.ValidationListener#reportError(java.lang.String)
30       */
31      public void reportError(String error) {
32          numErrors++;
33      }
34  
35      /* (non-Javadoc)
36       * @see gov.nasa.pds.tools.label.validate.ValidationListener#reportWarning(java.lang.String)
37       */
38      public void reportWarning(String warning) {
39          numWarnings++;
40      }
41      
42      public int getNumErrors() {return numErrors;}
43      public int getNumWarnings() {return numWarnings;}
44  
45  }