[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Mon Oct 30 15:54:39 UTC 2006


gordonp
Mon Oct 30 10:54:39 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv25276/main/org/biomoby/shared/data

Modified Files:
	MobyDataObject.java 
Log Message:
Checked for freak condition that no data type has been assigned to the object before printing
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObject.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java	2006/10/26 00:31:21	1.10
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java	2006/10/30 15:54:39	1.11
@@ -559,7 +559,15 @@
 	    }
 
 	    // One-tag representation, since it doesn't have any CRIB or PIB to enclose
-	    return "<" + getDataType().getName() +" " + getAttrXML() + "/>";
+	    if(getDataType() == null){
+                // If the data type is null, there must be something wrong
+                // with fetching the ontology RDF from MOBY Central.  At the very
+                // least, we know the thing must be an Object.
+                return "<Object " + getAttrXML() + "/>";
+            }
+            else{
+	        return "<" + getDataType().getName() +" " + getAttrXML() + "/>";
+            }
 	}
 	else{
 	    // Override super because article name is not actually important to us




More information about the MOBY-guts mailing list