5c8be838373bf5ae8e115a53ce97e83ae81cd2e5
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / SequenceSetPropertiesDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2.descriptors;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import jalview.schemabinding.version2.SequenceSetProperties;
15
16 /**
17  * Class SequenceSetPropertiesDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class SequenceSetPropertiesDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22
23
24       //--------------------------/
25      //- Class/Member Variables -/
26     //--------------------------/
27
28     /**
29      * Field _elementDefinition.
30      */
31     private boolean _elementDefinition;
32
33     /**
34      * Field _nsPrefix.
35      */
36     private java.lang.String _nsPrefix;
37
38     /**
39      * Field _nsURI.
40      */
41     private java.lang.String _nsURI;
42
43     /**
44      * Field _xmlName.
45      */
46     private java.lang.String _xmlName;
47
48
49       //----------------/
50      //- Constructors -/
51     //----------------/
52
53     public SequenceSetPropertiesDescriptor() {
54         super();
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
62         
63         //-- _key
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
69             {
70                 SequenceSetProperties target = (SequenceSetProperties) object;
71                 return target.getKey();
72             }
73             public void setValue( java.lang.Object object, java.lang.Object value) 
74                 throws IllegalStateException, IllegalArgumentException
75             {
76                 try {
77                     SequenceSetProperties target = (SequenceSetProperties) object;
78                     target.setKey( (java.lang.String) value);
79                 } catch (java.lang.Exception ex) {
80                     throw new IllegalStateException(ex.toString());
81                 }
82             }
83             public java.lang.Object newInstance(java.lang.Object parent) {
84                 return null;
85             }
86         };
87         desc.setHandler(handler);
88         desc.setMultivalued(false);
89         addFieldDescriptor(desc);
90         
91         //-- validation code for: _key
92         fieldValidator = new org.exolab.castor.xml.FieldValidator();
93         { //-- local scope
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");
98         }
99         desc.setValidator(fieldValidator);
100         //-- _value
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
106             {
107                 SequenceSetProperties target = (SequenceSetProperties) object;
108                 return target.getValue();
109             }
110             public void setValue( java.lang.Object object, java.lang.Object value) 
111                 throws IllegalStateException, IllegalArgumentException
112             {
113                 try {
114                     SequenceSetProperties target = (SequenceSetProperties) object;
115                     target.setValue( (java.lang.String) value);
116                 } catch (java.lang.Exception ex) {
117                     throw new IllegalStateException(ex.toString());
118                 }
119             }
120             public java.lang.Object newInstance(java.lang.Object parent) {
121                 return null;
122             }
123         };
124         desc.setHandler(handler);
125         desc.setMultivalued(false);
126         addFieldDescriptor(desc);
127         
128         //-- validation code for: _value
129         fieldValidator = new org.exolab.castor.xml.FieldValidator();
130         { //-- local scope
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");
135         }
136         desc.setValidator(fieldValidator);
137         //-- initialize element descriptors
138         
139     }
140
141
142       //-----------/
143      //- Methods -/
144     //-----------/
145
146     /**
147      * Method getAccessMode.
148      * 
149      * @return the access mode specified for this class.
150      */
151     public org.exolab.castor.mapping.AccessMode getAccessMode(
152     ) {
153         return null;
154     }
155
156     /**
157      * Method getIdentity.
158      * 
159      * @return the identity field, null if this class has no
160      * identity.
161      */
162     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
163     ) {
164         return super.getIdentity();
165     }
166
167     /**
168      * Method getJavaClass.
169      * 
170      * @return the Java class represented by this descriptor.
171      */
172     public java.lang.Class getJavaClass(
173     ) {
174         return jalview.schemabinding.version2.SequenceSetProperties.class;
175     }
176
177     /**
178      * Method getNameSpacePrefix.
179      * 
180      * @return the namespace prefix to use when marshaling as XML.
181      */
182     public java.lang.String getNameSpacePrefix(
183     ) {
184         return _nsPrefix;
185     }
186
187     /**
188      * Method getNameSpaceURI.
189      * 
190      * @return the namespace URI used when marshaling and
191      * unmarshaling as XML.
192      */
193     public java.lang.String getNameSpaceURI(
194     ) {
195         return _nsURI;
196     }
197
198     /**
199      * Method getValidator.
200      * 
201      * @return a specific validator for the class described by this
202      * ClassDescriptor.
203      */
204     public org.exolab.castor.xml.TypeValidator getValidator(
205     ) {
206         return this;
207     }
208
209     /**
210      * Method getXMLName.
211      * 
212      * @return the XML Name for the Class being described.
213      */
214     public java.lang.String getXMLName(
215     ) {
216         return _xmlName;
217     }
218
219     /**
220      * Method isElementDefinition.
221      * 
222      * @return true if XML schema definition of this Class is that
223      * of a global
224      * element or element with anonymous type definition.
225      */
226     public boolean isElementDefinition(
227     ) {
228         return _elementDefinition;
229     }
230
231 }