[rhmessaging-commits] rhmessaging commits: r2522 - mgmt/trunk/mint/python/mint.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Sep 22 14:23:12 EDT 2008


Author: nunofsantos
Date: 2008-09-22 14:23:12 -0400 (Mon, 22 Sep 2008)
New Revision: 2522

Modified:
   mgmt/trunk/mint/python/mint/schemaparser.py
Log:
temporary handling of namespace info in references; store absTime type values in a TimestampCol

Modified: mgmt/trunk/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/trunk/mint/python/mint/schemaparser.py	2008-09-22 17:20:08 UTC (rev 2521)
+++ mgmt/trunk/mint/python/mint/schemaparser.py	2008-09-22 18:23:12 UTC (rev 2522)
@@ -24,14 +24,14 @@
     self.dataTypesMap["uint32"] = self.dataTypesMap["hilo32"] = self.dataTypesMap["count32"] = self.dataTypesMap["mma32"] = self.dataTypesMap["atomic32"] = "IntCol"
     self.dataTypesMap["uint64"] = self.dataTypesMap["hilo64"] = self.dataTypesMap["count64"] = self.dataTypesMap["mma64"] = self.dataTypesMap["mmaTime"] = "BigIntCol"
     self.dataTypesMap["float"] = self.dataTypesMap["double"] = "FloatCol"
-    self.dataTypesMap["absTime"] = self.dataTypesMap["deltaTime"] = "BigIntCol"
+    self.dataTypesMap["absTime"] = "TimestampCol"
+    self.dataTypesMap["deltaTime"] = "BigIntCol"
     self.dataTypesMap["bool"] = "BoolCol"
     self.dataTypesMap["sstr"] = self.dataTypesMap["lstr"] = "StringCol"
     self.dataTypesMap["map"] = "PickleCol"
     # mapping for identifiers in the XML schema that are reserved words in either SQL or Python
     self.reservedWords = {"in": "inRsv", "In": "InRsv", 
-                          "connection": "clientConnection", "Connection": "ClientConnection", 
-                          "other": "otherRsv"}
+                          "connection": "clientConnection", "Connection": "ClientConnection"}
 
   def renameReservedWord(self, name):
     if (name in self.reservedWords.keys()):
@@ -92,8 +92,10 @@
       elemName = self.renameReservedWord(elem["@name"])
       if (elem["@type"] == "objId"):
         reference = elem["@references"]
-        # handle cases where the referenced class is in a different namespace (ie, contains a ".")
-        namespaceIndex = reference.find(".")
+        #XXX: TO-DO: properly handle namespaces
+        # handle cases where the referenced class is in a different namespace (ie, contains a ".");
+        # for now, discard namespace
+        namespaceIndex = reference.rfind(".")
         if (namespaceIndex > 0):
           reference = reference[namespaceIndex + 1:]
         reference = self.style.dbTableToPythonClass(reference)




More information about the rhmessaging-commits mailing list