You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/09/27 11:10:04 UTC

svn commit: r819277 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/cache/UtilCache.java common/data/CommonTypeData.xml common/data/GeoData_CN.xml

Author: jleroux
Date: Sun Sep 27 09:10:03 2009
New Revision: 819277

URL: http://svn.apache.org/viewvc?rev=819277&view=rev
Log:
Fix wrong file in r819274 (Chinese Geo data)

Added:
    ofbiz/trunk/framework/common/data/GeoData_CN.xml
Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
    ofbiz/trunk/framework/common/data/CommonTypeData.xml

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java?rev=819277&r1=819276&r2=819277&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java Sun Sep 27 09:10:03 2009
@@ -19,7 +19,6 @@
 package org.ofbiz.base.util.cache;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -116,9 +115,7 @@
 
         setPropertiesParams(cacheName);
 
-        synchronized (utilCacheTable) {
-            utilCacheTable.put(name, this);
-        }
+        utilCacheTable.put(name, this);
     }
 
     public UtilCache(String cacheName, int maxSize, long expireTime, boolean useSoftReference) {
@@ -146,9 +143,8 @@
         String name = "specified" + this.getNextDefaultIndex("specified");
 
         setPropertiesParams(name);
-        synchronized (utilCacheTable) {
-            utilCacheTable.put(name, this);
-        }
+
+        utilCacheTable.put(name, this);
     }
 
     /** This constructor takes a name for the cache, puts itself in the utilCacheTable.
@@ -161,9 +157,8 @@
 
         setPropertiesParams("default");
         setPropertiesParams(cacheName);
-        synchronized (utilCacheTable) {
-            utilCacheTable.put(name, this);
-        }
+
+        utilCacheTable.put(name, this);
     }
 
     /** This constructor takes a name for the cache, puts itself in the utilCacheTable.
@@ -175,9 +170,8 @@
 
         setPropertiesParams("default");
         setPropertiesParams(cacheName);
-        synchronized (utilCacheTable) {
-            utilCacheTable.put(name, this);
-        }
+
+        utilCacheTable.put(name, this);
     }
 
     /** Default constructor, all members stay at default values as defined in cache.properties, or the defaults in this file if cache.properties is not found, or there are no 'default' entries in it. */
@@ -185,9 +179,7 @@
         setPropertiesParams("default");
 
         name = "default" + this.getNextDefaultIndex("default");
-        synchronized (utilCacheTable) {
-            utilCacheTable.put(name, this);
-        }
+        utilCacheTable.put(name, this);
     }
 
     protected String getNextDefaultIndex(String cacheName) {
@@ -406,24 +398,10 @@
 
     /** Removes all elements from this cache */
     public static void clearAllCaches() {
-        // We make a copy since clear may take time
-        List<UtilCache<?,?>> list = getUtilCacheTableValuesImage();
-        for (UtilCache<?,?> cache : list) {
-            cache.clear();
-        }
-        list.clear();
-    }
-
-    /**
-     * Return an image of the values at a time
-     * @return {@link List}
-     */
-    private static List getUtilCacheTableValuesImage() {
-        List list = new ArrayList(utilCacheTable.size());
-        synchronized (utilCacheTable) {
-            list.addAll(utilCacheTable.values());
+        for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
+            UtilCache<?, ?> utilCache = entry.getValue();
+            utilCache.clear();
         }
-        return list;
     }
 
     /** Getter for the name of the UtilCache instance.
@@ -654,12 +632,10 @@
 
     /** Clears all expired cache entries from all caches */
     public static void clearExpiredFromAllCaches() {
-        // We make a copy since clear may take time
-        List<UtilCache<?,?>> list = getUtilCacheTableValuesImage();
-        for (UtilCache<?,?> utilCache : list) {
+        for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
+            UtilCache<?, ?> utilCache = entry.getValue();
             utilCache.clearExpired();
         }
-        list.clear();
     }
 
     /** Checks for a non-expired key in a specific cache */
@@ -674,20 +650,13 @@
 
     public static void clearCachesThatStartWith(String startsWith) {
         synchronized (utilCacheTable) {
-            List<UtilCache<?, ?>> cachesToClear = FastList.newInstance();
-            synchronized (utilCacheTable) {
-                for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
-                    String name = entry.getKey();
-                    if (name.startsWith(startsWith)) {
-                        UtilCache<?, ?> cache = entry.getValue();
-                        cachesToClear.add(cache);
-                    }
+            for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
+                String name = entry.getKey();
+                if (name.startsWith(startsWith)) {
+                    UtilCache<?, ?> cache = entry.getValue();
+                    cache.clear();
                 }
             }
-            for (UtilCache<?,?> cache : cachesToClear) {
-                cache.clear();
-            }
-            cachesToClear.clear();
         }
     }
 
@@ -699,6 +668,8 @@
 
     @SuppressWarnings("unchecked")
     public static <K, V> UtilCache<K, V> findCache(String cacheName) {
-        return (UtilCache<K, V>) UtilCache.utilCacheTable.get(cacheName);
+        synchronized (UtilCache.utilCacheTable) {
+            return (UtilCache<K, V>) UtilCache.utilCacheTable.get(cacheName);
+        }
     }
 }

Modified: ofbiz/trunk/framework/common/data/CommonTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/CommonTypeData.xml?rev=819277&r1=819276&r2=819277&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/data/CommonTypeData.xml (original)
+++ ofbiz/trunk/framework/common/data/CommonTypeData.xml Sun Sep 27 09:10:03 2009
@@ -71,7 +71,6 @@
     <GeoType description="Country" geoTypeId="COUNTRY" hasTable="N" parentTypeId=""/>
     <GeoType description="County" geoTypeId="COUNTY" hasTable="N" parentTypeId=""/>
     <GeoType description="County-City" geoTypeId="COUNTY_CITY" hasTable="N" parentTypeId=""/>
-    <GeoType description="Municipality" geoTypeId="MUNICIPALITY" hasTable="N" parentTypeId=""/>
     <GeoType description="Province" geoTypeId="PROVINCE" hasTable="N" parentTypeId=""/>
     <GeoType description="Region" geoTypeId="REGION" hasTable="N" parentTypeId=""/>
     <GeoType description="Territory" geoTypeId="TERRITORY" hasTable="N" parentTypeId=""/>

Added: ofbiz/trunk/framework/common/data/GeoData_CN.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/GeoData_CN.xml?rev=819277&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/data/GeoData_CN.xml (added)
+++ ofbiz/trunk/framework/common/data/GeoData_CN.xml Sun Sep 27 09:10:03 2009
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<entity-engine-xml>
+    <!--
+        Based on: http://en.wikipedia.org/wiki/People%27s_Republic_of_China#Administrative_divisions
+        See also: http://en.wikipedia.org/wiki/Province_of_China
+                  http://en.wikipedia.org/wiki/ISO_3166-2:CN
+    -->
+	<Geo abbreviation="京" geoCode="11" geoId="CN-11" geoName="北京" geoTypeId="MUNICIPALITY"/>	
+	<Geo abbreviation="渝" geoCode="50" geoId="CN-50" geoName="重庆" geoTypeId="MUNICIPALITY"/>
+	<Geo abbreviation="沪" geoCode="31" geoId="CN-31" geoName="上海" geoTypeId="MUNICIPALITY"/>
+	<Geo abbreviation="津" geoCode="12" geoId="CN-12" geoName="天津" geoTypeId="MUNICIPALITY"/>
+    <Geo abbreviation="黑" geoCode="23" geoId="CN-23" geoName="黑龙江" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="吉" geoCode="22" geoId="CN-22" geoName="吉林" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="辽" geoCode="21" geoId="CN-21" geoName="辽宁" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="青" geoCode="63" geoId="CN-63" geoName="青海" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="甘" geoCode="62" geoId="CN-62" geoName="甘肃" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="陕" geoCode="61" geoId="CN-61" geoName="陕西" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="晋" geoCode="14" geoId="CN-14" geoName="山西" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="冀" geoCode="13" geoId="CN-13" geoName="河北" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="川" geoCode="51" geoId="CN-51" geoName="四川" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="鄂" geoCode="42" geoId="CN-42" geoName="湖北" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="豫" geoCode="41" geoId="CN-41" geoName="河南" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="鲁" geoCode="37" geoId="CN-37" geoName="山东" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="皖" geoCode="34" geoId="CN-34" geoName="安徽" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="苏" geoCode="32" geoId="CN-32" geoName="江苏" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="滇" geoCode="53" geoId="CN-53" geoName="云南" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="黔" geoCode="52" geoId="CN-52" geoName="贵州" geoTypeId="PROVINCE"/>
+    <Geo abbreviation="湘" geoCode="43" geoId="CN-43" geoName="湖南" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="赣" geoCode="36" geoId="CN-36" geoName="江西" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="浙" geoCode="33" geoId="CN-33" geoName="浙江" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="琼" geoCode="46" geoId="CN-46" geoName="海南" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="粤" geoCode="44" geoId="CN-44" geoName="广东" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="闽" geoCode="35" geoId="CN-35" geoName="福建" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="台" geoCode="71" geoId="CN-71" geoName="台湾" geoTypeId="PROVINCE"/>
+	<Geo abbreviation="桂" geoCode="45" geoId="CN-45" geoName="广西" geoTypeId="REGION"/>
+	<Geo abbreviation="内蒙古" geoCode="15" geoId="CN-15" geoName="内蒙古" geoTypeId="REGION"/>	
+	<Geo abbreviation="宁" geoCode="64" geoId="CN-64" geoName="宁夏" geoTypeId="REGION"/>
+	<Geo abbreviation="新" geoCode="65" geoId="CN-65" geoName="新疆" geoTypeId="REGION"/>
+	<Geo abbreviation="藏" geoCode="54" geoId="CN-54" geoName="西藏" geoTypeId="REGION"/>
+    <Geo abbreviation="香港" geoCode="91" geoId="CN-91" geoName="香港" geoTypeId="REGION"/>
+	<Geo abbreviation="澳门" geoCode="92" geoId="CN-92" geoName="澳门" geoTypeId="REGION"/>
+
+    <GeoAssoc geoId="CHN" geoIdTo="CN-11" geoAssocTypeId="REGIONS"/>	
+    <GeoAssoc geoId="CHN" geoIdTo="CN-50" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-31" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-12" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-23" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-22" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-21" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-63" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-62" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-61" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-14" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-13" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-51" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-42" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-41" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-37" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-34" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-32" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-53" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-52" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-43" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-36" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-33" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-46" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-44" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-35" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-71" geoAssocTypeId="REGIONS"/>
+	<GeoAssoc geoId="CHN" geoIdTo="CN-64" geoAssocTypeId="REGIONS"/>
+	<GeoAssoc geoId="CHN" geoIdTo="CN-65" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-54" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-91" geoAssocTypeId="REGIONS"/>
+    <GeoAssoc geoId="CHN" geoIdTo="CN-92" geoAssocTypeId="REGIONS"/>
+</entity-engine-xml>
\ No newline at end of file



Re: svn commit: r819277 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/cache/UtilCache.java common/data/CommonTypeData.xml common/data/GeoData_CN.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Deepak,

No there were no reasons, I forgotten this file indeed, fixed at r820206

Jacques

From: "Deepak Dixit" <de...@hotwaxmedia.com>
> Hi Jacques,
>
> I was looking at the data file and found that GeoData_CN.xml file is not
> getting loaded at the time of ant run-install. The reason behind this is
> there is no entry for this file in ofbiz-component.xml.
> Is this intended ?
>
> --
> Thanks and Regards
> Deepak Dixit
>
>
> jleroux@apache.org wrote:
>> Author: jleroux
>> Date: Sun Sep 27 09:10:03 2009
>> New Revision: 819277
>>
>> URL: http://svn.apache.org/viewvc?rev=819277&view=rev
>> Log:
>> Fix wrong file in r819274 (Chinese Geo data)
>>
>> Added:
>>     ofbiz/trunk/framework/common/data/GeoData_CN.xml
>> Modified:
>>     ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
>>     ofbiz/trunk/framework/common/data/CommonTypeData.xml
>>
>> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java?rev=819277&r1=819276&r2=819277&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java (original)
>> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java Sun Sep 27 09:10:03 2009
>> @@ -19,7 +19,6 @@
>>  package org.ofbiz.base.util.cache;
>>
>>  import java.io.Serializable;
>> -import java.util.ArrayList;
>>  import java.util.Collection;
>>  import java.util.List;
>>  import java.util.Map;
>> @@ -116,9 +115,7 @@
>>
>>          setPropertiesParams(cacheName);
>>
>> -        synchronized (utilCacheTable) {
>> -            utilCacheTable.put(name, this);
>> -        }
>> +        utilCacheTable.put(name, this);
>>      }
>>
>>      public UtilCache(String cacheName, int maxSize, long expireTime, boolean useSoftReference) {
>> @@ -146,9 +143,8 @@
>>          String name = "specified" + this.getNextDefaultIndex("specified");
>>
>>          setPropertiesParams(name);
>> -        synchronized (utilCacheTable) {
>> -            utilCacheTable.put(name, this);
>> -        }
>> +
>> +        utilCacheTable.put(name, this);
>>      }
>>
>>      /** This constructor takes a name for the cache, puts itself in the utilCacheTable.
>> @@ -161,9 +157,8 @@
>>
>>          setPropertiesParams("default");
>>          setPropertiesParams(cacheName);
>> -        synchronized (utilCacheTable) {
>> -            utilCacheTable.put(name, this);
>> -        }
>> +
>> +        utilCacheTable.put(name, this);
>>      }
>>
>>      /** This constructor takes a name for the cache, puts itself in the utilCacheTable.
>> @@ -175,9 +170,8 @@
>>
>>          setPropertiesParams("default");
>>          setPropertiesParams(cacheName);
>> -        synchronized (utilCacheTable) {
>> -            utilCacheTable.put(name, this);
>> -        }
>> +
>> +        utilCacheTable.put(name, this);
>>      }
>>
>>      /** Default constructor, all members stay at default values as defined in cache.properties, or the defaults in this file if 
>> cache.properties is not found, or there are no 'default' entries in it. */
>> @@ -185,9 +179,7 @@
>>          setPropertiesParams("default");
>>
>>          name = "default" + this.getNextDefaultIndex("default");
>> -        synchronized (utilCacheTable) {
>> -            utilCacheTable.put(name, this);
>> -        }
>> +        utilCacheTable.put(name, this);
>>      }
>>
>>      protected String getNextDefaultIndex(String cacheName) {
>> @@ -406,24 +398,10 @@
>>
>>      /** Removes all elements from this cache */
>>      public static void clearAllCaches() {
>> -        // We make a copy since clear may take time
>> -        List<UtilCache<?,?>> list = getUtilCacheTableValuesImage();
>> -        for (UtilCache<?,?> cache : list) {
>> -            cache.clear();
>> -        }
>> -        list.clear();
>> -    }
>> -
>> -    /**
>> -     * Return an image of the values at a time
>> -     * @return {@link List}
>> -     */
>> -    private static List getUtilCacheTableValuesImage() {
>> -        List list = new ArrayList(utilCacheTable.size());
>> -        synchronized (utilCacheTable) {
>> -            list.addAll(utilCacheTable.values());
>> +        for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
>> +            UtilCache<?, ?> utilCache = entry.getValue();
>> +            utilCache.clear();
>>          }
>> -        return list;
>>      }
>>
>>      /** Getter for the name of the UtilCache instance.
>> @@ -654,12 +632,10 @@
>>
>>      /** Clears all expired cache entries from all caches */
>>      public static void clearExpiredFromAllCaches() {
>> -        // We make a copy since clear may take time
>> -        List<UtilCache<?,?>> list = getUtilCacheTableValuesImage();
>> -        for (UtilCache<?,?> utilCache : list) {
>> +        for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
>> +            UtilCache<?, ?> utilCache = entry.getValue();
>>              utilCache.clearExpired();
>>          }
>> -        list.clear();
>>      }
>>
>>      /** Checks for a non-expired key in a specific cache */
>> @@ -674,20 +650,13 @@
>>
>>      public static void clearCachesThatStartWith(String startsWith) {
>>          synchronized (utilCacheTable) {
>> -            List<UtilCache<?, ?>> cachesToClear = FastList.newInstance();
>> -            synchronized (utilCacheTable) {
>> -                for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
>> -                    String name = entry.getKey();
>> -                    if (name.startsWith(startsWith)) {
>> -                        UtilCache<?, ?> cache = entry.getValue();
>> -                        cachesToClear.add(cache);
>> -                    }
>> +            for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
>> +                String name = entry.getKey();
>> +                if (name.startsWith(startsWith)) {
>> +                    UtilCache<?, ?> cache = entry.getValue();
>> +                    cache.clear();
>>                  }
>>              }
>> -            for (UtilCache<?,?> cache : cachesToClear) {
>> -                cache.clear();
>> -            }
>> -            cachesToClear.clear();
>>          }
>>      }
>>
>> @@ -699,6 +668,8 @@
>>
>>      @SuppressWarnings("unchecked")
>>      public static <K, V> UtilCache<K, V> findCache(String cacheName) {
>> -        return (UtilCache<K, V>) UtilCache.utilCacheTable.get(cacheName);
>> +        synchronized (UtilCache.utilCacheTable) {
>> +            return (UtilCache<K, V>) UtilCache.utilCacheTable.get(cacheName);
>> +        }
>>      }
>>  }
>>
>> Modified: ofbiz/trunk/framework/common/data/CommonTypeData.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/CommonTypeData.xml?rev=819277&r1=819276&r2=819277&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/common/data/CommonTypeData.xml (original)
>> +++ ofbiz/trunk/framework/common/data/CommonTypeData.xml Sun Sep 27 09:10:03 2009
>> @@ -71,7 +71,6 @@
>>      <GeoType description="Country" geoTypeId="COUNTRY" hasTable="N" parentTypeId=""/>
>>      <GeoType description="County" geoTypeId="COUNTY" hasTable="N" parentTypeId=""/>
>>      <GeoType description="County-City" geoTypeId="COUNTY_CITY" hasTable="N" parentTypeId=""/>
>> -    <GeoType description="Municipality" geoTypeId="MUNICIPALITY" hasTable="N" parentTypeId=""/>
>>      <GeoType description="Province" geoTypeId="PROVINCE" hasTable="N" parentTypeId=""/>
>>      <GeoType description="Region" geoTypeId="REGION" hasTable="N" parentTypeId=""/>
>>      <GeoType description="Territory" geoTypeId="TERRITORY" hasTable="N" parentTypeId=""/>
>>
>> Added: ofbiz/trunk/framework/common/data/GeoData_CN.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/GeoData_CN.xml?rev=819277&view=auto
>> ==============================================================================
>> --- ofbiz/trunk/framework/common/data/GeoData_CN.xml (added)
>> +++ ofbiz/trunk/framework/common/data/GeoData_CN.xml Sun Sep 27 09:10:03 2009
>> @@ -0,0 +1,94 @@
>> +<?xml version="1.0" encoding="UTF-8"?>
>> +<!--
>> +Licensed to the Apache Software Foundation (ASF) under one
>> +or more contributor license agreements.  See the NOTICE file
>> +distributed with this work for additional information
>> +regarding copyright ownership.  The ASF licenses this file
>> +to you under the Apache License, Version 2.0 (the
>> +"License"); you may not use this file except in compliance
>> +with the License.  You may obtain a copy of the License at
>> +
>> +http://www.apache.org/licenses/LICENSE-2.0
>> +
>> +Unless required by applicable law or agreed to in writing,
>> +software distributed under the License is distributed on an
>> +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>> +KIND, either express or implied.  See the License for the
>> +specific language governing permissions and limitations
>> +under the License.
>> +-->
>> +
>> +<entity-engine-xml>
>> +    <!--
>> +        Based on: http://en.wikipedia.org/wiki/People%27s_Republic_of_China#Administrative_divisions
>> +        See also: http://en.wikipedia.org/wiki/Province_of_China
>> +                  http://en.wikipedia.org/wiki/ISO_3166-2:CN
>> +    -->
>> + <Geo abbreviation="京" geoCode="11" geoId="CN-11" geoName="北京" geoTypeId="MUNICIPALITY"/>
>> + <Geo abbreviation="渝" geoCode="50" geoId="CN-50" geoName="重庆" geoTypeId="MUNICIPALITY"/>
>> + <Geo abbreviation="沪" geoCode="31" geoId="CN-31" geoName="上海" geoTypeId="MUNICIPALITY"/>
>> + <Geo abbreviation="津" geoCode="12" geoId="CN-12" geoName="天津" geoTypeId="MUNICIPALITY"/>
>> +    <Geo abbreviation="黑" geoCode="23" geoId="CN-23" geoName="黑龙江" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="吉" geoCode="22" geoId="CN-22" geoName="吉林" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="辽" geoCode="21" geoId="CN-21" geoName="辽宁" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="青" geoCode="63" geoId="CN-63" geoName="青海" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="甘" geoCode="62" geoId="CN-62" geoName="甘肃" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="陕" geoCode="61" geoId="CN-61" geoName="陕西" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="晋" geoCode="14" geoId="CN-14" geoName="山西" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="冀" geoCode="13" geoId="CN-13" geoName="河北" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="川" geoCode="51" geoId="CN-51" geoName="四川" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="鄂" geoCode="42" geoId="CN-42" geoName="湖北" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="豫" geoCode="41" geoId="CN-41" geoName="河南" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="鲁" geoCode="37" geoId="CN-37" geoName="山东" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="皖" geoCode="34" geoId="CN-34" geoName="安徽" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="苏" geoCode="32" geoId="CN-32" geoName="江苏" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="滇" geoCode="53" geoId="CN-53" geoName="云南" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="黔" geoCode="52" geoId="CN-52" geoName="贵州" geoTypeId="PROVINCE"/>
>> +    <Geo abbreviation="湘" geoCode="43" geoId="CN-43" geoName="湖南" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="赣" geoCode="36" geoId="CN-36" geoName="江西" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="浙" geoCode="33" geoId="CN-33" geoName="浙江" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="琼" geoCode="46" geoId="CN-46" geoName="海南" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="粤" geoCode="44" geoId="CN-44" geoName="广东" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="闽" geoCode="35" geoId="CN-35" geoName="福建" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="台" geoCode="71" geoId="CN-71" geoName="台湾" geoTypeId="PROVINCE"/>
>> + <Geo abbreviation="桂" geoCode="45" geoId="CN-45" geoName="广西" geoTypeId="REGION"/>
>> + <Geo abbreviation="内蒙古" geoCode="15" geoId="CN-15" geoName="内蒙古" geoTypeId="REGION"/>
>> + <Geo abbreviation="宁" geoCode="64" geoId="CN-64" geoName="宁夏" geoTypeId="REGION"/>
>> + <Geo abbreviation="新" geoCode="65" geoId="CN-65" geoName="新疆" geoTypeId="REGION"/>
>> + <Geo abbreviation="藏" geoCode="54" geoId="CN-54" geoName="西藏" geoTypeId="REGION"/>
>> +    <Geo abbreviation="香港" geoCode="91" geoId="CN-91" geoName="香港" geoTypeId="REGION"/>
>> + <Geo abbreviation="澳门" geoCode="92" geoId="CN-92" geoName="澳门" geoTypeId="REGION"/>
>> +
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-11" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-50" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-31" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-12" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-23" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-22" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-21" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-63" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-62" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-61" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-14" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-13" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-51" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-42" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-41" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-37" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-34" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-32" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-53" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-52" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-43" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-36" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-33" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-46" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-44" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-35" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-71" geoAssocTypeId="REGIONS"/>
>> + <GeoAssoc geoId="CHN" geoIdTo="CN-64" geoAssocTypeId="REGIONS"/>
>> + <GeoAssoc geoId="CHN" geoIdTo="CN-65" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-54" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-91" geoAssocTypeId="REGIONS"/>
>> +    <GeoAssoc geoId="CHN" geoIdTo="CN-92" geoAssocTypeId="REGIONS"/>
>> +</entity-engine-xml>
>> \ No newline at end of file
>>
>>
>>
>
> 



Re: svn commit: r819277 - in /ofbiz/trunk/framework: base/src/org/ofbiz/base/util/cache/UtilCache.java common/data/CommonTypeData.xml common/data/GeoData_CN.xml

Posted by Deepak Dixit <de...@hotwaxmedia.com>.
Hi Jacques,

I was looking at the data file and found that GeoData_CN.xml file is not 
getting loaded at the time of ant run-install. The reason behind this is 
there is no entry for this file in ofbiz-component.xml.
Is this intended ?

--
Thanks and Regards
Deepak Dixit


jleroux@apache.org wrote:
> Author: jleroux
> Date: Sun Sep 27 09:10:03 2009
> New Revision: 819277
>
> URL: http://svn.apache.org/viewvc?rev=819277&view=rev
> Log:
> Fix wrong file in r819274 (Chinese Geo data)
>
> Added:
>     ofbiz/trunk/framework/common/data/GeoData_CN.xml
> Modified:
>     ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
>     ofbiz/trunk/framework/common/data/CommonTypeData.xml
>
> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java?rev=819277&r1=819276&r2=819277&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java (original)
> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java Sun Sep 27 09:10:03 2009
> @@ -19,7 +19,6 @@
>  package org.ofbiz.base.util.cache;
>  
>  import java.io.Serializable;
> -import java.util.ArrayList;
>  import java.util.Collection;
>  import java.util.List;
>  import java.util.Map;
> @@ -116,9 +115,7 @@
>  
>          setPropertiesParams(cacheName);
>  
> -        synchronized (utilCacheTable) {
> -            utilCacheTable.put(name, this);
> -        }
> +        utilCacheTable.put(name, this);
>      }
>  
>      public UtilCache(String cacheName, int maxSize, long expireTime, boolean useSoftReference) {
> @@ -146,9 +143,8 @@
>          String name = "specified" + this.getNextDefaultIndex("specified");
>  
>          setPropertiesParams(name);
> -        synchronized (utilCacheTable) {
> -            utilCacheTable.put(name, this);
> -        }
> +
> +        utilCacheTable.put(name, this);
>      }
>  
>      /** This constructor takes a name for the cache, puts itself in the utilCacheTable.
> @@ -161,9 +157,8 @@
>  
>          setPropertiesParams("default");
>          setPropertiesParams(cacheName);
> -        synchronized (utilCacheTable) {
> -            utilCacheTable.put(name, this);
> -        }
> +
> +        utilCacheTable.put(name, this);
>      }
>  
>      /** This constructor takes a name for the cache, puts itself in the utilCacheTable.
> @@ -175,9 +170,8 @@
>  
>          setPropertiesParams("default");
>          setPropertiesParams(cacheName);
> -        synchronized (utilCacheTable) {
> -            utilCacheTable.put(name, this);
> -        }
> +
> +        utilCacheTable.put(name, this);
>      }
>  
>      /** Default constructor, all members stay at default values as defined in cache.properties, or the defaults in this file if cache.properties is not found, or there are no 'default' entries in it. */
> @@ -185,9 +179,7 @@
>          setPropertiesParams("default");
>  
>          name = "default" + this.getNextDefaultIndex("default");
> -        synchronized (utilCacheTable) {
> -            utilCacheTable.put(name, this);
> -        }
> +        utilCacheTable.put(name, this);
>      }
>  
>      protected String getNextDefaultIndex(String cacheName) {
> @@ -406,24 +398,10 @@
>  
>      /** Removes all elements from this cache */
>      public static void clearAllCaches() {
> -        // We make a copy since clear may take time
> -        List<UtilCache<?,?>> list = getUtilCacheTableValuesImage();
> -        for (UtilCache<?,?> cache : list) {
> -            cache.clear();
> -        }
> -        list.clear();
> -    }
> -
> -    /**
> -     * Return an image of the values at a time
> -     * @return {@link List}
> -     */
> -    private static List getUtilCacheTableValuesImage() {
> -        List list = new ArrayList(utilCacheTable.size());
> -        synchronized (utilCacheTable) {
> -            list.addAll(utilCacheTable.values());
> +        for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
> +            UtilCache<?, ?> utilCache = entry.getValue();
> +            utilCache.clear();
>          }
> -        return list;
>      }
>  
>      /** Getter for the name of the UtilCache instance.
> @@ -654,12 +632,10 @@
>  
>      /** Clears all expired cache entries from all caches */
>      public static void clearExpiredFromAllCaches() {
> -        // We make a copy since clear may take time
> -        List<UtilCache<?,?>> list = getUtilCacheTableValuesImage();
> -        for (UtilCache<?,?> utilCache : list) {
> +        for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
> +            UtilCache<?, ?> utilCache = entry.getValue();
>              utilCache.clearExpired();
>          }
> -        list.clear();
>      }
>  
>      /** Checks for a non-expired key in a specific cache */
> @@ -674,20 +650,13 @@
>  
>      public static void clearCachesThatStartWith(String startsWith) {
>          synchronized (utilCacheTable) {
> -            List<UtilCache<?, ?>> cachesToClear = FastList.newInstance();
> -            synchronized (utilCacheTable) {
> -                for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
> -                    String name = entry.getKey();
> -                    if (name.startsWith(startsWith)) {
> -                        UtilCache<?, ?> cache = entry.getValue();
> -                        cachesToClear.add(cache);
> -                    }
> +            for (Map.Entry<String, UtilCache<?, ?>> entry: utilCacheTable.entrySet()) {
> +                String name = entry.getKey();
> +                if (name.startsWith(startsWith)) {
> +                    UtilCache<?, ?> cache = entry.getValue();
> +                    cache.clear();
>                  }
>              }
> -            for (UtilCache<?,?> cache : cachesToClear) {
> -                cache.clear();
> -            }
> -            cachesToClear.clear();
>          }
>      }
>  
> @@ -699,6 +668,8 @@
>  
>      @SuppressWarnings("unchecked")
>      public static <K, V> UtilCache<K, V> findCache(String cacheName) {
> -        return (UtilCache<K, V>) UtilCache.utilCacheTable.get(cacheName);
> +        synchronized (UtilCache.utilCacheTable) {
> +            return (UtilCache<K, V>) UtilCache.utilCacheTable.get(cacheName);
> +        }
>      }
>  }
>
> Modified: ofbiz/trunk/framework/common/data/CommonTypeData.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/CommonTypeData.xml?rev=819277&r1=819276&r2=819277&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/common/data/CommonTypeData.xml (original)
> +++ ofbiz/trunk/framework/common/data/CommonTypeData.xml Sun Sep 27 09:10:03 2009
> @@ -71,7 +71,6 @@
>      <GeoType description="Country" geoTypeId="COUNTRY" hasTable="N" parentTypeId=""/>
>      <GeoType description="County" geoTypeId="COUNTY" hasTable="N" parentTypeId=""/>
>      <GeoType description="County-City" geoTypeId="COUNTY_CITY" hasTable="N" parentTypeId=""/>
> -    <GeoType description="Municipality" geoTypeId="MUNICIPALITY" hasTable="N" parentTypeId=""/>
>      <GeoType description="Province" geoTypeId="PROVINCE" hasTable="N" parentTypeId=""/>
>      <GeoType description="Region" geoTypeId="REGION" hasTable="N" parentTypeId=""/>
>      <GeoType description="Territory" geoTypeId="TERRITORY" hasTable="N" parentTypeId=""/>
>
> Added: ofbiz/trunk/framework/common/data/GeoData_CN.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/GeoData_CN.xml?rev=819277&view=auto
> ==============================================================================
> --- ofbiz/trunk/framework/common/data/GeoData_CN.xml (added)
> +++ ofbiz/trunk/framework/common/data/GeoData_CN.xml Sun Sep 27 09:10:03 2009
> @@ -0,0 +1,94 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!--
> +Licensed to the Apache Software Foundation (ASF) under one
> +or more contributor license agreements.  See the NOTICE file
> +distributed with this work for additional information
> +regarding copyright ownership.  The ASF licenses this file
> +to you under the Apache License, Version 2.0 (the
> +"License"); you may not use this file except in compliance
> +with the License.  You may obtain a copy of the License at
> +
> +http://www.apache.org/licenses/LICENSE-2.0
> +
> +Unless required by applicable law or agreed to in writing,
> +software distributed under the License is distributed on an
> +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> +KIND, either express or implied.  See the License for the
> +specific language governing permissions and limitations
> +under the License.
> +-->
> +
> +<entity-engine-xml>
> +    <!--
> +        Based on: http://en.wikipedia.org/wiki/People%27s_Republic_of_China#Administrative_divisions
> +        See also: http://en.wikipedia.org/wiki/Province_of_China
> +                  http://en.wikipedia.org/wiki/ISO_3166-2:CN
> +    -->
> +	<Geo abbreviation="京" geoCode="11" geoId="CN-11" geoName="北京" geoTypeId="MUNICIPALITY"/>	
> +	<Geo abbreviation="渝" geoCode="50" geoId="CN-50" geoName="重庆" geoTypeId="MUNICIPALITY"/>
> +	<Geo abbreviation="沪" geoCode="31" geoId="CN-31" geoName="上海" geoTypeId="MUNICIPALITY"/>
> +	<Geo abbreviation="津" geoCode="12" geoId="CN-12" geoName="天津" geoTypeId="MUNICIPALITY"/>
> +    <Geo abbreviation="黑" geoCode="23" geoId="CN-23" geoName="黑龙江" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="吉" geoCode="22" geoId="CN-22" geoName="吉林" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="辽" geoCode="21" geoId="CN-21" geoName="辽宁" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="青" geoCode="63" geoId="CN-63" geoName="青海" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="甘" geoCode="62" geoId="CN-62" geoName="甘肃" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="陕" geoCode="61" geoId="CN-61" geoName="陕西" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="晋" geoCode="14" geoId="CN-14" geoName="山西" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="冀" geoCode="13" geoId="CN-13" geoName="河北" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="川" geoCode="51" geoId="CN-51" geoName="四川" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="鄂" geoCode="42" geoId="CN-42" geoName="湖北" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="豫" geoCode="41" geoId="CN-41" geoName="河南" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="鲁" geoCode="37" geoId="CN-37" geoName="山东" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="皖" geoCode="34" geoId="CN-34" geoName="安徽" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="苏" geoCode="32" geoId="CN-32" geoName="江苏" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="滇" geoCode="53" geoId="CN-53" geoName="云南" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="黔" geoCode="52" geoId="CN-52" geoName="贵州" geoTypeId="PROVINCE"/>
> +    <Geo abbreviation="湘" geoCode="43" geoId="CN-43" geoName="湖南" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="赣" geoCode="36" geoId="CN-36" geoName="江西" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="浙" geoCode="33" geoId="CN-33" geoName="浙江" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="琼" geoCode="46" geoId="CN-46" geoName="海南" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="粤" geoCode="44" geoId="CN-44" geoName="广东" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="闽" geoCode="35" geoId="CN-35" geoName="福建" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="台" geoCode="71" geoId="CN-71" geoName="台湾" geoTypeId="PROVINCE"/>
> +	<Geo abbreviation="桂" geoCode="45" geoId="CN-45" geoName="广西" geoTypeId="REGION"/>
> +	<Geo abbreviation="内蒙古" geoCode="15" geoId="CN-15" geoName="内蒙古" geoTypeId="REGION"/>	
> +	<Geo abbreviation="宁" geoCode="64" geoId="CN-64" geoName="宁夏" geoTypeId="REGION"/>
> +	<Geo abbreviation="新" geoCode="65" geoId="CN-65" geoName="新疆" geoTypeId="REGION"/>
> +	<Geo abbreviation="藏" geoCode="54" geoId="CN-54" geoName="西藏" geoTypeId="REGION"/>
> +    <Geo abbreviation="香港" geoCode="91" geoId="CN-91" geoName="香港" geoTypeId="REGION"/>
> +	<Geo abbreviation="澳门" geoCode="92" geoId="CN-92" geoName="澳门" geoTypeId="REGION"/>
> +
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-11" geoAssocTypeId="REGIONS"/>	
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-50" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-31" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-12" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-23" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-22" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-21" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-63" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-62" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-61" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-14" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-13" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-51" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-42" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-41" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-37" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-34" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-32" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-53" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-52" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-43" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-36" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-33" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-46" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-44" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-35" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-71" geoAssocTypeId="REGIONS"/>
> +	<GeoAssoc geoId="CHN" geoIdTo="CN-64" geoAssocTypeId="REGIONS"/>
> +	<GeoAssoc geoId="CHN" geoIdTo="CN-65" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-54" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-91" geoAssocTypeId="REGIONS"/>
> +    <GeoAssoc geoId="CHN" geoIdTo="CN-92" geoAssocTypeId="REGIONS"/>
> +</entity-engine-xml>
> \ No newline at end of file
>
>
>