[MOBY-guts] biomoby commit
Yan Wong
yanwong at pub.open-bio.org
Thu Feb 17 13:20:38 UTC 2005
yanwong
Thu Feb 17 08:20:37 EST 2005
Update of /home/repository/moby/moby-live/Python/bioMoby
In directory pub.open-bio.org:/tmp/cvs-serv17142/bioMoby
Modified Files:
mobyDataTypes.py
Log Message:
Corrected a bug in Mobycontent that prevent it to fill the properties servicenotes and authority
moby-live/Python/bioMoby mobyDataTypes.py,1.15,1.16
===================================================================
RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/02/16 15:38:46 1.15
+++ /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py 2005/02/17 13:20:37 1.16
@@ -364,6 +364,27 @@
if isinstance(xmlObject, str):
doc=parseString(xmlObject)
+ #Get the authority
+ authnode=doc.getElementsByTagName("mobyContent")
+
+ if not authnode:
+ authnode=doc.getElementsByTagName("moby:mobyContent")
+
+ if authnode:
+ self.authority=authnode[0].getAttribute("authority")
+
+ if self.authority=="":
+ self.authority=authnode[0].getAttribute("moby:authority")
+
+ #Get the service notes
+ servicenodes=doc.getElementsByTagName("serviceNotes")
+
+ if not servicenodes:
+ servicenodes=doc.getElementsByTagName("moby:serviceNotes")
+
+ if servicenodes and servicenodes[0].firstChild:
+ self.servicenotes=servicenodes[0].firstChild.nodeValue
+
mdl=doc.getElementsByTagName('mobyData')
if not mdl:
More information about the MOBY-guts
mailing list