2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2.descriptors;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import jalview.schemabinding.version2.Sequence;
17 * Class SequenceDescriptor.
19 * @version $Revision$ $Date$
21 public class SequenceDescriptor extends
22 jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
30 * Field _elementDefinition.
32 private boolean _elementDefinition;
37 private java.lang.String _nsPrefix;
42 private java.lang.String _nsURI;
47 private java.lang.String _xmlName;
53 public SequenceDescriptor()
56 setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor());
57 _nsURI = "www.vamsas.ac.uk/jalview/version2";
58 _xmlName = "Sequence";
59 _elementDefinition = true;
61 // -- set grouping compositor
62 setCompositorAsSequence();
63 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64 org.exolab.castor.mapping.FieldHandler handler = null;
65 org.exolab.castor.xml.FieldValidator fieldValidator = null;
66 // -- initialize attribute descriptors
69 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
70 java.lang.String.class, "_dsseqid", "dsseqid",
71 org.exolab.castor.xml.NodeType.Attribute);
72 desc.setImmutable(true);
73 handler = new org.exolab.castor.xml.XMLFieldHandler()
75 public java.lang.Object getValue(java.lang.Object object)
76 throws IllegalStateException
78 Sequence target = (Sequence) object;
79 return target.getDsseqid();
82 public void setValue(java.lang.Object object, java.lang.Object value)
83 throws IllegalStateException, IllegalArgumentException
87 Sequence target = (Sequence) object;
88 target.setDsseqid((java.lang.String) value);
89 } catch (java.lang.Exception ex)
91 throw new IllegalStateException(ex.toString());
95 public java.lang.Object newInstance(java.lang.Object parent)
100 desc.setHandler(handler);
101 desc.setMultivalued(false);
102 addFieldDescriptor(desc);
104 // -- validation code for: _dsseqid
105 fieldValidator = new org.exolab.castor.xml.FieldValidator();
107 org.exolab.castor.xml.validators.StringValidator typeValidator;
108 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
109 fieldValidator.setValidator(typeValidator);
110 typeValidator.setWhiteSpace("preserve");
112 desc.setValidator(fieldValidator);
113 // -- initialize element descriptors
116 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
117 jalview.schemabinding.version2.DBRef.class, "_DBRefList",
118 "DBRef", org.exolab.castor.xml.NodeType.Element);
119 handler = new org.exolab.castor.xml.XMLFieldHandler()
121 public java.lang.Object getValue(java.lang.Object object)
122 throws IllegalStateException
124 Sequence target = (Sequence) object;
125 return target.getDBRef();
128 public void setValue(java.lang.Object object, java.lang.Object value)
129 throws IllegalStateException, IllegalArgumentException
133 Sequence target = (Sequence) object;
134 target.addDBRef((jalview.schemabinding.version2.DBRef) value);
135 } catch (java.lang.Exception ex)
137 throw new IllegalStateException(ex.toString());
141 public void resetValue(Object object) throws IllegalStateException,
142 IllegalArgumentException
146 Sequence target = (Sequence) object;
147 target.removeAllDBRef();
148 } catch (java.lang.Exception ex)
150 throw new IllegalStateException(ex.toString());
154 public java.lang.Object newInstance(java.lang.Object parent)
156 return new jalview.schemabinding.version2.DBRef();
159 desc.setHandler(handler);
160 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
161 desc.setMultivalued(true);
162 addFieldDescriptor(desc);
164 // -- validation code for: _DBRefList
165 fieldValidator = new org.exolab.castor.xml.FieldValidator();
166 fieldValidator.setMinOccurs(0);
169 desc.setValidator(fieldValidator);
177 * Method getAccessMode.
179 * @return the access mode specified for this class.
181 public org.exolab.castor.mapping.AccessMode getAccessMode()
187 * Method getIdentity.
189 * @return the identity field, null if this class has no identity.
191 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
193 return super.getIdentity();
197 * Method getJavaClass.
199 * @return the Java class represented by this descriptor.
201 public java.lang.Class getJavaClass()
203 return jalview.schemabinding.version2.Sequence.class;
207 * Method getNameSpacePrefix.
209 * @return the namespace prefix to use when marshaling as XML.
211 public java.lang.String getNameSpacePrefix()
217 * Method getNameSpaceURI.
219 * @return the namespace URI used when marshaling and unmarshaling as XML.
221 public java.lang.String getNameSpaceURI()
227 * Method getValidator.
229 * @return a specific validator for the class described by this
232 public org.exolab.castor.xml.TypeValidator getValidator()
240 * @return the XML Name for the Class being described.
242 public java.lang.String getXMLName()
248 * Method isElementDefinition.
250 * @return true if XML schema definition of this Class is that of a global
251 * element or element with anonymous type definition.
253 public boolean isElementDefinition()
255 return _elementDefinition;