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