2006/unicorn/src/org/w3c/unicorn/output OutputFactory.java,1.1.2.2,1.1.2.3

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

Modified Files:
      Tag: dev2
	OutputFactory.java 
Log Message:
more actions in Framework
+ IndexAction
+ language negociation structure

Index: OutputFactory.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/Attic/OutputFactory.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- OutputFactory.java	12 Aug 2009 13:15:19 -0000	1.1.2.2
+++ OutputFactory.java	13 Aug 2009 13:42:42 -0000	1.1.2.3
@@ -6,14 +6,14 @@
 
 import java.util.LinkedHashMap;
 import java.util.Map;
-import java.util.Properties;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.velocity.exception.ParseErrorException;
 import org.apache.velocity.exception.ResourceNotFoundException;
+import org.w3c.unicorn.util.Property;
 
 /**
- * This class allow to manage all output module and output formater. It provide
+ * This class allow to manage all output module and output formatter. It provide
  * a way to share an instance of a output module or output formater between
  * different call of the framework UniCORN.
  * 
@@ -21,29 +21,12 @@
  */
 public class OutputFactory {
 
-	protected static final Log logger = LogFactory
-			.getLog("org.w3c.unicorn.output");
+	protected static final Log logger = LogFactory.getLog("org.w3c.unicorn.output");
 
 	private static final Map<EnumOutputModule, OutputModule> mapOfOutputModule = new LinkedHashMap<EnumOutputModule, OutputModule>();
 
 	private static final Map<String, OutputFormater> mapOfOutputFormater = new LinkedHashMap<String, OutputFormater>();
 
-	private static Properties aPropertiesSpecialFormaters;
-
-	/*public static void init() {
-		
-		OutputFactory.aPropertiesSpecialFormaters = Property.getProps("specialFormaters.properties");
-		
-		/*try {
-			OutputFactory.aPropertiesSpecialFormaters.load(Property
-					.getPropertyFileURL("specialFormaters.properties")
-					.openStream());
-		} catch (final IOException e) {
-			OutputFactory.logger.error("IOException : " + e.getMessage(), e);
-			e.printStackTrace();
-		}
-	}*/
-
 	/**
 	 * Create a new output module and add it to the map.
 	 * 
@@ -71,11 +54,11 @@
 	}
 
 	/**
-	 * Create a new output formater and add it to the map.
+	 * Create a new output formatter and add it to the map.
 	 * 
 	 * @param sOutputFormat
-	 *            The format who the output formater must produce.
-	 * @return The new output formater.
+	 *            The format who the output formatter must produce.
+	 * @return The new output formatter.
 	 * @throws ResourceNotFoundException
 	 * @throws ParseErrorException
 	 * @throws Exception
@@ -92,8 +75,8 @@
 			OutputFactory.logger.debug("Mime type : " + sMimeType + ".");
 		}
 
-		final String sFormaterName = OutputFactory.aPropertiesSpecialFormaters
-				.getProperty(sMimeType);
+		final String sFormaterName = Property.getProps("specialFormaters.properties")
+											 .getProperty(sMimeType);
 		if (null != sFormaterName) {
 			final Class<?> aFormaterClass = Class
 					.forName("org.w3c.unicorn.output." + sFormaterName);
@@ -137,7 +120,7 @@
 	}
 
 	/**
-	 * Retuern the output module asked.
+	 * Return the output module asked.
 	 * 
 	 * @param aEnumOutputModule
 	 * @return The output module asked.
@@ -160,11 +143,11 @@
 	}
 
 	/**
-	 * Return the output formater asked.
+	 * Return the output formatter asked.
 	 * 
 	 * @param sOutputFormat
-	 *            The output format who be puduce by the output formater.
-	 * @return The output formater asked.
+	 *            The output format who be produce by the output formatter.
+	 * @return The output formatter asked.
 	 * @throws ResourceNotFoundException
 	 * @throws ParseErrorException
 	 * @throws Exception
@@ -196,15 +179,4 @@
 		return aOutputFormater;
 	}
 
-	public static Properties getPropertiesSpecialFormaters() {
-		return aPropertiesSpecialFormaters;
-	}
-
-	public static void setPropertiesSpecialFormaters(
-			Properties aPropertiesSpecialFormaters) {
-		OutputFactory.aPropertiesSpecialFormaters = aPropertiesSpecialFormaters;
-	}
-
-	
-	
 }

Received on Thursday, 13 August 2009 13:42:57 UTC