[MOBY-guts] biomoby commit
Martin Senger
senger at dev.open-bio.org
Sun Mar 2 18:47:35 UTC 2008
senger
Sun Mar 2 13:47:35 EST 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes
In directory dev.open-bio.org:/tmp/cvs-serv1415/src/main/org/biomoby/shared/datatypes
Modified Files:
MobyObject.java
Log Message:
Fixed cross references by primitive types
moby-live/Java/src/main/org/biomoby/shared/datatypes MobyObject.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.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/datatypes/MobyObject.java 2008/03/02 12:45:26 1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.java 2008/03/02 18:47:35 1.8
@@ -62,7 +62,7 @@
protected String name = ""; // articleName
protected String value = "";
protected MobyProvisionInfo provision;
- protected Vector xrefs = new Vector(); // of type MobyXref
+ protected Vector<MobyXref> xrefs = new Vector<MobyXref>();
protected boolean isValueCDATA = false;
// is this a primitive type?
@@ -153,7 +153,6 @@
if (provision != null)
elem.addContent (JDOMUtils.toXMLElement(provision));
-
if (xrefs.size() > 0) {
Element crElem = MobyPackage.getXMLElement (MobyTags.CROSSREFERENCE);
for (Enumeration en = xrefs.elements(); en.hasMoreElements(); )
@@ -165,7 +164,7 @@
if (isValueCDATA)
elem.addContent (new CDATA (value));
else
- elem.setText (value);
+ elem.addContent (value);
}
return elem;
@@ -286,7 +285,7 @@
*************************************************************************/
public void setXrefs (MobyXref[] xrefs) {
if (xrefs != null) {
- this.xrefs = new Vector();
+ this.xrefs = new Vector<MobyXref>();
for (int i = 0; i < xrefs.length; i++)
this.xrefs.addElement (xrefs[i]);
}
More information about the MOBY-guts
mailing list