From 5e0f3c18113cd8c1ab36fa883bc24b373eeb5899 Mon Sep 17 00:00:00 2001 From: jprocter Date: Sun, 24 Feb 2008 19:52:19 +0000 Subject: [PATCH] sequenceId is a string, not an integer - allows generation of unlimited unique sequential sequence Ids --- .../version2/descriptors/JGroupDescriptor.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java index adde010..21b3b67 100644 --- a/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java @@ -607,7 +607,8 @@ public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip //-- initialize element descriptors //-- _seqList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_seqList", "seq", org.exolab.castor.xml.NodeType.Element); + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_seqList", "seq", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException @@ -620,10 +621,7 @@ public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip { try { JGroup target = (JGroup) object; - // ignore null values for non optional primitives - if (value == null) { return; } - - target.addSeq( ((java.lang.Integer) value).intValue()); + target.addSeq( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -650,11 +648,10 @@ public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope - org.exolab.castor.xml.validators.IntValidator typeValidator; - typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); fieldValidator.setValidator(typeValidator); - typeValidator.setMinInclusive(-2147483648); - typeValidator.setMaxInclusive(2147483647); + typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); } -- 1.7.10.2