[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Fri Jul 27 21:44:22 UTC 2007


gordonp
Fri Jul 27 17:44:22 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv26284/src/main/org/biomoby/shared/data

Modified Files:
	MobyDataObject.java 
Log Message:
Made articleName searching deeper: if encapsulating simple tag doesn't name an item (e.g. when in a collection), try grabbing the name from the object element itself
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObject.java,1.18,1.19
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java	2007/07/06 22:11:01	1.18
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java	2007/07/27 21:44:21	1.19
@@ -256,6 +256,11 @@
 	// A top level object whose name is in the enclosing simple tag
 	if(p != null && (p instanceof Element) && ((Element) p).getTagName().equals(MobyTags.SIMPLE)){
 	    name = MobyPrefixResolver.getAttr((Element) p, MobyTags.ARTICLENAME);
+	    if(name != null && name.length() > 0){
+		return name;
+	    }
+	    // If the simple doesn't have a name, grab the name from the child tag
+	    name = MobyPrefixResolver.getAttr(e, MobyTags.ARTICLENAME);
 	    return name == null ? "" : name;
 	}
 	// Part of a composite, subobject's name is in its own tag




More information about the MOBY-guts mailing list