update author list in license for (JAL-826)
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / PdbidsDescriptor.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
4  *
5  * This file is part of Jalview.
6  *
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  *******************************************************************************/
18 /*
19  * This class was automatically generated with 
20  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
21  * Schema.
22  * $Id$
23  */
24
25 package jalview.schemabinding.version2.descriptors;
26
27   //---------------------------------/
28  //- Imported classes and packages -/
29 //---------------------------------/
30
31 import jalview.schemabinding.version2.Pdbids;
32
33 /**
34  * Class PdbidsDescriptor.
35  * 
36  * @version $Revision$ $Date$
37  */
38 public class PdbidsDescriptor extends jalview.schemabinding.version2.descriptors.PdbentryDescriptor {
39
40
41       //--------------------------/
42      //- Class/Member Variables -/
43     //--------------------------/
44
45     /**
46      * Field _elementDefinition.
47      */
48     private boolean _elementDefinition;
49
50     /**
51      * Field _nsPrefix.
52      */
53     private java.lang.String _nsPrefix;
54
55     /**
56      * Field _nsURI.
57      */
58     private java.lang.String _nsURI;
59
60     /**
61      * Field _xmlName.
62      */
63     private java.lang.String _xmlName;
64
65
66       //----------------/
67      //- Constructors -/
68     //----------------/
69
70     public PdbidsDescriptor() {
71         super();
72         setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.PdbentryDescriptor());
73         _nsURI = "www.jalview.org";
74         _xmlName = "pdbids";
75         _elementDefinition = true;
76         
77         //-- set grouping compositor
78         setCompositorAsSequence();
79         org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
80         org.exolab.castor.mapping.FieldHandler             handler        = null;
81         org.exolab.castor.xml.FieldValidator               fieldValidator = null;
82         //-- initialize attribute descriptors
83         
84         //-- initialize element descriptors
85         
86         //-- _structureStateList
87         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.StructureState.class, "_structureStateList", "structureState", org.exolab.castor.xml.NodeType.Element);
88         handler = new org.exolab.castor.xml.XMLFieldHandler() {
89             public java.lang.Object getValue( java.lang.Object object ) 
90                 throws IllegalStateException
91             {
92                 Pdbids target = (Pdbids) object;
93                 return target.getStructureState();
94             }
95             public void setValue( java.lang.Object object, java.lang.Object value) 
96                 throws IllegalStateException, IllegalArgumentException
97             {
98                 try {
99                     Pdbids target = (Pdbids) object;
100                     target.addStructureState( (jalview.schemabinding.version2.StructureState) value);
101                 } catch (java.lang.Exception ex) {
102                     throw new IllegalStateException(ex.toString());
103                 }
104             }
105             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
106                 try {
107                     Pdbids target = (Pdbids) object;
108                     target.removeAllStructureState();
109                 } catch (java.lang.Exception ex) {
110                     throw new IllegalStateException(ex.toString());
111                 }
112             }
113             public java.lang.Object newInstance(java.lang.Object parent) {
114                 return new jalview.schemabinding.version2.StructureState();
115             }
116         };
117         desc.setHandler(handler);
118         desc.setNameSpaceURI("www.jalview.org");
119         desc.setMultivalued(true);
120         addFieldDescriptor(desc);
121         
122         //-- validation code for: _structureStateList
123         fieldValidator = new org.exolab.castor.xml.FieldValidator();
124         fieldValidator.setMinOccurs(0);
125         { //-- local scope
126         }
127         desc.setValidator(fieldValidator);
128     }
129
130
131       //-----------/
132      //- Methods -/
133     //-----------/
134
135     /**
136      * Method getAccessMode.
137      * 
138      * @return the access mode specified for this class.
139      */
140     public org.exolab.castor.mapping.AccessMode getAccessMode(
141     ) {
142         return null;
143     }
144
145     /**
146      * Method getIdentity.
147      * 
148      * @return the identity field, null if this class has no
149      * identity.
150      */
151     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
152     ) {
153         return super.getIdentity();
154     }
155
156     /**
157      * Method getJavaClass.
158      * 
159      * @return the Java class represented by this descriptor.
160      */
161     public java.lang.Class getJavaClass(
162     ) {
163         return jalview.schemabinding.version2.Pdbids.class;
164     }
165
166     /**
167      * Method getNameSpacePrefix.
168      * 
169      * @return the namespace prefix to use when marshaling as XML.
170      */
171     public java.lang.String getNameSpacePrefix(
172     ) {
173         return _nsPrefix;
174     }
175
176     /**
177      * Method getNameSpaceURI.
178      * 
179      * @return the namespace URI used when marshaling and
180      * unmarshaling as XML.
181      */
182     public java.lang.String getNameSpaceURI(
183     ) {
184         return _nsURI;
185     }
186
187     /**
188      * Method getValidator.
189      * 
190      * @return a specific validator for the class described by this
191      * ClassDescriptor.
192      */
193     public org.exolab.castor.xml.TypeValidator getValidator(
194     ) {
195         return this;
196     }
197
198     /**
199      * Method getXMLName.
200      * 
201      * @return the XML Name for the Class being described.
202      */
203     public java.lang.String getXMLName(
204     ) {
205         return _xmlName;
206     }
207
208     /**
209      * Method isElementDefinition.
210      * 
211      * @return true if XML schema definition of this Class is that
212      * of a global
213      * element or element with anonymous type definition.
214      */
215     public boolean isElementDefinition(
216     ) {
217         return _elementDefinition;
218     }
219
220 }