W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2010

2006/unicorn/src/org/w3c/unicorn Framework.java,1.33,1.34

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 05 Mar 2010 15:11:47 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NnZBr-0000TV-Bv@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv1811/src/org/w3c/unicorn

Modified Files:
	Framework.java 
Log Message:
added local metadataProperties object

Index: Framework.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Framework.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- Framework.java	5 Mar 2010 14:28:08 -0000	1.33
+++ Framework.java	5 Mar 2010 15:11:45 -0000	1.34
@@ -91,6 +91,7 @@
 	private static Hashtable<String, Properties> unicornPropertiesFiles;
 	private static Hashtable<String, VelocityContext> languageContexts;
 	private static Hashtable<String, Properties> languageProperties;
+	private static Hashtable<String, Properties> metadataProperties;
 	private static TreeMap<String, String> languages;
 	private static VelocityEngine velocityEngine;
 	private static String[] configFiles = {
@@ -104,6 +105,7 @@
 		unicornPropertiesFiles = new Hashtable<String, Properties>();
 		languageContexts = new Hashtable<String, VelocityContext>();
 		languageProperties = new Hashtable<String, Properties>();
+		metadataProperties = new Hashtable<String, Properties>();
 		languages = new TreeMap<String, String>();
 		mapOfObserver = new LinkedHashMap<String, Observer>();
 		responseImpl = new LinkedHashMap<String, Class<Response>>();
@@ -368,6 +370,7 @@
 			defaultProps = Language.load(defaultTaskFile);
 			logger.debug("> Found default tasks metadata file: " + defaultTaskFile.getPath());
 			LanguageAction.setDefaultMetadatas(defaultProps);
+			metadataProperties.put(Property.get("DEFAULT_LANGUAGE"), defaultProps);
 			for (String taskKey : mapOfTask.keySet()) {
 				Task task = mapOfTask.get(taskKey);
 				if (defaultProps.containsKey(taskKey)) 
@@ -431,6 +434,7 @@
 					props.remove(key);
 				
 				LanguageAction.addMetadatasProperties(lang, props);
+				metadataProperties.put(lang, props);
 				
 				for (String taskKey : mapOfTask.keySet()) {
 					Task task = mapOfTask.get(taskKey);
@@ -512,6 +516,7 @@
 					metaProps.put("lang", props.getProperty("lang"));
 					metaProps.put("language", props.getProperty("language"));
 					LanguageAction.getMetadataProperties().put(props.getProperty("lang"), metaProps);
+					metadataProperties.put(props.getProperty("lang"), metaProps);
 				}
 			} catch (IllegalArgumentException e) {
 				logger.warn(e.getMessage());
@@ -610,6 +615,9 @@
 	public static Hashtable<String, Properties> getLanguageProperties() {
 		return languageProperties;
 	}
+	public static Hashtable<String, Properties> getMetadataProperties() {
+		return metadataProperties;
+	}
 	public static Task getDefaultTask() {
 		return mapOfTask.getDefaultTask();
 	}
Received on Friday, 5 March 2010 15:11:48 GMT

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