W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2009

2006/unicorn/src/org/w3c/unicorn/tests CommandLine.java,1.2,1.3 HiepTest.java,1.2,1.3 UnicornClient.java,1.2,1.3 UnicornClientDirectInputTest.java,1.2,1.3

From: Jean-Guilhem Rouel via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 01 Sep 2009 16:00:26 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MiVmU-0004Pf-W8@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/tests
In directory hutz:/tmp/cvs-serv16874/src/org/w3c/unicorn/tests

Modified Files:
	CommandLine.java HiepTest.java UnicornClient.java 
	UnicornClientDirectInputTest.java 
Log Message:
simplified outputs a bit

Index: CommandLine.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tests/CommandLine.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CommandLine.java	28 Aug 2009 12:39:58 -0000	1.2
+++ CommandLine.java	1 Sep 2009 16:00:24 -0000	1.3
@@ -11,7 +11,6 @@
 import org.apache.commons.logging.LogFactory;
 import org.w3c.unicorn.UnicornCall;
 import org.w3c.unicorn.contract.EnumInputMethod;
-import org.w3c.unicorn.output.EnumOutputModule;
 import org.w3c.unicorn.output.OutputFactory;
 import org.w3c.unicorn.output.OutputModule;
 
@@ -73,15 +72,9 @@
 			} else if ("-outputmethod".equals(args[i])) {
 				i++;
 				String sOutputMethod = args[i];
-				final EnumOutputModule aEnumOutputModule = EnumOutputModule
-						.fromValue(sOutputMethod);
-				if (null == aEnumOutputModule) {
-					CommandLine.logger.error("Unknow output method : "
-							+ sOutputMethod + ".");
-					return;
-				}
+
 				CommandLine.aOutputModule = OutputFactory
-						.getOutputModule(aEnumOutputModule);
+						.createOutputModule(sOutputMethod);
 			} else if (args[i].contains("=")) {
 				String[] tString = args[i].split("=");
 				String[] val = { tString[1] };
@@ -98,7 +91,7 @@
 			CommandLine.logger
 					.info("No output method specified use SimpleOutputModule by default.");
 			CommandLine.aOutputModule = OutputFactory
-					.getOutputModule(EnumOutputModule.SIMPLE);
+					.createOutputModule("simple");
 		}
 
 		if (EnumInputMethod.DIRECT.equals(CommandLine.aEnumInputMethod)) {

Index: UnicornClient.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tests/UnicornClient.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- UnicornClient.java	28 Aug 2009 12:39:58 -0000	1.2
+++ UnicornClient.java	1 Sep 2009 16:00:24 -0000	1.3
@@ -131,12 +131,12 @@
 				Map<String, Object> mapOfStringObject = new LinkedHashMap<String, Object>();
 				mapOfStringObject.put("unicorncall", aUnicornCall);
 				OutputFormater aOutputFormater = OutputFactory
-						.getOutputFormater(outputTemplate, // text or xhtml10,
+						.createOutputFormater(outputTemplate, // text or xhtml10,
 															// see
 															// unicorn.properties
 								language, "text/html"); // MIME Type
 				OutputModule aOutputModule = OutputFactory
-						.getOutputModule("simple");
+						.createOutputModule("simple");
 				PrintWriter pw = new PrintWriter(System.out);
 				aOutputModule.produceOutput(aOutputFormater, mapOfStringObject,
 						null, pw);

Index: UnicornClientDirectInputTest.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tests/UnicornClientDirectInputTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- UnicornClientDirectInputTest.java	28 Aug 2009 12:39:58 -0000	1.2
+++ UnicornClientDirectInputTest.java	1 Sep 2009 16:00:24 -0000	1.3
@@ -38,13 +38,13 @@
 
 			Map<String, Object> mapOfStringObject = new LinkedHashMap<String, Object>();
 			mapOfStringObject.put("unicorncall", aUnicornCall);
-			OutputFormater aOutputFormater = OutputFactory.getOutputFormater(
+			OutputFormater aOutputFormater = OutputFactory.createOutputFormater(
 					"text10", // le template --> text ou xhtml10, see
 								// unicorn.properties
 					"en", // la langue
 					"text/plain"); // MIME Type
 			OutputModule aOutputModule = OutputFactory
-					.getOutputModule("simple");
+					.createOutputModule("simple");
 			PrintWriter pw = new PrintWriter(System.out);
 			aOutputModule.produceOutput(aOutputFormater, mapOfStringObject,
 					null, pw);

Index: HiepTest.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/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 Aug 2009 12:39:58 -0000	1.2
+++ HiepTest.java	1 Sep 2009 16:00:24 -0000	1.3
@@ -26,13 +26,13 @@
 
 			Map<String, Object> mapOfStringObject = new LinkedHashMap<String, Object>();
 			mapOfStringObject.put("unicorncall", aUnicornCall);
-			OutputFormater aOutputFormater = OutputFactory.getOutputFormater(
+			OutputFormater aOutputFormater = OutputFactory.createOutputFormater(
 					"xhtml10", // le template --> text ou xhtml10, see
 								// unicorn.properties
 					"en", // la langue
 					"text/plain"); // MIME Type
 			OutputModule aOutputModule = OutputFactory
-					.getOutputModule("simple");
+					.createOutputModule("simple");
 			PrintWriter pw = new PrintWriter(System.out);
 			aOutputModule.produceOutput(aOutputFormater, mapOfStringObject,
 					null, pw);
Received on Tuesday, 1 September 2009 16:00:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:12 GMT