2006/unicorn/src/org/w3c/unicorn/response Response.java,1.1.2.1,1.1.2.2

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response
In directory hutz:/tmp/cvs-serv29418/src/org/w3c/unicorn/response

Modified Files:
      Tag: dev2
	Response.java 
Log Message:
added getErrorCount(), getWarningCount(), and getInfosCount()

Index: Response.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/Attic/Response.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- Response.java	11 Aug 2009 16:05:26 -0000	1.1.2.1
+++ Response.java	25 Aug 2009 14:48:51 -0000	1.1.2.2
@@ -197,7 +197,7 @@
 	 * 
 	 * @return The list of errors corresponding to the results.
 	 */
-	List<Error> getErrorList() {
+	public List<Error> getErrorList() {
 		List<Error> xList = new ArrayList<Error>();
 		// iterate all language
 		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
@@ -213,7 +213,7 @@
 	 * 
 	 * @return The list of warnings corresponding to the results.
 	 */
-	List<Warning> getWarningList() {
+	public List<Warning> getWarningList() {
 		List<Warning> xList = new ArrayList<Warning>();
 		// iterate all language
 		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
@@ -225,6 +225,36 @@
 		return xList;
 	}
 
+	public int getWarningCount() {
+		int count = 0;
+		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
+			for (Result aResult : aMapOfURIResult.values()) {
+				count += aResult.warnings.size();
+			}
+		}
+		return count;
+	}
+	
+	public int getErrorCount() {
+		int count = 0;
+		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
+			for (Result aResult : aMapOfURIResult.values()) {
+				count += aResult.errors.size();
+			}
+		}
+		return count;
+	}
+	
+	public int getInfoCount() {
+		int count = 0;
+		for (Map<String, Result> aMapOfURIResult : mapOfLangURIResult.values()) {
+			for (Result aResult : aMapOfURIResult.values()) {
+				count += aResult.infos.size();
+			}
+		}
+		return count;
+	}
+	
 	/**
 	 * 
 	 * @return The list of infos corresponding to the results.

Received on Tuesday, 25 August 2009 14:49:02 UTC