1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) The Jalview Authors
5 * This file is part of Jalview.
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.schemabinding.version2.descriptors;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import jalview.schemabinding.version2.AlcodonFrame;
37 * Class AlcodonFrameDescriptor.
39 * @version $Revision$ $Date$
41 public class AlcodonFrameDescriptor extends
42 org.exolab.castor.xml.util.XMLClassDescriptorImpl
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
50 * Field _elementDefinition.
52 private boolean _elementDefinition;
57 private java.lang.String _nsPrefix;
62 private java.lang.String _nsURI;
67 private java.lang.String _xmlName;
73 public AlcodonFrameDescriptor()
76 _nsURI = "www.vamsas.ac.uk/jalview/version2";
77 _xmlName = "AlcodonFrame";
78 _elementDefinition = true;
80 // -- set grouping compositor
81 setCompositorAsSequence();
82 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
83 org.exolab.castor.mapping.FieldHandler handler = null;
84 org.exolab.castor.xml.FieldValidator fieldValidator = null;
85 // -- initialize attribute descriptors
87 // -- initialize element descriptors
90 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
91 jalview.schemabinding.version2.Alcodon.class, "_alcodonList",
92 "alcodon", org.exolab.castor.xml.NodeType.Element);
93 handler = new org.exolab.castor.xml.XMLFieldHandler()
95 public java.lang.Object getValue(java.lang.Object object)
96 throws IllegalStateException
98 AlcodonFrame target = (AlcodonFrame) object;
99 return target.getAlcodon();
102 public void setValue(java.lang.Object object, java.lang.Object value)
103 throws IllegalStateException, IllegalArgumentException
107 AlcodonFrame target = (AlcodonFrame) object;
108 target.addAlcodon((jalview.schemabinding.version2.Alcodon) value);
109 } catch (java.lang.Exception ex)
111 throw new IllegalStateException(ex.toString());
115 public void resetValue(Object object) throws IllegalStateException,
116 IllegalArgumentException
120 AlcodonFrame target = (AlcodonFrame) object;
121 target.removeAllAlcodon();
122 } catch (java.lang.Exception ex)
124 throw new IllegalStateException(ex.toString());
128 public java.lang.Object newInstance(java.lang.Object parent)
130 return new jalview.schemabinding.version2.Alcodon();
133 desc.setHandler(handler);
134 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
135 desc.setMultivalued(true);
136 addFieldDescriptor(desc);
138 // -- validation code for: _alcodonList
139 fieldValidator = new org.exolab.castor.xml.FieldValidator();
140 fieldValidator.setMinOccurs(0);
143 desc.setValidator(fieldValidator);
145 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
146 jalview.schemabinding.version2.AlcodMap.class, "_alcodMapList",
147 "alcodMap", org.exolab.castor.xml.NodeType.Element);
148 handler = new org.exolab.castor.xml.XMLFieldHandler()
150 public java.lang.Object getValue(java.lang.Object object)
151 throws IllegalStateException
153 AlcodonFrame target = (AlcodonFrame) object;
154 return target.getAlcodMap();
157 public void setValue(java.lang.Object object, java.lang.Object value)
158 throws IllegalStateException, IllegalArgumentException
162 AlcodonFrame target = (AlcodonFrame) object;
163 target.addAlcodMap((jalview.schemabinding.version2.AlcodMap) value);
164 } catch (java.lang.Exception ex)
166 throw new IllegalStateException(ex.toString());
170 public void resetValue(Object object) throws IllegalStateException,
171 IllegalArgumentException
175 AlcodonFrame target = (AlcodonFrame) object;
176 target.removeAllAlcodMap();
177 } catch (java.lang.Exception ex)
179 throw new IllegalStateException(ex.toString());
183 public java.lang.Object newInstance(java.lang.Object parent)
185 return new jalview.schemabinding.version2.AlcodMap();
188 desc.setHandler(handler);
189 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
190 desc.setMultivalued(true);
191 addFieldDescriptor(desc);
193 // -- validation code for: _alcodMapList
194 fieldValidator = new org.exolab.castor.xml.FieldValidator();
195 fieldValidator.setMinOccurs(0);
198 desc.setValidator(fieldValidator);
206 * Method getAccessMode.
208 * @return the access mode specified for this class.
210 public org.exolab.castor.mapping.AccessMode getAccessMode()
216 * Method getIdentity.
218 * @return the identity field, null if this class has no identity.
220 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
222 return super.getIdentity();
226 * Method getJavaClass.
228 * @return the Java class represented by this descriptor.
230 public java.lang.Class getJavaClass()
232 return jalview.schemabinding.version2.AlcodonFrame.class;
236 * Method getNameSpacePrefix.
238 * @return the namespace prefix to use when marshaling as XML.
240 public java.lang.String getNameSpacePrefix()
246 * Method getNameSpaceURI.
248 * @return the namespace URI used when marshaling and unmarshaling as XML.
250 public java.lang.String getNameSpaceURI()
256 * Method getValidator.
258 * @return a specific validator for the class described by this
261 public org.exolab.castor.xml.TypeValidator getValidator()
269 * @return the XML Name for the Class being described.
271 public java.lang.String getXMLName()
277 * Method isElementDefinition.
279 * @return true if XML schema definition of this Class is that of a global
280 * element or element with anonymous type definition.
282 public boolean isElementDefinition()
284 return _elementDefinition;