2006/unicorn/src/org/w3c/unicorn/output SimpleOutputModule.java,1.8,1.9

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

Modified Files:
	SimpleOutputModule.java 
Log Message:
refactored with new OutputModule class


Index: SimpleOutputModule.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/SimpleOutputModule.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- SimpleOutputModule.java	24 Sep 2009 15:30:49 -0000	1.8
+++ SimpleOutputModule.java	29 Sep 2009 16:07:57 -0000	1.9
@@ -7,38 +7,27 @@
 import java.io.Writer;
 import java.util.Map;
 
-import org.w3c.unicorn.output.OutputFactory;
-
 /**
  * This module allow to generate output in text format.
  * 
  * @author Damien LEROY
  */
 public class SimpleOutputModule extends OutputModule {
-
-	private  OutputFormater aOutputFormater;
 	
 	public SimpleOutputModule(Map<String, String> mapOfOutputParameters, Map<String, String> mapOfSpecificParameters) {
 		super(mapOfOutputParameters, mapOfSpecificParameters);
-		
-		aOutputFormater = OutputFactory.createOutputFormater(mapOfOutputParameters.get("format"),
-				mapOfOutputParameters.get("lang"), mapOfOutputParameters.get("mimetype"));
 	}
 	
 	public void produceOutput(Map<String, Object> mapOfStringObject, final Writer aWriter) {
-		aOutputFormater.produceOutput(mapOfStringObject, aWriter);
+		defaultOutputFormater.produceOutput(mapOfStringObject, aWriter);
 	}
 
 	public void produceError(Map<String, Object> mapOfStringObject, final Writer aWriter) {
-		if (outputParameters.get("mimetype").equals("text/html")) {
+		if (getMimeType().equals("text/html")) {
 			displayOnIndex(mapOfStringObject, aWriter);
 			return;
 		}
-		aOutputFormater.produceError(mapOfStringObject, aWriter);
-	}
-
-	public void produceFirstOutput(Map<String, Object> mapOfStringObject, Writer aWriter) {
-		return;
+		defaultOutputFormater.produceError(mapOfStringObject, aWriter);
 	}
 	
 }

Received on Tuesday, 29 September 2009 16:08:08 UTC