[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Mon Dec 11 18:59:36 UTC 2006


gordonp
Mon Dec 11 13:59:36 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv690/src/main/org/biomoby/shared/data

Modified Files:
	MobyDataObjectSet.java 
Log Message:
Set default mode to match other instance objects (central, not service)
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObjectSet.java,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSet.java	2006/07/07 04:12:40	1.5
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSet.java	2006/12/11 18:59:36	1.6
@@ -30,7 +30,7 @@
 public class MobyDataObjectSet extends MobyPrimaryDataSet implements MobyDataInstance, Collection<MobyDataObject>{
 
     Vector bag;
-    private int xmlMode = MobyDataInstance.SERVICE_XML_MODE;
+    private int xmlMode = MobyDataInstance.CENTRAL_XML_MODE;
 
     public MobyDataObjectSet(org.w3c.dom.Element e) throws MobyException{
 	this(MobyDataObject.getName(e), getChildren(e));	
@@ -396,7 +396,7 @@
      * Implemented solely because of the general contract that c1.equals(c2) implies that c1.hashCode()==c2.hashCode()
      */
     public int hashCode(){
-	return bag.hashCode();
+	return bag == null ? super.hashCode() : bag.hashCode();
     }
 
     /**
@@ -504,7 +504,7 @@
     public int getXmlMode(){
 	return xmlMode;
     }
-    
+
     /**
      * Wraps the simple instances' XML in a MOBY Collection tag
      */




More information about the MOBY-guts mailing list