2006/unicorn/src/org/w3c/unicorn/output SimpleOutputFormater.java,1.7,1.8

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

Modified Files:
	SimpleOutputFormater.java 
Log Message:
refactored with new OutputFormater class

Index: SimpleOutputFormater.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/SimpleOutputFormater.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- SimpleOutputFormater.java	24 Sep 2009 15:29:35 -0000	1.7
+++ SimpleOutputFormater.java	29 Sep 2009 16:07:08 -0000	1.8
@@ -18,48 +18,23 @@
  * 
  * @author Jean-Guilhem ROUEL
  */
-public class SimpleOutputFormater implements OutputFormater {
+public class SimpleOutputFormater extends OutputFormater {
 
 	protected VelocityContext aVelocityContext;
 	
-	private String format;
-	
-	private String lang;
-	
 	public SimpleOutputFormater() {
-		setLang(Property.get("DEFAULT_LANGUAGE"));
-		setFormat(Property.get("DEFAULT_FORMAT"));
+		this(Property.get("DEFAULT_FORMAT"), Property.get("DEFAULT_LANGUAGE"));
 	}
 
 	public SimpleOutputFormater(final String format, final String lang) {
-		logger.trace("Constructor");
-		logger.debug("Output format : " + format + ".");
-		logger.debug("Output language : " + lang + ".");
+		super(format, lang);
 		
-		setFormat(format);
-		setLang(lang);		
-	}
-
-	public String getLang() {
-		return lang;
-	}
-
-	public void setLang(String lang) {
-		this.lang = lang;
 		if (Framework.getLanguageContexts().get(lang) != null) {
 			aVelocityContext = new VelocityContext(Framework.getLanguageContexts().get(lang));
 		} else {
 			aVelocityContext = new VelocityContext(Framework.getLanguageContexts().get(Property.get("DEFAULT_LANGUAGE")));
 		}
 	}
-
-	public String getFormat() {
-		return format;
-	}
-
-	public void setFormat(String outputFormat) {
-		this.format = outputFormat;
-	}
 	
 	public void produceOutput(Map<String, Object> mapOfStringObject, Writer output) {
 		logger.trace("produceOutput");

Received on Tuesday, 29 September 2009 16:07:18 UTC