[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Mon Dec 11 18:58:58 UTC 2006
gordonp
Mon Dec 11 13:58:58 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv643/src/main/org/biomoby/shared/data
Modified Files:
MobyDataObjectSetSAI.java MobyContentInstance.java
Log Message:
Fixed collection instance naming bug
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObjectSetSAI.java,1.1,1.2 MobyContentInstance.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSetSAI.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSetSAI.java 2006/07/07 04:12:40 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObjectSetSAI.java 2006/12/11 18:58:58 1.2
@@ -116,7 +116,7 @@
}
public int hashCode(){
- return dataInstance.hashCode();
+ return dataInstance == null ? super.hashCode() : dataInstance.hashCode();
}
public void clear(){
@@ -164,6 +164,13 @@
}
public String toXML(){
- return dataInstance.toXML();
+ // We have to temporarily rename the data instance, because it's XML
+ // representation in service mode should include the article name set
+ // for this object instance, not the data instance
+ String oldName = dataInstance.getName();
+ dataInstance.setName(getName());
+ String result = dataInstance.toXML();
+ dataInstance.setName(oldName);
+ return result;
}
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyContentInstance.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyContentInstance.java 2006/12/06 16:07:10 1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyContentInstance.java 2006/12/11 18:58:58 1.8
@@ -443,7 +443,13 @@
dataObject.toXML()+
"</Simple>");
}
- // Either a collection or a secondary input parameter
+ else if(dataObject instanceof MobyDataObjectSet){
+ String oldName = dataObject.getName();
+ dataObject.setName(paramName);
+ xml.append(dataObject.toXML());
+ dataObject.setName(oldName);
+ }
+ // a secondary input parameter
else{
xml.append(dataObject.toXML());
}
More information about the MOBY-guts
mailing list