f005ce6849aaefe7c68c879c47fa6b2552f27886
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / PdbidsDescriptor.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.Pdbids;
15
16 /**
17  * Class PdbidsDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class PdbidsDescriptor extends jalview.schemabinding.version2.descriptors.PdbentryDescriptor {
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 PdbidsDescriptor() {
54         super();
55         setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.PdbentryDescriptor());
56         _nsURI = "www.jalview.org";
57         _xmlName = "pdbids";
58         _elementDefinition = true;
59         
60         //-- set grouping compositor
61         setCompositorAsSequence();
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         //-- initialize element descriptors
68         
69         //-- _structureStateList
70         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.StructureState.class, "_structureStateList", "structureState", org.exolab.castor.xml.NodeType.Element);
71         handler = new org.exolab.castor.xml.XMLFieldHandler() {
72             public java.lang.Object getValue( java.lang.Object object ) 
73                 throws IllegalStateException
74             {
75                 Pdbids target = (Pdbids) object;
76                 return target.getStructureState();
77             }
78             public void setValue( java.lang.Object object, java.lang.Object value) 
79                 throws IllegalStateException, IllegalArgumentException
80             {
81                 try {
82                     Pdbids target = (Pdbids) object;
83                     target.addStructureState( (jalview.schemabinding.version2.StructureState) value);
84                 } catch (java.lang.Exception ex) {
85                     throw new IllegalStateException(ex.toString());
86                 }
87             }
88             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
89                 try {
90                     Pdbids target = (Pdbids) object;
91                     target.removeAllStructureState();
92                 } catch (java.lang.Exception ex) {
93                     throw new IllegalStateException(ex.toString());
94                 }
95             }
96             public java.lang.Object newInstance(java.lang.Object parent) {
97                 return new jalview.schemabinding.version2.StructureState();
98             }
99         };
100         desc.setHandler(handler);
101         desc.setNameSpaceURI("www.jalview.org");
102         desc.setMultivalued(true);
103         addFieldDescriptor(desc);
104         
105         //-- validation code for: _structureStateList
106         fieldValidator = new org.exolab.castor.xml.FieldValidator();
107         fieldValidator.setMinOccurs(0);
108         { //-- local scope
109         }
110         desc.setValidator(fieldValidator);
111     }
112
113
114       //-----------/
115      //- Methods -/
116     //-----------/
117
118     /**
119      * Method getAccessMode.
120      * 
121      * @return the access mode specified for this class.
122      */
123     public org.exolab.castor.mapping.AccessMode getAccessMode(
124     ) {
125         return null;
126     }
127
128     /**
129      * Method getIdentity.
130      * 
131      * @return the identity field, null if this class has no
132      * identity.
133      */
134     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
135     ) {
136         return super.getIdentity();
137     }
138
139     /**
140      * Method getJavaClass.
141      * 
142      * @return the Java class represented by this descriptor.
143      */
144     public java.lang.Class getJavaClass(
145     ) {
146         return jalview.schemabinding.version2.Pdbids.class;
147     }
148
149     /**
150      * Method getNameSpacePrefix.
151      * 
152      * @return the namespace prefix to use when marshaling as XML.
153      */
154     public java.lang.String getNameSpacePrefix(
155     ) {
156         return _nsPrefix;
157     }
158
159     /**
160      * Method getNameSpaceURI.
161      * 
162      * @return the namespace URI used when marshaling and
163      * unmarshaling as XML.
164      */
165     public java.lang.String getNameSpaceURI(
166     ) {
167         return _nsURI;
168     }
169
170     /**
171      * Method getValidator.
172      * 
173      * @return a specific validator for the class described by this
174      * ClassDescriptor.
175      */
176     public org.exolab.castor.xml.TypeValidator getValidator(
177     ) {
178         return this;
179     }
180
181     /**
182      * Method getXMLName.
183      * 
184      * @return the XML Name for the Class being described.
185      */
186     public java.lang.String getXMLName(
187     ) {
188         return _xmlName;
189     }
190
191     /**
192      * Method isElementDefinition.
193      * 
194      * @return true if XML schema definition of this Class is that
195      * of a global
196      * element or element with anonymous type definition.
197      */
198     public boolean isElementDefinition(
199     ) {
200         return _elementDefinition;
201     }
202
203 }