W3C home > Mailing lists > Public > www-validator-cvs@w3.org > May 2010

2006/unicorn/src/org/w3c/unicorn UnicornCall.java,1.39,1.40

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 18 May 2010 10:00:08 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1OEJaq-0003Fd-4a@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv12476/src/org/w3c/unicorn

Modified Files:
	UnicornCall.java 
Log Message:
+ getStatus() 

Index: UnicornCall.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/UnicornCall.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- UnicornCall.java	21 Mar 2010 22:53:46 -0000	1.39
+++ UnicornCall.java	18 May 2010 10:00:06 -0000	1.40
@@ -469,6 +469,21 @@
 		}
 		return passed;
 	}
+	
+	public String getStatus() {
+		boolean undef = true;
+		for (String key : getObservationList().keySet()) {
+			switch (observationMap.get(key).getStatus()) {
+			case Response.FAILED:
+				return "failed";
+			case Response.PASSED:
+				undef = false;
+			}	
+		}
+		if (undef)
+			return "undef";
+		return "passed";
+	}
 
 	public String getLang() {
 		return sLang.split(",")[0];
Received on Tuesday, 18 May 2010 10:00:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:42 UTC