formatting
[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
22         jalview.schemabinding.version2.descriptors.MapListTypeDescriptor
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _elementDefinition.
31    */
32   private boolean _elementDefinition;
33
34   /**
35    * Field _nsPrefix.
36    */
37   private java.lang.String _nsPrefix;
38
39   /**
40    * Field _nsURI.
41    */
42   private java.lang.String _nsURI;
43
44   /**
45    * Field _xmlName.
46    */
47   private java.lang.String _xmlName;
48
49   // ----------------/
50   // - Constructors -/
51   // ----------------/
52
53   public MappingDescriptor()
54   {
55     super();
56     setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.MapListTypeDescriptor());
57     _nsURI = "www.vamsas.ac.uk/jalview/version2";
58     _xmlName = "Mapping";
59     _elementDefinition = true;
60
61     // -- set grouping compositor
62     setCompositorAsChoice();
63     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64     org.exolab.castor.mapping.FieldHandler handler = null;
65     org.exolab.castor.xml.FieldValidator fieldValidator = null;
66     // -- initialize attribute descriptors
67
68     // -- initialize element descriptors
69
70     // -- _mappingChoice
71     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
72             jalview.schemabinding.version2.MappingChoice.class,
73             "_mappingChoice", "-error-if-this-is-used-",
74             org.exolab.castor.xml.NodeType.Element);
75     handler = new org.exolab.castor.xml.XMLFieldHandler()
76     {
77       public java.lang.Object getValue(java.lang.Object object)
78               throws IllegalStateException
79       {
80         Mapping target = (Mapping) object;
81         return target.getMappingChoice();
82       }
83
84       public void setValue(java.lang.Object object, java.lang.Object value)
85               throws IllegalStateException, IllegalArgumentException
86       {
87         try
88         {
89           Mapping target = (Mapping) object;
90           target.setMappingChoice((jalview.schemabinding.version2.MappingChoice) value);
91         } catch (java.lang.Exception ex)
92         {
93           throw new IllegalStateException(ex.toString());
94         }
95       }
96
97       public java.lang.Object newInstance(java.lang.Object parent)
98       {
99         return new jalview.schemabinding.version2.MappingChoice();
100       }
101     };
102     desc.setHandler(handler);
103     desc.setContainer(true);
104     desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());
105     desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
106     desc.setMultivalued(false);
107     addFieldDescriptor(desc);
108
109     // -- validation code for: _mappingChoice
110     fieldValidator = new org.exolab.castor.xml.FieldValidator();
111     { // -- local scope
112     }
113     desc.setValidator(fieldValidator);
114   }
115
116   // -----------/
117   // - Methods -/
118   // -----------/
119
120   /**
121    * Method getAccessMode.
122    * 
123    * @return the access mode specified for this class.
124    */
125   public org.exolab.castor.mapping.AccessMode getAccessMode()
126   {
127     return null;
128   }
129
130   /**
131    * Method getIdentity.
132    * 
133    * @return the identity field, null if this class has no identity.
134    */
135   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
136   {
137     return super.getIdentity();
138   }
139
140   /**
141    * Method getJavaClass.
142    * 
143    * @return the Java class represented by this descriptor.
144    */
145   public java.lang.Class getJavaClass()
146   {
147     return jalview.schemabinding.version2.Mapping.class;
148   }
149
150   /**
151    * Method getNameSpacePrefix.
152    * 
153    * @return the namespace prefix to use when marshaling as XML.
154    */
155   public java.lang.String getNameSpacePrefix()
156   {
157     return _nsPrefix;
158   }
159
160   /**
161    * Method getNameSpaceURI.
162    * 
163    * @return the namespace URI used when marshaling and 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 of a global
195    *         element or element with anonymous type definition.
196    */
197   public boolean isElementDefinition()
198   {
199     return _elementDefinition;
200   }
201
202 }