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.SequenceSetProperties;
17 * Class SequenceSetPropertiesDescriptor.
19 * @version $Revision$ $Date$
21 public class SequenceSetPropertiesDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
24 //--------------------------/
25 //- Class/Member Variables -/
26 //--------------------------/
29 * Field _elementDefinition.
31 private boolean _elementDefinition;
36 private java.lang.String _nsPrefix;
41 private java.lang.String _nsURI;
46 private java.lang.String _xmlName;
53 public SequenceSetPropertiesDescriptor() {
55 _nsURI = "www.vamsas.ac.uk/jalview/version2";
56 _xmlName = "sequenceSetProperties";
57 _elementDefinition = true;
58 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
59 org.exolab.castor.mapping.FieldHandler handler = null;
60 org.exolab.castor.xml.FieldValidator fieldValidator = null;
61 //-- initialize attribute descriptors
64 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute);
65 desc.setImmutable(true);
66 handler = new org.exolab.castor.xml.XMLFieldHandler() {
67 public java.lang.Object getValue( java.lang.Object object )
68 throws IllegalStateException
70 SequenceSetProperties target = (SequenceSetProperties) object;
71 return target.getKey();
73 public void setValue( java.lang.Object object, java.lang.Object value)
74 throws IllegalStateException, IllegalArgumentException
77 SequenceSetProperties target = (SequenceSetProperties) object;
78 target.setKey( (java.lang.String) value);
79 } catch (java.lang.Exception ex) {
80 throw new IllegalStateException(ex.toString());
83 public java.lang.Object newInstance(java.lang.Object parent) {
87 desc.setHandler(handler);
88 desc.setMultivalued(false);
89 addFieldDescriptor(desc);
91 //-- validation code for: _key
92 fieldValidator = new org.exolab.castor.xml.FieldValidator();
94 org.exolab.castor.xml.validators.StringValidator typeValidator;
95 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
96 fieldValidator.setValidator(typeValidator);
97 typeValidator.setWhiteSpace("preserve");
99 desc.setValidator(fieldValidator);
101 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute);
102 desc.setImmutable(true);
103 handler = new org.exolab.castor.xml.XMLFieldHandler() {
104 public java.lang.Object getValue( java.lang.Object object )
105 throws IllegalStateException
107 SequenceSetProperties target = (SequenceSetProperties) object;
108 return target.getValue();
110 public void setValue( java.lang.Object object, java.lang.Object value)
111 throws IllegalStateException, IllegalArgumentException
114 SequenceSetProperties target = (SequenceSetProperties) object;
115 target.setValue( (java.lang.String) value);
116 } catch (java.lang.Exception ex) {
117 throw new IllegalStateException(ex.toString());
120 public java.lang.Object newInstance(java.lang.Object parent) {
124 desc.setHandler(handler);
125 desc.setMultivalued(false);
126 addFieldDescriptor(desc);
128 //-- validation code for: _value
129 fieldValidator = new org.exolab.castor.xml.FieldValidator();
131 org.exolab.castor.xml.validators.StringValidator typeValidator;
132 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
133 fieldValidator.setValidator(typeValidator);
134 typeValidator.setWhiteSpace("preserve");
136 desc.setValidator(fieldValidator);
137 //-- initialize element descriptors
147 * Method getAccessMode.
149 * @return the access mode specified for this class.
151 public org.exolab.castor.mapping.AccessMode getAccessMode(
157 * Method getIdentity.
159 * @return the identity field, null if this class has no
162 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
164 return super.getIdentity();
168 * Method getJavaClass.
170 * @return the Java class represented by this descriptor.
172 public java.lang.Class getJavaClass(
174 return jalview.schemabinding.version2.SequenceSetProperties.class;
178 * Method getNameSpacePrefix.
180 * @return the namespace prefix to use when marshaling as XML.
182 public java.lang.String getNameSpacePrefix(
188 * Method getNameSpaceURI.
190 * @return the namespace URI used when marshaling and
191 * unmarshaling as XML.
193 public java.lang.String getNameSpaceURI(
199 * Method getValidator.
201 * @return a specific validator for the class described by this
204 public org.exolab.castor.xml.TypeValidator getValidator(
212 * @return the XML Name for the Class being described.
214 public java.lang.String getXMLName(
220 * Method isElementDefinition.
222 * @return true if XML schema definition of this Class is that
224 * element or element with anonymous type definition.
226 public boolean isElementDefinition(
228 return _elementDefinition;