2006/unicorn/org/w3c/unicorn/tests CommandLine.java,1.2,1.3 FirstServlet.java,1.9,1.10 HiepTest.java,1.2,1.3 UnicornClient.java,1.7,1.8 JAXBTest.java,1.1.1.1,1.2 ExpandTest.java,1.1.1.1,1.2 UnicornClientDirectInputTest.java,1.1,1.2

Update of /sources/public/2006/unicorn/org/w3c/unicorn/tests
In directory hutz:/tmp/cvs-serv14031/org/w3c/unicorn/tests

Modified Files:
	CommandLine.java FirstServlet.java HiepTest.java 
	UnicornClient.java JAXBTest.java ExpandTest.java 
	UnicornClientDirectInputTest.java 
Log Message:
Updating Javadoc for the project.

Index: JAXBTest.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/JAXBTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- JAXBTest.java	31 Aug 2006 09:09:28 -0000	1.1.1.1
+++ JAXBTest.java	17 Jun 2008 13:45:31 -0000	1.2
@@ -24,8 +24,6 @@
 		JAXBContext jc = JAXBContext.newInstance("org.w3c.unicorn.generated.observationresponse");
 		Unmarshaller u = jc.createUnmarshaller();
 		URL url = new URL("http://localhost:8001/css-validator/validator?uri=http%3A%2F%2Fforums.jeuxonline.info/clientscript/vbulletin_css/style-94bf45f8-00003.css&output=ucn");
-		//URL url = new URL("http://w3cstag8/~jean/xml/mess.xml");
-		//System.out.println(u.unmarshal(url.openStream()).getClass().getName());
 		Observationresponse obsres = (Observationresponse)u.unmarshal(url.openStream());
 		System.out.println(obsres.isPassed());
 	}

Index: FirstServlet.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/FirstServlet.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- FirstServlet.java	21 Feb 2008 14:30:53 -0000	1.9
+++ FirstServlet.java	17 Jun 2008 13:45:31 -0000	1.10
@@ -50,14 +50,13 @@
 
 	private static final Log logger = LogFactory.getLog("org.w3c.unicorn");
 
-	/**
-	 * 
-	 */
 	private static final long	serialVersionUID	= -1375355420965607571L;
 
 	private static final DiskFileItemFactory factory = new DiskFileItemFactory();	
 	
-	// Create a new file upload handler
+	/**
+	 * Creates a new file upload handler.
+	 */
 	private static final ServletFileUpload upload = new ServletFileUpload(FirstServlet.factory);
 
 	/* (non-Javadoc)
@@ -320,6 +319,14 @@
 		}
 	}
 
+	/**
+	 * Adds a parameter at the correct call.
+	 * @param sParamName Name of the parameter.
+	 * @param sParamValue Value of the parameter.
+	 * @param aUnicornCall 
+	 * @param mapOfSpecificParameter
+	 * @param mapOfOutputParameter
+	 */
 	private void addParameter (
 			final String sParamName,
 			final String sParamValue,
@@ -330,6 +337,14 @@
 		this.addParameter(sParamName, tStringValues, aUnicornCall, mapOfSpecificParameter, mapOfOutputParameter);
 	}
 	
+	/**
+	 * 
+	 * @param sParamName
+	 * @param tStringParamValue
+	 * @param aUnicornCall
+	 * @param mapOfSpecificParameter
+	 * @param mapOfOutputParameter
+	 */
 	private void addParameter (
 			String sParamName,
 			final String[] tStringParamValue,
@@ -472,10 +487,12 @@
 		}
 	}
 	
-	
-	/*
+	/**
 	 * This method returns the first language of the accept language list
 	 * which is equal to one of available index template language
+	 * 
+	 * @param aLocale
+	 * @return The selected language or the default language.
 	 */
 	private String chooseTemplateLang(String aLocale){
 		String[] tabLang = aLocale.split(";|,");
@@ -489,6 +506,13 @@
 		return LocalizedString.DEFAULT_LANGUAGE;
 	}
 	
+	
+	/**
+	 * Converts an Enumeration object to a string, the terms being
+	 * separated by a coma.
+	 * @param myEnum The enumeration to convert.
+	 * @return The converted string.
+	 */
 	private String convertEnumerationToString(Enumeration myEnum){
 		String ret = "";
 		while (myEnum.hasMoreElements()){

Index: HiepTest.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/HiepTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- HiepTest.java	28 Nov 2007 16:08:38 -0000	1.2
+++ HiepTest.java	17 Jun 2008 13:45:31 -0000	1.3
@@ -13,14 +13,6 @@
 public class HiepTest {
 
 	public static void main(String[] args) {
-
-		/*
-		// lang par defaut
-		Map<String, String[]> mapOfParameter = new LinkedHashMap<String, String[]>();
-		String[] tmp = {"en"};
-		mapOfParameter.put("ucn_lang", tmp); 
-		aUnicornCall.setMapOfStringParameter(mapOfParameter);
-		*/
 		
 		UnicornCall aUnicornCall = new UnicornCall();
 		aUnicornCall.setTask("conformance"); //task id

Index: CommandLine.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/CommandLine.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CommandLine.java	1 Sep 2006 14:30:17 -0000	1.2
+++ CommandLine.java	17 Jun 2008 13:45:31 -0000	1.3
@@ -34,6 +34,7 @@
 	private static OutputModule aOutputModule = null; 
 
 	/**
+	 * Launches the Unicorn Framework.
 	 * @param args
 	 * @throws Exception 
 	 */

Index: ExpandTest.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/ExpandTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ExpandTest.java	31 Aug 2006 09:09:28 -0000	1.1.1.1
+++ ExpandTest.java	17 Jun 2008 13:45:31 -0000	1.2
@@ -23,10 +23,19 @@
 	private String id;
 	private List<String> references;
 	
+	/**
+	 * Default constructor for ExpandTest.
+	 *
+	 */
 	public ExpandTest() {
 		references = new ArrayList<String>();
 	}
 	
+	/**
+	 * Removes the old references and updates the oldRefs list with the 
+	 * current references before adding the new references. 
+	 *
+	 */
 	public void expand() {
 		enCours = true;
 		List<String> oldRefs = new ArrayList<String>();
@@ -49,10 +58,12 @@
 		return id + "=" + references;
 	}
 	
+	/**
+	 * Tests the expand process.
+	 * @param args
+	 */
 	public static void main(String[] args) {	
 		ExpandTest test1 = new ExpandTest();
-		//test1.references.add("test2");
-		//test1.references.add("test5");
 		test1.id = "css";
 		testList.put("css", test1);
 		
@@ -63,27 +74,10 @@
 		
 		ExpandTest test3 = new ExpandTest();
 		test3.references.add("css");
-		//test3.references.add("test6");
 		test3.id = "foo";
 		testList.put("foo", test3);
-		/*
-		ExpandTest test4 = new ExpandTest();
-		test4.references.add("test1");	
-		test4.id = "test4";
-		testList.put("test4", test4);
-		
-		ExpandTest test5 = new ExpandTest();	
-		test5.id = "test5";
-		test5.references.add("test6");
-		testList.put("test5", test5);
-		
-		ExpandTest test6 = new ExpandTest();	
-		test6.id = "test6";
-		testList.put("test6", test6);*/
-		//test6.references.add("test4");
 		
 		for (ExpandTest test : testList.values()) {
-			//System.out.println(test.id);
 			test.expand();
 		}
 		

Index: UnicornClient.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/UnicornClient.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- UnicornClient.java	20 Feb 2008 17:03:48 -0000	1.7
+++ UnicornClient.java	17 Jun 2008 13:45:31 -0000	1.8
@@ -20,6 +20,10 @@
 
 public class UnicornClient {
 
+	/**
+	 * Prints help contents on the standard output.
+	 *
+	 */
 	public static void print_help() {
 		System.out.println("[Usage] UnicornClient task inputType=[mimetype=]pageToValid templateLanguage outputTemplate [otherParameters]");
 		System.out.println("");
@@ -34,42 +38,13 @@
 		System.out.println("[Example] UnicornClient css file=text/css=./style/base.css fr text10 profile=css2,usermedium=screen,warning=2,lang=en");
 	}
 	
+	/**
+	 * Tests Unicorn client.
+	 * @param args
+	 */
 	public static void main(String[] args) {
 		UnicornCall aUnicornCall = new UnicornCall();
 		
-		/*
-		String task = "css";
-		String pageToValid = "file=text/css=D:/stageW3C/unicorn/style/base_result.css";
-		String language = "en";
-		String outputTemplate = "text10";
-		String pParams="";
-		*/
-		
-		/*
-		String task = "css";
-		String pageToValid = "uri=http://w3.org";
-		String language = "en";
-		String outputTemplate = "xhtml20";
-		String pParams="";
-		*/
-		
-		/*
-		String task = "calculator";
-		String pageToValid = "uri=http://flyingman.sophia.w3.org/test";
-		String language = "fr";
-		String outputTemplate = "text10";
-		String pParams = "x2=on,ucn_lang=vn";
-		*/
-
-		/*
-		String task = "calculator";
-		String pageToValid = "file=text/plain=D:/stageW3C/tmp/test.txt";
-		String language = "en";
-		String outputTemplate = "text10";
-		String pParams = "x2=on,ucn_lang=fr";
-		*/
-		
-		
 		
 		// read parameters
 		String task = args[0];

Index: UnicornClientDirectInputTest.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/UnicornClientDirectInputTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- UnicornClientDirectInputTest.java	20 Dec 2007 08:56:47 -0000	1.1
+++ UnicornClientDirectInputTest.java	17 Jun 2008 13:45:31 -0000	1.2
@@ -20,13 +20,6 @@
 
 	public static void main(String[] args) {
 
-		/*
-		// lang par defaut
-		Map<String, String[]> mapOfParameter = new LinkedHashMap<String, String[]>();
-		String[] tmp = {"en"};
-		mapOfParameter.put("ucn_lang", tmp); 
-		aUnicornCall.setMapOfStringParameter(mapOfParameter);
-		*/
 		
 		UnicornCall aUnicornCall = new UnicornCall();
 		aUnicornCall.setTask("css"); //task id
@@ -42,11 +35,6 @@
 
 		aUnicornCall.setInputParameterValue("p#msie { /* msie-bug note for text/plain */ float: right; border: 1px solid black; background: white;}");
 		
-		//aUnicornCall.setInputParameterValue("2+3");
-
-		
-		//if (isAcceptDirectInput("calculator"))
-		
 		try {
 			
 			aUnicornCall.doTask();

Received on Tuesday, 17 June 2008 13:46:07 UTC