first attempt at object build.
[vamsas.git] / src / org / vamsas / client / objects / SequenceDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.client.objects;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
18
19 /**
20  * Class SequenceDescriptor.
21  * 
22  * @version $Revision$ $Date$
23  */
24 public class SequenceDescriptor extends org.vamsas.client.objects.SequenceTypeDescriptor {
25
26
27       //--------------------------/
28      //- Class/Member Variables -/
29     //--------------------------/
30
31     /**
32      * Field nsPrefix
33      */
34     private java.lang.String nsPrefix;
35
36     /**
37      * Field nsURI
38      */
39     private java.lang.String nsURI;
40
41     /**
42      * Field xmlName
43      */
44     private java.lang.String xmlName;
45
46     /**
47      * Field identity
48      */
49     private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52       //----------------/
53      //- Constructors -/
54     //----------------/
55
56     public SequenceDescriptor() 
57      {
58         super();
59         setExtendsWithoutFlatten(new org.vamsas.client.objects.SequenceTypeDescriptor());
60         nsURI = "http://www.vamsas.org";
61         xmlName = "Sequence";
62         org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
63         org.exolab.castor.mapping.FieldHandler             handler        = null;
64         org.exolab.castor.xml.FieldValidator               fieldValidator = null;
65         //-- initialize attribute descriptors
66         
67         //-- _dictionary
68         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dictionary", "dictionary", org.exolab.castor.xml.NodeType.Attribute);
69         desc.setImmutable(true);
70         handler = new org.exolab.castor.xml.XMLFieldHandler() {
71             public java.lang.Object getValue( java.lang.Object object ) 
72                 throws IllegalStateException
73             {
74                 Sequence target = (Sequence) object;
75                 return target.getDictionary();
76             }
77             public void setValue( java.lang.Object object, java.lang.Object value) 
78                 throws IllegalStateException, IllegalArgumentException
79             {
80                 try {
81                     Sequence target = (Sequence) object;
82                     target.setDictionary( (java.lang.String) value);
83                 }
84                 catch (java.lang.Exception ex) {
85                     throw new IllegalStateException(ex.toString());
86                 }
87             }
88             public java.lang.Object newInstance( java.lang.Object parent ) {
89                 return null;
90             }
91         };
92         desc.setHandler(handler);
93         desc.setMultivalued(false);
94         addFieldDescriptor(desc);
95         
96         //-- validation code for: _dictionary
97         fieldValidator = new org.exolab.castor.xml.FieldValidator();
98         { //-- local scope
99             StringValidator typeValidator = new StringValidator();
100             typeValidator.setWhiteSpace("preserve");
101             fieldValidator.setValidator(typeValidator);
102         }
103         desc.setValidator(fieldValidator);
104         //-- _id
105         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
106         this.identity = desc;
107         handler = new org.exolab.castor.xml.XMLFieldHandler() {
108             public java.lang.Object getValue( java.lang.Object object ) 
109                 throws IllegalStateException
110             {
111                 Sequence target = (Sequence) object;
112                 return target.getId();
113             }
114             public void setValue( java.lang.Object object, java.lang.Object value) 
115                 throws IllegalStateException, IllegalArgumentException
116             {
117                 try {
118                     Sequence target = (Sequence) object;
119                     target.setId( (java.lang.String) value);
120                 }
121                 catch (java.lang.Exception ex) {
122                     throw new IllegalStateException(ex.toString());
123                 }
124             }
125             public java.lang.Object newInstance( java.lang.Object parent ) {
126                 return new java.lang.String();
127             }
128         };
129         desc.setHandler(handler);
130         desc.setRequired(true);
131         desc.setMultivalued(false);
132         addFieldDescriptor(desc);
133         
134         //-- validation code for: _id
135         fieldValidator = new org.exolab.castor.xml.FieldValidator();
136         fieldValidator.setMinOccurs(1);
137         { //-- local scope
138         }
139         desc.setValidator(fieldValidator);
140         //-- initialize element descriptors
141         
142     } //-- org.vamsas.client.objects.SequenceDescriptor()
143
144
145       //-----------/
146      //- Methods -/
147     //-----------/
148
149     /**
150      * Method getAccessMode
151      * 
152      * 
153      * 
154      * @return AccessMode
155      */
156     public org.exolab.castor.mapping.AccessMode getAccessMode()
157     {
158         return null;
159     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
160
161     /**
162      * Method getExtends
163      * 
164      * 
165      * 
166      * @return ClassDescriptor
167      */
168     public org.exolab.castor.mapping.ClassDescriptor getExtends()
169     {
170         return super.getExtends();
171     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
172
173     /**
174      * Method getIdentity
175      * 
176      * 
177      * 
178      * @return FieldDescriptor
179      */
180     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
181     {
182         if (identity == null)
183             return super.getIdentity();
184         return identity;
185     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
186
187     /**
188      * Method getJavaClass
189      * 
190      * 
191      * 
192      * @return Class
193      */
194     public java.lang.Class getJavaClass()
195     {
196         return org.vamsas.client.objects.Sequence.class;
197     } //-- java.lang.Class getJavaClass() 
198
199     /**
200      * Method getNameSpacePrefix
201      * 
202      * 
203      * 
204      * @return String
205      */
206     public java.lang.String getNameSpacePrefix()
207     {
208         return nsPrefix;
209     } //-- java.lang.String getNameSpacePrefix() 
210
211     /**
212      * Method getNameSpaceURI
213      * 
214      * 
215      * 
216      * @return String
217      */
218     public java.lang.String getNameSpaceURI()
219     {
220         return nsURI;
221     } //-- java.lang.String getNameSpaceURI() 
222
223     /**
224      * Method getValidator
225      * 
226      * 
227      * 
228      * @return TypeValidator
229      */
230     public org.exolab.castor.xml.TypeValidator getValidator()
231     {
232         return this;
233     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
234
235     /**
236      * Method getXMLName
237      * 
238      * 
239      * 
240      * @return String
241      */
242     public java.lang.String getXMLName()
243     {
244         return xmlName;
245     } //-- java.lang.String getXMLName() 
246
247 }