[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Thu Oct 26 00:31:21 UTC 2006
gordonp
Wed Oct 25 20:31:21 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv14842/src/main/org/biomoby/shared/data
Modified Files:
MobyDataObject.java
Log Message:
Fixed issue related to article names causing cached service lookups to fail match
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObject.java,1.9,1.10
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java 2006/07/07 04:12:40 1.9
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java 2006/10/26 00:31:21 1.10
@@ -562,7 +562,28 @@
return "<" + getDataType().getName() +" " + getAttrXML() + "/>";
}
else{
- return super.toXML();
+ // Override super because article name is not actually important to us
+ // but will cause cache misses for MOBY Central calls since the xml
+ // is used as a key in the call cache.
+ StringBuffer buf = new StringBuffer();
+ buf.append ("<Simple articleName=\"not_important\">\n");
+ buf.append ("<objectType>");
+ if (getDataType() != null) buf.append (getDataType().getName());
+ buf.append ("</objectType>\n");
+ if (namespaces.size() > 0) {
+ for (java.util.Enumeration en = namespaces.elements(); en.hasMoreElements(); ) {
+ MobyNamespace ns = (MobyNamespace)en.nextElement();
+ if(ns != null){
+ buf.append ("<Namespace>");
+ buf.append ( ns.getName() );
+ buf.append ("</Namespace>");
+ }
+ }
+ }
+ buf.append ("</Simple>");
+ buf.append ("\n");
+ return buf.toString();
+ //return super.toXML();
}
}
More information about the MOBY-guts
mailing list