geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [38/50] [abbrv] incubator-geode git commit: GEODE-386: Change xsd namespace to apache
Date Fri, 22 Apr 2016 00:39:18 GMT
GEODE-386: Change xsd namespace to apache


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c1cf90eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c1cf90eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c1cf90eb

Branch: refs/heads/master
Commit: c1cf90eb884522a40e9a196c633c10dd12e9fbd7
Parents: 2622510
Author: Jens Deppe <jdeppe@pivotal.io>
Authored: Wed Apr 6 07:41:41 2016 -0700
Committer: Jens Deppe <jdeppe@pivotal.io>
Committed: Fri Apr 8 14:55:07 2016 -0700

----------------------------------------------------------------------
 .../release/conf/cache-client.xml               |    6 +-
 .../release/conf/cache-peer.xml                 |    6 +-
 .../release/conf/cache-server.xml               |    6 +-
 .../internal/SharedConfiguration.java           |    4 +-
 .../internal/cache/xmlcache/CacheXml.java       |   63 +-
 .../cache/xmlcache/CacheXmlGenerator.java       |  148 +-
 .../internal/cache/xmlcache/CacheXmlParser.java |    2 +-
 .../cache/xmlcache/CacheXmlVersion.java         |   56 +-
 .../cache/xmlcache/GeodeEntityResolver.java     |    2 +-
 .../configuration/domain/CacheElement.java      |    4 +-
 .../configuration/domain/XmlEntity.java         |    7 +-
 .../internal/configuration/utils/XmlUtils.java  |    6 +-
 .../geode.apache.org/schema/cache/cache-1.0.xsd | 1469 +++++++++++++++++
 .../gemfire/cache/cache-9.0.xsd                 | 1519 ------------------
 .../gemfire/cache30/CacheXml58DUnitTest.java    |    4 +-
 .../gemfire/cache30/CacheXml90DUnitTest.java    |  234 ---
 .../cache30/CacheXmlGeode10DUnitTest.java       |  234 +++
 .../internal/SharedConfigurationJUnitTest.java  |    2 +-
 .../xmlcache/AbstractEntityResolverTest.java    |  140 ++
 .../xmlcache/CacheXmlVersionJUnitTest.java      |   30 +-
 .../xmlcache/GeodeEntityResolverJUnitTest.java  |   49 +
 .../PivotalEntityResolverJUnitTest.java         |  118 +-
 .../domain/CacheElementJUnitTest.java           |    4 +-
 .../utils/XmlUtilsAddNewNodeJUnitTest.java      |   26 +-
 .../configuration/utils/XmlUtilsJUnitTest.java  |   12 +-
 .../codeAnalysis/sanctionedSerializables.txt    |    2 +-
 .../domain/CacheElementJUnitTest.xml            |    6 +-
 ...dNewNodeJUnitTest.testAddNewNodeNewNamed.xml |    6 +-
 ...ewNodeJUnitTest.testAddNewNodeNewUnnamed.xml |    6 +-
 ...itTest.testAddNewNodeNewUnnamedExtension.xml |    6 +-
 ...NodeJUnitTest.testAddNewNodeReplaceNamed.xml |    6 +-
 ...deJUnitTest.testAddNewNodeReplaceUnnamed.xml |    6 +-
 ...st.testAddNewNodeReplaceUnnamedExtension.xml |    6 +-
 ...ddNewNodeJUnitTest.testDeleteNodeUnnamed.xml |    6 +-
 .../utils/XmlUtilsAddNewNodeJUnitTest.xml       |    6 +-
 ...Test.testBuildSchemaLocationMapAttribute.xml |    6 +-
 ...testBuildSchemaLocationMapEmptyAttribute.xml |    4 +-
 ...ationMapMapOfStringListOfStringAttribute.xml |    6 +-
 ....testBuildSchemaLocationMapNullAttribute.xml |    4 +-
 ...XmlUtilsJUnitTest.testQuerySingleElement.xml |    6 +-
 .../geode.apache.org/lucene/lucene-1.0.xsd      |   12 +-
 ...erIntegrationJUnitTest.createIndex.cache.xml |    8 +-
 ...serIntegrationJUnitTest.parseIndex.cache.xml |    8 +-
 .../util/AutoBalancerIntegrationJUnitTest.java  |   12 +-
 .../website/content/schema/cache/cache-1.0.xsd  | 1469 +++++++++++++++++
 45 files changed, 3638 insertions(+), 2104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/extensions/geode-modules-assembly/release/conf/cache-client.xml
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/conf/cache-client.xml b/extensions/geode-modules-assembly/release/conf/cache-client.xml
index 3ae9ba7..c36e0ef 100755
--- a/extensions/geode-modules-assembly/release/conf/cache-client.xml
+++ b/extensions/geode-modules-assembly/release/conf/cache-client.xml
@@ -16,10 +16,10 @@
 	limitations under the License.
 -->
 <client-cache
-    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-9.0.xsd"
-    version="9.0">
+    xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+    version="1.0">
 
   <!-- The default pool connects to a cache server running on  localhost at
        port 40404. To connect to a different server host and port, modify

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/extensions/geode-modules-assembly/release/conf/cache-peer.xml
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/conf/cache-peer.xml b/extensions/geode-modules-assembly/release/conf/cache-peer.xml
index 1f62cb1..84fb67a 100755
--- a/extensions/geode-modules-assembly/release/conf/cache-peer.xml
+++ b/extensions/geode-modules-assembly/release/conf/cache-peer.xml
@@ -16,10 +16,10 @@
 	limitations under the License.
 -->
 <cache
-    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-9.0.xsd"
-    version="9.0">
+    xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+    version="1.0">
 
   <!-- Uncomment the following disk-store element to modify the default disk store directory -->
   <!--

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/extensions/geode-modules-assembly/release/conf/cache-server.xml
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-assembly/release/conf/cache-server.xml b/extensions/geode-modules-assembly/release/conf/cache-server.xml
index b9d8c2c..9dad75f 100755
--- a/extensions/geode-modules-assembly/release/conf/cache-server.xml
+++ b/extensions/geode-modules-assembly/release/conf/cache-server.xml
@@ -16,10 +16,10 @@
 	limitations under the License.
 -->
 <cache
-    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-9.0.xsd"
-    version="9.0">
+    xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+    version="1.0">
 
   <!-- Uncomment the following gateway-hub element to create a gateway hub -->
   <!--

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
index a8f331a..8f190eb 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
@@ -266,8 +266,8 @@ public class SharedConfiguration {
   // UnitTest SharedConfigurationJUnitTest.testCreateAndUpgradeDocumentFromXml
   static Document createAndUpgradeDocumentFromXml(final String xmlContent) throws SAXException, ParserConfigurationException, IOException, XPathExpressionException {
     Document doc = XmlUtils.createDocumentFromXml(xmlContent);
-    if (!CacheXml.VERSION_LATEST.equals(XmlUtils.getAttribute(doc.getDocumentElement(), CacheXml.VERSION, CacheXml.NAMESPACE))) {
-      doc = XmlUtils.upgradeSchema(doc, CacheXml.NAMESPACE, CacheXml.LATEST_SCHEMA_LOCATION, CacheXml.VERSION_LATEST);
+    if (!CacheXml.VERSION_LATEST.equals(XmlUtils.getAttribute(doc.getDocumentElement(), CacheXml.VERSION, CacheXml.GEODE_NAMESPACE))) {
+      doc = XmlUtils.upgradeSchema(doc, CacheXml.GEODE_NAMESPACE, CacheXml.LATEST_SCHEMA_LOCATION, CacheXml.VERSION_LATEST);
     }
     return doc;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
index 4f1facb..c6b0509 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
@@ -45,31 +45,38 @@ public abstract class CacheXml implements EntityResolver2, ErrorHandler {
    * This always refers to the latest GemFire version, in those cases where
    * we default to the current released version of GemFire.
    *
-   * WHenever you upgrade the DTD, you will need to search for occurrences of
+   * Whenever you upgrade the DTD, you will need to search for occurrences of
    * the previous version strings and upgrade them as well.
    *
    * @since 5.5
    */
-  public static final String VERSION_LATEST = CacheXml.VERSION_9_0;
+  public static final String VERSION_LATEST = CacheXml.VERSION_1_0;
   
   /**
-   * @deprecated As of 8.1 use {@link #NAMESPACE}
+   * @deprecated As of 8.1 use {@link #GEODE_NAMESPACE}
    */
   @Deprecated
   public static final String LATEST_SYSTEM_ID = CacheXml.SYSTEM_ID_8_0;
 
   /**
-   * @deprecated As of 8.1 use {@link #NAMESPACE}.
+   * @deprecated As of 8.1 use {@link #GEODE_NAMESPACE}.
    */
   @Deprecated
   public static final String LATEST_PUBLIC_ID = CacheXml.PUBLIC_ID_8_0;
-  
+
+  /**
+   * Namespace URI for older, GemFire {@link CacheXml} documents.
+   *
+   * @since 8.1
+   */
+  public static final String GEMFIRE_NAMESPACE = "http://schema.pivotal.io/gemfire/cache";
+
   /**
    * Namespace URI for {@link CacheXml} documents.
    * 
    * @since 8.1
    */
-  public static final String NAMESPACE = "http://schema.pivotal.io/gemfire/cache";
+  public static final String GEODE_NAMESPACE = "http://geode.apache.org/schema/cache";
 
   /**
    * Namespace prefix for {@link CacheXml} documents.
@@ -79,11 +86,11 @@ public abstract class CacheXml implements EntityResolver2, ErrorHandler {
   public static final String PREFIX = "cache";
 
   /**
-   * Latest schema location for {@link #NAMESPACE}.
+   * Latest schema location for {@link #GEODE_NAMESPACE}.
    * 
    * @since 8.1
    */
-  public static final String LATEST_SCHEMA_LOCATION = CacheXml.SCHEMA_9_0_LOCATION;
+  public static final String LATEST_SCHEMA_LOCATION = CacheXml.SCHEMA_1_0_LOCATION;
   
   /**
    * Location of the latest DTD file for Gemfire
@@ -101,11 +108,11 @@ public abstract class CacheXml implements EntityResolver2, ErrorHandler {
   public static final String VERSION_8_1 = "8.1";
   
   /**
-   * Version string for GemFire 9.0
+   * Version string for Geode 1.0
    * 
-   * @since 9.0
+   * @since 1.0
    */
-  public static final String VERSION_9_0 = "9.0";
+  public static final String VERSION_1_0 = "1.0";
   
   /**
    * The location of the GemFire 8.1 schema file.
@@ -114,11 +121,11 @@ public abstract class CacheXml implements EntityResolver2, ErrorHandler {
    */
   protected static final String SCHEMA_8_1_LOCATION = "http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd";
   /**
-   * The location of the GemFire 9.0 schema file.
+   * The location of the Geeode 1.0 schema file.
    * 
-   * @since 9.0
+   * @since 1.0
    */
-  protected static final String SCHEMA_9_0_LOCATION = "http://schema.pivotal.io/gemfire/cache/cache-9.0.xsd";
+  protected static final String SCHEMA_1_0_LOCATION = "http://geode.apache.org/schema/cache/cache-1.0.xsd";
 
   //---------------------------------
   /** Version string for GemFire 8.0 */
@@ -815,59 +822,59 @@ public abstract class CacheXml implements EntityResolver2, ErrorHandler {
     String location;
     if (SYSTEM_ID_3_0.equals(systemId) || PUBLIC_ID_3_0.equals(publicId)) {
       location = DTD_3_0_LOCATION;
-      version = CacheXmlVersion.VERSION_3_0;
+      version = CacheXmlVersion.GEMFIRE_3_0;
     }
     else if (SYSTEM_ID_4_0.equals(systemId) || PUBLIC_ID_4_0.equals(publicId)) {
       location = DTD_4_0_LOCATION;
-      version = CacheXmlVersion.VERSION_4_0;
+      version = CacheXmlVersion.GEMFIRE_4_0;
     }
     else if (SYSTEM_ID_4_1.equals(systemId) || PUBLIC_ID_4_1.equals(publicId)) {
       location = DTD_4_1_LOCATION;
-      version = CacheXmlVersion.VERSION_4_1;
+      version = CacheXmlVersion.GEMFIRE_4_1;
     }
     else if (SYSTEM_ID_5_0.equals(systemId) || PUBLIC_ID_5_0.equals(publicId)) {
       location = DTD_5_0_LOCATION;
-      version = CacheXmlVersion.VERSION_5_0;
+      version = CacheXmlVersion.GEMFIRE_5_0;
     }
     else if (SYSTEM_ID_5_1.equals(systemId) || PUBLIC_ID_5_1.equals(publicId)) {
       location = DTD_5_1_LOCATION;
-      version = CacheXmlVersion.VERSION_5_1;
+      version = CacheXmlVersion.GEMFIRE_5_1;
     }
     else if (SYSTEM_ID_5_5.equals(systemId) || PUBLIC_ID_5_5.equals(publicId)) {
       location = DTD_5_5_LOCATION;
-      version = CacheXmlVersion.VERSION_5_5;
+      version = CacheXmlVersion.GEMFIRE_5_5;
     }
     else if (SYSTEM_ID_5_7.equals(systemId) || PUBLIC_ID_5_7.equals(publicId)) {
       location = DTD_5_7_LOCATION;
-      version = CacheXmlVersion.VERSION_5_7;
+      version = CacheXmlVersion.GEMFIRE_5_7;
     }
     else if (SYSTEM_ID_5_8.equals(systemId) || PUBLIC_ID_5_8.equals(publicId)) {
       location = DTD_5_8_LOCATION;
-      version = CacheXmlVersion.VERSION_5_8;
+      version = CacheXmlVersion.GEMFIRE_5_8;
     }
     else if (SYSTEM_ID_6_0.equals(systemId) || PUBLIC_ID_6_0.equals(publicId)) {
       location = DTD_6_0_LOCATION;
-      version = CacheXmlVersion.VERSION_6_0;
+      version = CacheXmlVersion.GEMFIRE_6_0;
     }
     else if (SYSTEM_ID_6_1.equals(systemId) || PUBLIC_ID_6_1.equals(publicId)) {
       location = DTD_6_1_LOCATION;
-      version = CacheXmlVersion.VERSION_6_1;
+      version = CacheXmlVersion.GEMFIRE_6_1;
     }
     else if (SYSTEM_ID_6_5.equals(systemId) || PUBLIC_ID_6_5.equals(publicId)) {
       location = DTD_6_5_LOCATION;
-      version = CacheXmlVersion.VERSION_6_5;
+      version = CacheXmlVersion.GEMFIRE_6_5;
     }
     else if (SYSTEM_ID_6_6.equals(systemId) || PUBLIC_ID_6_6.equals(publicId)) {
       location = DTD_6_6_LOCATION;
-      version = CacheXmlVersion.VERSION_6_6;
+      version = CacheXmlVersion.GEMFIRE_6_6;
     }
     else if (SYSTEM_ID_7_0.equals(systemId) || PUBLIC_ID_7_0.equals(publicId)) {
       location = DTD_7_0_LOCATION;
-      version = CacheXmlVersion.VERSION_7_0;
+      version = CacheXmlVersion.GEMFIRE_7_0;
     }
     else if (SYSTEM_ID_8_0.equals(systemId) || PUBLIC_ID_8_0.equals(publicId)) {
       location = DTD_8_0_LOCATION;
-      version = CacheXmlVersion.VERSION_8_0;
+      version = CacheXmlVersion.GEMFIRE_8_0;
     }
     else {
       // Instruct the XML parser to open a URI connection to the

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlGenerator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlGenerator.java
index 57d06b0..ea3c975 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlGenerator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlGenerator.java
@@ -466,10 +466,10 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
       // add schema location for cache schema.
       handler.startPrefixMapping(W3C_XML_SCHEMA_INSTANCE_PREFIX, W3C_XML_SCHEMA_INSTANCE_NS_URI);
-      addAttribute(atts, W3C_XML_SCHEMA_INSTANCE_PREFIX, W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION, NAMESPACE + " " + version.getSchemaLocation());
+      addAttribute(atts, W3C_XML_SCHEMA_INSTANCE_PREFIX, W3C_XML_SCHEMA_INSTANCE_ATTRIBUTE_SCHEMA_LOCATION, version.getNamespace() + " " + version.getSchemaLocation());
       
       // add cache schema to default prefix.
-      handler.startPrefixMapping(XmlConstants.DEFAULT_PREFIX, NAMESPACE);
+      handler.startPrefixMapping(XmlConstants.DEFAULT_PREFIX, version.getNamespace());
       addAttribute(atts, VERSION, this.version.getVersion());
     }
 
@@ -487,34 +487,34 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       atts.addAttribute("", "", SEARCH_TIMEOUT, "",
                         String.valueOf(creation.getSearchTimeout()));
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_5) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_5) >= 0) {
       // TODO
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
       // TODO
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_8) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_8) >= 0) {
       // TODO
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_6_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_0) >= 0) {
       // TODO
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_6_5) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) >= 0) {
       // TODO
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_7_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_7_0) >= 0) {
       // TODO
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_7_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_7_0) >= 0) {
       // TODO
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_1) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_1) >= 0) {
       if (creation.hasMessageSyncInterval()) {
         atts.addAttribute("", "", MESSAGE_SYNC_INTERVAL, "", String
             .valueOf(creation.getMessageSyncInterval()));
       }
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_4_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_4_0) >= 0) {
       if (creation.hasServer()) {
         atts.addAttribute("", "", IS_SERVER, "",
                           String.valueOf(creation.isServer()));
@@ -532,14 +532,14 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     if (this.cache != null) {
       if (!isClientCache) {
           generate(this.cache.getCacheTransactionManager());
-      } else if(this.version.compareTo(CacheXmlVersion.VERSION_6_6) >= 0) {
+      } else if(this.version.compareTo(CacheXmlVersion.GEMFIRE_6_6) >= 0) {
         generate(this.cache.getCacheTransactionManager());
       }
 
       generateDynamicRegionFactory(this.cache);
 
       if (!isClientCache) {
-        if (this.version.compareTo(CacheXmlVersion.VERSION_7_0) >= 0) {
+        if (this.version.compareTo(CacheXmlVersion.GEMFIRE_7_0) >= 0) {
           Set<GatewaySender> senderSet = cache.getGatewaySenders();
           for (GatewaySender sender : senderSet) {
             generateGatewaySender(sender);
@@ -549,7 +549,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         }
       }
       
-      if (!isClientCache && this.version.compareTo(CacheXmlVersion.VERSION_7_0) >= 0) {
+      if (!isClientCache && this.version.compareTo(CacheXmlVersion.GEMFIRE_7_0) >= 0) {
         if (this.cache.getGatewayConflictResolver() != null) {
           generate(GATEWAY_CONFLICT_RESOLVER, this.cache.getGatewayConflictResolver());
         }
@@ -563,7 +563,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         }
       }
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
         Iterator pools;
         if (this.cache instanceof GemFireCacheImpl) {
           pools = PoolManager.getAll().values().iterator();
@@ -576,7 +576,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         }
       }
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_6_5) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) >= 0) {
         if (this.cache instanceof GemFireCacheImpl) {
           GemFireCacheImpl gfc = (GemFireCacheImpl)this.cache;
           for (DiskStore ds: gfc.listDiskStores()) {
@@ -588,11 +588,11 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
           }
         }
       }
-      if(this.version.compareTo(CacheXmlVersion.VERSION_6_6) >= 0) {
+      if(this.version.compareTo(CacheXmlVersion.GEMFIRE_6_6) >= 0) {
         generatePdx();
       }
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_4_1) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_4_1) >= 0) {
         Map namedAttributes = this.cache.listRegionAttributes();
         for (Iterator iter = namedAttributes.entrySet().iterator();
              iter.hasNext(); ) {
@@ -603,7 +603,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
           // we need to exclude them in all versions.
           // It would be better if CacheCreation could only predefine them
           // for versions 6.5 and later but that is not easy to do
-          /*if (this.version.compareTo(CacheXmlVersion.VERSION_6_5) >= 0)*/ {
+          /*if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) >= 0)*/ {
             if (this.creation instanceof ClientCacheCreation) {
               try {
                 ClientRegionShortcut.valueOf(id);
@@ -639,15 +639,15 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     	  }
       }
 
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_8) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_8) >= 0) {
         generateFunctionService();
       }
-      if (this.version.compareTo(CacheXmlVersion.VERSION_6_0) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_0) >= 0) {
         generateResourceManager();
         generateSerializerRegistration();
       }
       if (!isClientCache) {
-        if (this.version.compareTo(CacheXmlVersion.VERSION_6_5) >= 0) {
+        if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) >= 0) {
           if (this.cache instanceof GemFireCacheImpl) {
             GemFireCacheImpl gfc = (GemFireCacheImpl)this.cache;
             for (File file : gfc.getBackupFiles()) {
@@ -660,7 +660,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
           }
         }
       }
-      if(this.version.compareTo(CacheXmlVersion.VERSION_6_6) >= 0) {
+      if(this.version.compareTo(CacheXmlVersion.GEMFIRE_6_6) >= 0) {
         generateInitializer();
       }
     } else {
@@ -727,7 +727,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
   }
 
   private void generateRegion(Region root) throws SAXException {
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_0) >= 0) {
       generate(root, REGION);
     }
     else {
@@ -827,7 +827,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         }
       }
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_9_0) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEODE_1_0) >= 0) {
         if (this.creation.getResourceManager().hasCriticalOffHeap()) {
           float chp = this.creation.getResourceManager().getCriticalOffHeapPercentage();
           if (generateDefaults() || chp != MemoryThresholds.DEFAULT_CRITICAL_PERCENTAGE) {
@@ -861,7 +861,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
             String.valueOf(ehp));
       }
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_9_0) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEODE_1_0) >= 0) {
         {
           int chp = (int)this.cache.getResourceManager().getCriticalOffHeapPercentage();
           if (generateDefaults() || chp != MemoryThresholds.DEFAULT_CRITICAL_PERCENTAGE)
@@ -958,7 +958,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     try {
         atts.addAttribute("", "", CLIENT_SUBSCRIPTION_EVICTION_POLICY, "", csc.getEvictionPolicy());
         atts.addAttribute("", "", CLIENT_SUBSCRIPTION_CAPACITY, "", String.valueOf(csc.getCapacity()));
-        if (this.version.compareTo(CacheXmlVersion.VERSION_6_5) >= 0) {
+        if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) >= 0) {
           String dsVal = csc.getDiskStoreName();
           if (dsVal != null) {
             atts.addAttribute("", "", DISK_STORE_NAME, "", dsVal);
@@ -981,7 +981,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
    * @since 4.0
    */
   private void generate(CacheServer bridge) throws SAXException {
-    if (this.version.compareTo(CacheXmlVersion.VERSION_4_0) < 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_4_0) < 0) {
       return;
     }
     AttributesImpl atts = new AttributesImpl();
@@ -990,7 +990,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       atts.addAttribute("", "", PORT, "",
           String.valueOf(bridge.getPort()));
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_4_1) < 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_4_1) < 0) {
         return;
       }
       if (generateDefaults() || bridge.getMaximumTimeBetweenPings() != CacheServer.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS)
@@ -1005,7 +1005,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       atts.addAttribute("", "", SOCKET_BUFFER_SIZE, "",
           String.valueOf(bridge.getSocketBufferSize()));
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_0) < 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_0) < 0) {
         return;
       }
       
@@ -1013,7 +1013,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       atts.addAttribute("", "", MAX_CONNECTIONS, "",
           String.valueOf(bridge.getMaxConnections()));
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_1) < 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_1) < 0) {
         return;
       }
 
@@ -1030,7 +1030,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       
       
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) < 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) < 0) {
         return;
       }
       
@@ -1046,7 +1046,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       if (generateDefaults() || bridge.getLoadPollInterval() != CacheServer.DEFAULT_LOAD_POLL_INTERVAL)
       atts.addAttribute("", "", LOAD_POLL_INTERVAL, "", String.valueOf(bridge.getLoadPollInterval()));
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_8_0) < 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_8_0) < 0) {
         return;
       }
 
@@ -1055,13 +1055,13 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
 
     } finally {
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
         handler.startElement("", CACHE_SERVER, CACHE_SERVER, atts);
       } else {
         handler.startElement("", BRIDGE_SERVER, BRIDGE_SERVER, atts);
       }
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
         String[] groups = bridge.getGroups();
         if (groups.length > 0) {
           for (int i = 0; i < groups.length; i++) {
@@ -1083,7 +1083,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         
         
       }
-      if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
         handler.endElement("", "", CACHE_SERVER);
       } else {
         handler.endElement("", "", BRIDGE_SERVER);
@@ -1097,7 +1097,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
    * @since prPersistSprint2
    */
   private void generate(DiskStore ds) throws SAXException {
-    if (this.version.compareTo(CacheXmlVersion.VERSION_6_5) < 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) < 0) {
       return;
     }
     AttributesImpl atts = new AttributesImpl();
@@ -1153,7 +1153,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
             String.valueOf(ds.getQueueSize()));
       }
       
-      if (this.version.compareTo(CacheXmlVersion.VERSION_8_0) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_8_0) >= 0) {
         if ((!(ds instanceof DiskStoreAttributesCreation) ||
             ((DiskStoreAttributesCreation) ds).hasDiskUsageWarningPercentage())) {
           if (generateDefaults() || ds.getDiskUsageWarningPercentage() != DiskStoreFactory.DEFAULT_DISK_USAGE_WARNING_PERCENTAGE)
@@ -1220,7 +1220,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
    * @since 5.7
    */
   private void generate(Pool cp) throws SAXException {
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) < 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) < 0) {
       return;
     }
     if (((PoolImpl)cp).isUsedByGateway()) {
@@ -1279,13 +1279,13 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       atts.addAttribute("", "", THREAD_LOCAL_CONNECTIONS, "",
                         String.valueOf(cp.getThreadLocalConnections()));
 
-      if (this.version.compareTo(CacheXmlVersion.VERSION_6_1) > 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_1) > 0) {
         if (generateDefaults() || cp.getPRSingleHopEnabled() != PoolFactory.DEFAULT_PR_SINGLE_HOP_ENABLED)
         atts.addAttribute("", "", PR_SINGLE_HOP_ENABLED, "",
             String.valueOf(cp.getPRSingleHopEnabled()));  
       }
 
-      if (this.version.compareTo(CacheXmlVersion.VERSION_6_1) > 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_1) > 0) {
         if (generateDefaults() || cp.getMultiuserAuthentication() != PoolFactory.DEFAULT_MULTIUSER_AUTHENTICATION)
         atts.addAttribute("", "", MULTIUSER_SECURE_MODE_ENABLED, "", String.valueOf(cp
             .getMultiuserAuthentication()));
@@ -1324,7 +1324,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
    * @since 4.0
    */
   private void generate(CacheTransactionManager txMgr) throws SAXException {
-    if (this.version.compareTo(CacheXmlVersion.VERSION_4_0) < 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_4_0) < 0) {
       return;
     }
 
@@ -1355,7 +1355,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
    * @since 4.3
    */
   private void generateDynamicRegionFactory(Cache c) throws SAXException {
-    if (this.version.compareTo(CacheXmlVersion.VERSION_4_1) < 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_4_1) < 0) {
       return;
     }
     DynamicRegionFactory.Config cfg;
@@ -1463,7 +1463,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
          generateGatewayEventFilter(gef);
       }
 
-      if (this.version.compareTo(CacheXmlVersion.VERSION_8_0) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_8_0) >= 0) {
         if (sender.getGatewayEventSubstitutionFilter() != null) {
           generateGatewayEventSubstitutionFilter(sender.getGatewayEventSubstitutionFilter());
         }
@@ -1534,7 +1534,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     	  }
       }
 
-      if (this.version.compareTo(CacheXmlVersion.VERSION_8_0) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_8_0) >= 0) {
         if (asyncEventQueue.getGatewayEventSubstitutionFilter() != null) {
           generateGatewayEventSubstitutionFilter(asyncEventQueue.getGatewayEventSubstitutionFilter());
         }
@@ -1581,7 +1581,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
           atts.addAttribute("", "", SOCKET_BUFFER_SIZE, "",
               String.valueOf(receiver.getSocketBufferSize()));
 
-        if (this.version.compareTo(CacheXmlVersion.VERSION_8_0) < 0) {
+        if (this.version.compareTo(CacheXmlVersion.GEMFIRE_8_0) < 0) {
           return;
         }
         // manual-start
@@ -1905,11 +1905,11 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
                         String.valueOf(attrs.getEnableAsyncConflation()));
     }
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_0) >= 0) {
       
       if ((!(attrs instanceof RegionAttributesCreation) ||
            ((RegionAttributesCreation) attrs).hasEnableSubscriptionConflation())) {
-        if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) >= 0) {
+        if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
           // starting with 5.7 it is enable-subscription-conflation
           if (generateDefaults() || attrs.getEnableSubscriptionConflation())
           atts.addAttribute("", "", ENABLE_SUBSCRIPTION_CONFLATION, "",
@@ -1939,7 +1939,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         } else if (dp == DataPolicy.PERSISTENT_PARTITION) {
           dpString = PERSISTENT_PARTITION_DP;
         } else if (dp.isPartition()) {
-          if (this.version.compareTo(CacheXmlVersion.VERSION_5_1) >= 0) {
+          if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_1) >= 0) {
             dpString = PARTITION_DP;
           }
           else {
@@ -1953,8 +1953,8 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         if (generateDefaults() || !dp.equals(DataPolicy.DEFAULT))
         atts.addAttribute("", "", DATA_POLICY, "", dpString);
       } // hasDataPolicy
-    } // VERSION_5_0 >= 0
-    else { // VERSION_5_0 < 0
+    } // GEMFIRE_5_0 >= 0
+    else { // GEMFIRE_5_0 < 0
       if ((!(attrs instanceof RegionAttributesCreation) ||
           ((RegionAttributesCreation) attrs).hasEnableSubscriptionConflation())) {
        if (generateDefaults() || attrs.getEnableSubscriptionConflation())
@@ -1981,7 +1981,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         atts.addAttribute("", "", PERSIST_BACKUP, "",
                           String.valueOf(attrs.getDataPolicy() == DataPolicy.PERSISTENT_REPLICATE));
       }
-    } // VERSION_5_0 < 0
+    } // GEMFIRE_5_0 < 0
 
     if ((!(attrs instanceof RegionAttributesCreation) ||
          ((RegionAttributesCreation) attrs).hasInitialCapacity())) {
@@ -2004,7 +2004,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
                         String.valueOf(attrs.getConcurrencyLevel()));
     }
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_7_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_7_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
           ((RegionAttributesCreation) attrs).hasConcurrencyChecksEnabled())) {
        if (generateDefaults() || attrs.getConcurrencyChecksEnabled() != true/*fixes bug 46654*/)
@@ -2029,7 +2029,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
                         String.valueOf(attrs.getIgnoreJTA()));
     }
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_4_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_4_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
            ((RegionAttributesCreation) attrs).hasIsLockGrantor())) {
         if (generateDefaults() || attrs.isLockGrantor())
@@ -2037,7 +2037,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
                           String.valueOf(attrs.isLockGrantor()));
       }
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_7) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_7) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
            ((RegionAttributesCreation) attrs).hasPoolName())) {
         String cpVal = attrs.getPoolName();
@@ -2048,7 +2048,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         atts.addAttribute("", "", POOL_NAME, "", cpVal);
       }
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_6_5) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
           ((RegionAttributesCreation) attrs).hasDiskStoreName())) {
         String dsVal = attrs.getDiskStoreName();
@@ -2062,7 +2062,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
         atts.addAttribute("", "", DISK_SYNCHRONOUS, "", String.valueOf(attrs.isDiskSynchronous()));
       }
     }
-    if(this.version.compareTo(CacheXmlVersion.VERSION_6_1) >= 0)
+    if(this.version.compareTo(CacheXmlVersion.GEMFIRE_6_1) >= 0)
       if ((!(attrs instanceof RegionAttributesCreation)||
           ((RegionAttributesCreation) attrs).hasCloningEnabled())) {
         if (generateDefaults() || attrs.getCloningEnabled())
@@ -2070,7 +2070,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
             String.valueOf(attrs.getCloningEnabled()));
      }
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_7_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_7_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) || ((RegionAttributesCreation)attrs)
           .hasGatewaySenderId())) {
         Set<String> senderIds = new HashSet<String>(attrs
@@ -2089,7 +2089,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
     }
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_7_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_7_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) || ((RegionAttributesCreation)attrs)
           .hasAsyncEventListeners())) {
         Set<String> asyncEventQueueIds = new HashSet<String>(attrs
@@ -2108,7 +2108,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
     }
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_9_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEODE_1_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
           ((RegionAttributesCreation) attrs).hasOffHeap())) {
         if (generateDefaults() || attrs.getOffHeap()) {
@@ -2157,7 +2157,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
           attrs.getCustomEntryIdleTimeout());
     }
 
-    if (attrs.getDiskStoreName() == null && (generateDefaults() || this.version.compareTo(CacheXmlVersion.VERSION_6_5) < 0)) {
+    if (attrs.getDiskStoreName() == null && (generateDefaults() || this.version.compareTo(CacheXmlVersion.GEMFIRE_6_5) < 0)) {
     if ((!(attrs instanceof RegionAttributesCreation) ||
          ((RegionAttributesCreation) attrs).hasDiskWriteAttributes())) {
       generate(attrs.getDiskWriteAttributes());
@@ -2186,7 +2186,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     }
     } // pre 6.5
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
           ((RegionAttributesCreation) attrs).hasPartitionAttributes())) {
         PartitionAttributes p = attrs.getPartitionAttributes();
@@ -2196,14 +2196,14 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
     }
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_0) >= 0) {
       MembershipAttributes p = attrs.getMembershipAttributes();
       if (p != null && p.hasRequiredRoles()) {
         generate(p);
       }
     }
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
           ((RegionAttributesCreation) attrs).hasSubscriptionAttributes())) {
        SubscriptionAttributes sa = attrs.getSubscriptionAttributes();
@@ -2230,7 +2230,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
     }
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_8_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_8_0) >= 0) {
       if ((!(attrs instanceof RegionAttributesCreation) ||
           ((RegionAttributesCreation) attrs).hasCompressor())) {
        generate(COMPRESSOR, attrs.getCompressor());
@@ -2326,7 +2326,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     } else if (ea.getAlgorithm() == EvictionAlgorithm.LRU_HEAP) {
       handler.startElement("", LRU_HEAP_PERCENTAGE,
           LRU_HEAP_PERCENTAGE, atts);
-      if (this.version.compareTo(CacheXmlVersion.VERSION_6_0) >= 0) {
+      if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_0) >= 0) {
         ObjectSizer os = ea.getObjectSizer();
         if (!(os instanceof SizeClassOnceObjectSizer)) {
           if (os != null) {
@@ -2432,7 +2432,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     atts.addAttribute("", "", PARTITION_REDUNDANT_COPIES, "",
         String.valueOf(pa.getRedundantCopies()));
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_1) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_1) >= 0) {
       if (generateDefaults() || pa.getLocalMaxMemory() != ((PartitionAttributesImpl) pa).getLocalMaxMemoryDefault())
       atts.addAttribute("", "", LOCAL_MAX_MEMORY, "",
           String.valueOf(pa.getLocalMaxMemory()));
@@ -2442,15 +2442,15 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       if (generateDefaults() || pa.getTotalNumBuckets() != PartitionAttributesFactory.GLOBAL_MAX_BUCKETS_DEFAULT)
       atts.addAttribute("", "", TOTAL_NUM_BUCKETS, "",
           String.valueOf(pa.getTotalNumBuckets()));
-    } // VERSION_5_1
+    } // GEMFIRE_5_1
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_8) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_8) >= 0) {
       if(pa.getColocatedWith() != null)
         atts.addAttribute("", "", PARTITION_COLOCATED_WITH, "",
             pa.getColocatedWith());
       
     }
-    if (this.version.compareTo(CacheXmlVersion.VERSION_6_0) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_0) >= 0) {
       if (generateDefaults() || pa.getRecoveryDelay() != PartitionAttributesFactory.RECOVERY_DELAY_DEFAULT)
         atts.addAttribute("", "", RECOVERY_DELAY, "",
             String.valueOf(pa.getRecoveryDelay()));
@@ -2469,14 +2469,14 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
     handler.startElement("", PARTITION_ATTRIBUTES,
                            PARTITION_ATTRIBUTES, atts);
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_8) >= 0) {      
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_8) >= 0) {
       PartitionResolver rr = pa.getPartitionResolver();
       if (rr != null) {
         generate(PARTITION_RESOLVER, rr);        
       }
     }
     
-    if (this.version.compareTo(CacheXmlVersion.VERSION_6_1) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_1) >= 0) {
       PartitionListener[] listeners = pa.getPartitionListeners();
       for (int i = 0; i < listeners.length; i++) {
         PartitionListener listener = listeners[i];
@@ -2486,7 +2486,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
     }   
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_6_6) >= 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_6_6) >= 0) {
       List<FixedPartitionAttributes> staticAttrs = pa
           .getFixedPartitionAttributes();
       if (staticAttrs != null) {
@@ -2494,7 +2494,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
       }
     }
 
-    if (this.version.compareTo(CacheXmlVersion.VERSION_5_1) < 0) {
+    if (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_1) < 0) {
       Properties p = pa.getLocalProperties();
       generate(p, LOCAL_PROPERTIES);
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParser.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParser.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParser.java
index 69899fd..e6c0b60 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParser.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlParser.java
@@ -1663,7 +1663,7 @@ public class CacheXmlParser extends CacheXml implements ContentHandler {
     RegionAttributesCreation rattrs = peekRegionAttributesContext(PARTITION_ATTRIBUTES);
     // change the 5.0 default data policy (EMPTY) to the current default
     if (rattrs.hasDataPolicy() && rattrs.getDataPolicy().isEmpty()
-        && (this.version.compareTo(CacheXmlVersion.VERSION_5_0) == 0)) {
+        && (this.version.compareTo(CacheXmlVersion.GEMFIRE_5_0) == 0)) {
       rattrs.setDataPolicy(PartitionedRegionHelper.DEFAULT_DATA_POLICY);
     }
     rattrs.setPartitionAttributes(paf);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersion.java
index 51e840a..716b983 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXmlVersion.java
@@ -28,22 +28,25 @@ import java.util.HashMap;
  */
 // TODO future - replace constants in CacheXml with this Enum completely
 public enum CacheXmlVersion {
-  VERSION_3_0(CacheXml.VERSION_3_0, null, CacheXml.PUBLIC_ID_3_0, CacheXml.SYSTEM_ID_3_0),
-  VERSION_4_0(CacheXml.VERSION_4_0, null, CacheXml.PUBLIC_ID_4_0, CacheXml.SYSTEM_ID_4_0),
-  VERSION_4_1(CacheXml.VERSION_4_1, null, CacheXml.PUBLIC_ID_4_1, CacheXml.SYSTEM_ID_4_1),
-  VERSION_5_0(CacheXml.VERSION_5_0, null, CacheXml.PUBLIC_ID_5_0, CacheXml.SYSTEM_ID_5_0),
-  VERSION_5_1(CacheXml.VERSION_5_1, null, CacheXml.PUBLIC_ID_5_1, CacheXml.SYSTEM_ID_5_1),
-  VERSION_5_5(CacheXml.VERSION_5_5, null, CacheXml.PUBLIC_ID_5_5, CacheXml.SYSTEM_ID_5_5),
-  VERSION_5_7(CacheXml.VERSION_5_7, null, CacheXml.PUBLIC_ID_5_7, CacheXml.SYSTEM_ID_5_7),
-  VERSION_5_8(CacheXml.VERSION_5_8, null, CacheXml.PUBLIC_ID_5_8, CacheXml.SYSTEM_ID_5_8),
-  VERSION_6_0(CacheXml.VERSION_6_0, null, CacheXml.PUBLIC_ID_6_0, CacheXml.SYSTEM_ID_6_0),
-  VERSION_6_1(CacheXml.VERSION_6_1, null, CacheXml.PUBLIC_ID_6_1, CacheXml.SYSTEM_ID_6_1),
-  VERSION_6_5(CacheXml.VERSION_6_5, null, CacheXml.PUBLIC_ID_6_5, CacheXml.SYSTEM_ID_6_5),
-  VERSION_6_6(CacheXml.VERSION_6_6, null, CacheXml.PUBLIC_ID_6_6, CacheXml.SYSTEM_ID_6_6),
-  VERSION_7_0(CacheXml.VERSION_7_0, null, CacheXml.PUBLIC_ID_7_0, CacheXml.SYSTEM_ID_7_0),
-  VERSION_8_0(CacheXml.VERSION_8_0, null, CacheXml.PUBLIC_ID_8_0, CacheXml.SYSTEM_ID_8_0),
-  VERSION_8_1(CacheXml.VERSION_8_1, CacheXml.SCHEMA_8_1_LOCATION, null, null),
-  VERSION_9_0(CacheXml.VERSION_9_0, CacheXml.SCHEMA_9_0_LOCATION, null, null);
+  GEMFIRE_3_0(CacheXml.VERSION_3_0, CacheXml.PUBLIC_ID_3_0, CacheXml.SYSTEM_ID_3_0, null, null),
+  GEMFIRE_4_0(CacheXml.VERSION_4_0, CacheXml.PUBLIC_ID_4_0, CacheXml.SYSTEM_ID_4_0, null, null),
+  GEMFIRE_4_1(CacheXml.VERSION_4_1, CacheXml.PUBLIC_ID_4_1, CacheXml.SYSTEM_ID_4_1, null, null),
+  GEMFIRE_5_0(CacheXml.VERSION_5_0, CacheXml.PUBLIC_ID_5_0, CacheXml.SYSTEM_ID_5_0, null, null),
+  GEMFIRE_5_1(CacheXml.VERSION_5_1, CacheXml.PUBLIC_ID_5_1, CacheXml.SYSTEM_ID_5_1, null, null),
+  GEMFIRE_5_5(CacheXml.VERSION_5_5, CacheXml.PUBLIC_ID_5_5, CacheXml.SYSTEM_ID_5_5, null, null),
+  GEMFIRE_5_7(CacheXml.VERSION_5_7, CacheXml.PUBLIC_ID_5_7, CacheXml.SYSTEM_ID_5_7, null, null),
+  GEMFIRE_5_8(CacheXml.VERSION_5_8, CacheXml.PUBLIC_ID_5_8, CacheXml.SYSTEM_ID_5_8, null, null),
+  GEMFIRE_6_0(CacheXml.VERSION_6_0, CacheXml.PUBLIC_ID_6_0, CacheXml.SYSTEM_ID_6_0, null, null),
+  GEMFIRE_6_1(CacheXml.VERSION_6_1, CacheXml.PUBLIC_ID_6_1, CacheXml.SYSTEM_ID_6_1, null, null),
+  GEMFIRE_6_5(CacheXml.VERSION_6_5, CacheXml.PUBLIC_ID_6_5, CacheXml.SYSTEM_ID_6_5, null, null),
+  GEMFIRE_6_6(CacheXml.VERSION_6_6, CacheXml.PUBLIC_ID_6_6, CacheXml.SYSTEM_ID_6_6, null, null),
+  GEMFIRE_7_0(CacheXml.VERSION_7_0, CacheXml.PUBLIC_ID_7_0, CacheXml.SYSTEM_ID_7_0, null, null),
+  GEMFIRE_8_0(CacheXml.VERSION_8_0, CacheXml.PUBLIC_ID_8_0, CacheXml.SYSTEM_ID_8_0, null, null),
+  GEMFIRE_8_1(CacheXml.VERSION_8_1, null, null, CacheXml.SCHEMA_8_1_LOCATION, CacheXml.GEMFIRE_NAMESPACE),
+
+  // Ordinality matters here, so keep the 1.0 version after the 8.x versions
+  // Version 1.0 is the start of Geode versions. In terms of releases, Geode 1.0 > GemFire 8.x.
+  GEODE_1_0(CacheXml.VERSION_1_0, null, null, CacheXml.SCHEMA_1_0_LOCATION, CacheXml.GEODE_NAMESPACE);
 
   private static final HashMap<String, CacheXmlVersion> valuesForVersion = new HashMap<>();
   static {
@@ -54,14 +57,16 @@ public enum CacheXmlVersion {
 
   private final String version;
   private final String schemaLocation;
+  private final String namespace;
   private final String publicId;
   private final String systemId;
 
-  private CacheXmlVersion(String version, String schemaLocation, String publicId, String systemId) {
+  private CacheXmlVersion(String version, String publicId, String systemId, String schemaLocation, String namespace) {
     this.version = version;
-    this.schemaLocation = schemaLocation;
     this.publicId = publicId;
     this.systemId = systemId;
+    this.schemaLocation = schemaLocation;
+    this.namespace = namespace;
   }
 
   /**
@@ -79,9 +84,9 @@ public enum CacheXmlVersion {
 
   /**
    * The schema file location.
-   * 
+   *
    * @return the schemaLocation if schema exists, otherwise null.
-   * 
+   *
    * @since 8.1
    */
   public String getSchemaLocation() {
@@ -89,6 +94,15 @@ public enum CacheXmlVersion {
   }
 
   /**
+   * The namespace.
+   * 
+   * @return the namespace if schema exists, otherwise null.
+   */
+  public String getNamespace() {
+    return namespace;
+  }
+
+  /**
    * The DTD public id.
    * 
    * @return the publicId if DTD exists, otherwise null.
@@ -111,7 +125,7 @@ public enum CacheXmlVersion {
   /**
    * Get {@link CacheXmlVersion} for given <code>version</code> string. Use
    * constants from {@link CacheXml} for example:
-   * <code>CacheXmlVersion.valueForVersion(CacheXml.VERSION_8_1);</code>
+   * <code>CacheXmlVersion.valueForVersion(CacheXml.GEMFIRE_8_1);</code>
    * 
    * @param version
    *          string to lookup.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolver.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolver.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolver.java
index 59d5860..d7c2a72 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolver.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/GeodeEntityResolver.java
@@ -37,7 +37,7 @@ import org.xml.sax.ext.EntityResolver2;
  */
 public final class GeodeEntityResolver extends DefaultEntityResolver2 {
 
-  private static final String SYSTEM_ID_ROOT = "http://geode.apache.org/schema";
+  private static final String SYSTEM_ID_ROOT = "http://geode.apache.org/";
 
   private static final String CLASSPATH_ROOT = "/META-INF/schemas/geode.apache.org/";
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElement.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElement.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElement.java
index 2da5796..a674d56 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElement.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/CacheElement.java
@@ -94,7 +94,7 @@ public class CacheElement {
 
   /**
    * Build <code>cache</code> element map for given <cod>doc</code>'s
-   * schemaLocation for {@link CacheXml#NAMESPACE}.
+   * schemaLocation for {@link CacheXml#GEODE_NAMESPACE}.
    * 
    * @param doc
    *          {@link Document} to parse schema for.
@@ -111,7 +111,7 @@ public class CacheElement {
 
     final LinkedHashMap<String, CacheElement> elementMap = new LinkedHashMap<String, CacheElement>();
 
-    buildElementMapCacheType(elementMap, resolveSchema(schemaLocationMap, CacheXml.NAMESPACE));
+    buildElementMapCacheType(elementMap, resolveSchema(schemaLocationMap, CacheXml.GEODE_NAMESPACE));
 
     // if we are ever concerned with the order of extensions or children process them here.
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/XmlEntity.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/XmlEntity.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/XmlEntity.java
index 8517fc6..f8da915 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/XmlEntity.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/domain/XmlEntity.java
@@ -35,7 +35,6 @@ import javax.xml.xpath.XPathExpressionException;
 import org.apache.logging.log4j.Logger;
 import org.springframework.util.Assert;
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -70,7 +69,7 @@ public class XmlEntity implements DataSerializable {
 
   private String prefix = CacheXml.PREFIX;
 
-  private String namespace = CacheXml.NAMESPACE;
+  private String namespace = CacheXml.GEODE_NAMESPACE;
 
   /**
    * Default constructor for serialization only.
@@ -308,7 +307,7 @@ public class XmlEntity implements DataSerializable {
   }
 
   /**
-   * Gets the namespace for the element. Defaults to {@link CacheXml#NAMESPACE}
+   * Gets the namespace for the element. Defaults to {@link CacheXml#GEODE_NAMESPACE}
    * if not set.
    * 
    * @return XML element namespace
@@ -457,7 +456,7 @@ public class XmlEntity implements DataSerializable {
      * Sets the element prefix and namespace as returned by
      * {@link XmlEntity#getPrefix()} and {@link XmlEntity#getNamespace()}
      * respectively. Defaults are {@link CacheXml#PREFIX} and
-     * {@link CacheXml#NAMESPACE} respectively.
+     * {@link CacheXml#GEODE_NAMESPACE} respectively.
      * 
      * @param prefix
      *          Prefix of element

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c1cf90eb/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtils.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtils.java
index 37b7321..7860eab 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtils.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtils.java
@@ -21,9 +21,7 @@ import static com.gemstone.gemfire.management.internal.configuration.utils.XmlCo
 import static javax.xml.XMLConstants.NULL_NS_URI;
 import static javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI;
 
-import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
@@ -198,7 +196,7 @@ public class XmlUtils {
    * @since 8.1
    */
   private static boolean isMultiple(final LinkedHashMap<String, CacheElement> elementOrderMap, final String namespace, final String type) {
-    if (CacheXml.NAMESPACE.equals(namespace)) {
+    if (CacheXml.GEODE_NAMESPACE.equals(namespace)) {
       // We only keep the cache elements in elementOrderMap
       final CacheElement cacheElement = elementOrderMap.get(type);
       if (null != cacheElement) {
@@ -220,7 +218,7 @@ public class XmlUtils {
    * @since 8.1
    */
   private static int getElementOrder(final LinkedHashMap<String, CacheElement> elementOrderMap, final String namespace, final String type) {
-    if (CacheXml.NAMESPACE.equals(namespace)) {
+    if (CacheXml.GEODE_NAMESPACE.equals(namespace)) {
       // We only keep the cache elements in elementOrderMap
       final CacheElement cacheElement = elementOrderMap.get(type);
       if (null != cacheElement) {


Mime
View raw message