- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 24 Sep 2009 15:30:51 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/output In directory hutz:/tmp/cvs-serv28600/src/org/w3c/unicorn/output Modified Files: SimpleOutputModule.java Log Message: produceError displays on index if the mimeType is text/html. Index: SimpleOutputModule.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/SimpleOutputModule.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- SimpleOutputModule.java 23 Sep 2009 09:26:05 -0000 1.7 +++ SimpleOutputModule.java 24 Sep 2009 15:30:49 -0000 1.8 @@ -6,6 +6,7 @@ import java.io.Writer; import java.util.Map; + import org.w3c.unicorn.output.OutputFactory; /** @@ -13,14 +14,13 @@ * * @author Damien LEROY */ -public class SimpleOutputModule implements OutputModule { +public class SimpleOutputModule extends OutputModule { private OutputFormater aOutputFormater; - private Map<String, String> mapOfOutputParameters; - public SimpleOutputModule(Map<String, String> mapOfOutputParameters, Map<String, String> mapOfSpecificParameters) { - this.mapOfOutputParameters = mapOfOutputParameters; + super(mapOfOutputParameters, mapOfSpecificParameters); + aOutputFormater = OutputFactory.createOutputFormater(mapOfOutputParameters.get("format"), mapOfOutputParameters.get("lang"), mapOfOutputParameters.get("mimetype")); } @@ -30,17 +30,15 @@ } public void produceError(Map<String, Object> mapOfStringObject, final Writer aWriter) { + if (outputParameters.get("mimetype").equals("text/html")) { + displayOnIndex(mapOfStringObject, aWriter); + return; + } aOutputFormater.produceError(mapOfStringObject, aWriter); } public void produceFirstOutput(Map<String, Object> mapOfStringObject, Writer aWriter) { return; } - - public String getOutputParameter(String string) { - return mapOfOutputParameters.get(string); - } - - }
Received on Thursday, 24 September 2009 15:31:07 UTC