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
22 org.exolab.castor.xml.util.XMLClassDescriptorImpl
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 SequenceSetPropertiesDescriptor()
56 _nsURI = "www.vamsas.ac.uk/jalview/version2";
57 _xmlName = "sequenceSetProperties";
58 _elementDefinition = true;
59 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60 org.exolab.castor.mapping.FieldHandler handler = null;
61 org.exolab.castor.xml.FieldValidator fieldValidator = null;
62 // -- initialize attribute descriptors
65 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66 java.lang.String.class, "_key", "key",
67 org.exolab.castor.xml.NodeType.Attribute);
68 desc.setImmutable(true);
69 handler = new org.exolab.castor.xml.XMLFieldHandler()
71 public java.lang.Object getValue(java.lang.Object object)
72 throws IllegalStateException
74 SequenceSetProperties target = (SequenceSetProperties) object;
75 return target.getKey();
78 public void setValue(java.lang.Object object, java.lang.Object value)
79 throws IllegalStateException, IllegalArgumentException
83 SequenceSetProperties target = (SequenceSetProperties) object;
84 target.setKey((java.lang.String) value);
85 } catch (java.lang.Exception ex)
87 throw new IllegalStateException(ex.toString());
91 public java.lang.Object newInstance(java.lang.Object parent)
96 desc.setHandler(handler);
97 desc.setMultivalued(false);
98 addFieldDescriptor(desc);
100 // -- validation code for: _key
101 fieldValidator = new org.exolab.castor.xml.FieldValidator();
103 org.exolab.castor.xml.validators.StringValidator typeValidator;
104 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
105 fieldValidator.setValidator(typeValidator);
106 typeValidator.setWhiteSpace("preserve");
108 desc.setValidator(fieldValidator);
110 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
111 java.lang.String.class, "_value", "value",
112 org.exolab.castor.xml.NodeType.Attribute);
113 desc.setImmutable(true);
114 handler = new org.exolab.castor.xml.XMLFieldHandler()
116 public java.lang.Object getValue(java.lang.Object object)
117 throws IllegalStateException
119 SequenceSetProperties target = (SequenceSetProperties) object;
120 return target.getValue();
123 public void setValue(java.lang.Object object, java.lang.Object value)
124 throws IllegalStateException, IllegalArgumentException
128 SequenceSetProperties target = (SequenceSetProperties) object;
129 target.setValue((java.lang.String) value);
130 } catch (java.lang.Exception ex)
132 throw new IllegalStateException(ex.toString());
136 public java.lang.Object newInstance(java.lang.Object parent)
141 desc.setHandler(handler);
142 desc.setMultivalued(false);
143 addFieldDescriptor(desc);
145 // -- validation code for: _value
146 fieldValidator = new org.exolab.castor.xml.FieldValidator();
148 org.exolab.castor.xml.validators.StringValidator typeValidator;
149 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
150 fieldValidator.setValidator(typeValidator);
151 typeValidator.setWhiteSpace("preserve");
153 desc.setValidator(fieldValidator);
154 // -- initialize element descriptors
163 * Method getAccessMode.
165 * @return the access mode specified for this class.
167 public org.exolab.castor.mapping.AccessMode getAccessMode()
173 * Method getIdentity.
175 * @return the identity field, null if this class has no identity.
177 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
179 return super.getIdentity();
183 * Method getJavaClass.
185 * @return the Java class represented by this descriptor.
187 public java.lang.Class getJavaClass()
189 return jalview.schemabinding.version2.SequenceSetProperties.class;
193 * Method getNameSpacePrefix.
195 * @return the namespace prefix to use when marshaling as XML.
197 public java.lang.String getNameSpacePrefix()
203 * Method getNameSpaceURI.
205 * @return the namespace URI used when marshaling and unmarshaling as XML.
207 public java.lang.String getNameSpaceURI()
213 * Method getValidator.
215 * @return a specific validator for the class described by this
218 public org.exolab.castor.xml.TypeValidator getValidator()
226 * @return the XML Name for the Class being described.
228 public java.lang.String getXMLName()
234 * Method isElementDefinition.
236 * @return true if XML schema definition of this Class is that of a global
237 * element or element with anonymous type definition.
239 public boolean isElementDefinition()
241 return _elementDefinition;