X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FSequenceSetDescriptor.java;h=70ad2dc8a3b0a7909893a8333777a9bb6f963e1d;hb=371f4bc519ea38c78f1c6f003df82769c130ac2e;hp=1e6c7b5d5371c55c3d2f0cff24816bb21d12dd68;hpb=65df62f4b048a1615d32ea2c3576082ad2b63af8;p=jalview.git diff --git a/src/jalview/schemabinding/version2/SequenceSetDescriptor.java b/src/jalview/schemabinding/version2/SequenceSetDescriptor.java index 1e6c7b5..70ad2dc 100755 --- a/src/jalview/schemabinding/version2/SequenceSetDescriptor.java +++ b/src/jalview/schemabinding/version2/SequenceSetDescriptor.java @@ -103,47 +103,6 @@ public class SequenceSetDescriptor extends org.exolab.castor.xml.util.XMLClassDe fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _aligned - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_aligned", "aligned", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - SequenceSet target = (SequenceSet) object; - if(!target.hasAligned()) - return null; - return (target.getAligned() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - SequenceSet target = (SequenceSet) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteAligned(); - return; - } - target.setAligned( ((java.lang.Boolean)value).booleanValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - } ); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _aligned - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _sequenceList @@ -172,13 +131,12 @@ public class SequenceSetDescriptor extends org.exolab.castor.xml.util.XMLClassDe } ); desc.setHandler(handler); desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setRequired(true); desc.setMultivalued(true); addFieldDescriptor(desc); //-- validation code for: _sequenceList fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); + fieldValidator.setMinOccurs(0); { //-- local scope } desc.setValidator(fieldValidator);