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.SequenceSetProperties;
37 * Class SequenceSetPropertiesDescriptor.
39 * @version $Revision$ $Date$
41 public class SequenceSetPropertiesDescriptor 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 SequenceSetPropertiesDescriptor()
76 _nsURI = "www.vamsas.ac.uk/jalview/version2";
77 _xmlName = "sequenceSetProperties";
78 _elementDefinition = true;
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
85 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
86 java.lang.String.class, "_key", "key",
87 org.exolab.castor.xml.NodeType.Attribute);
88 desc.setImmutable(true);
89 handler = new org.exolab.castor.xml.XMLFieldHandler()
91 public java.lang.Object getValue(java.lang.Object object)
92 throws IllegalStateException
94 SequenceSetProperties target = (SequenceSetProperties) object;
95 return target.getKey();
98 public void setValue(java.lang.Object object, java.lang.Object value)
99 throws IllegalStateException, IllegalArgumentException
103 SequenceSetProperties target = (SequenceSetProperties) object;
104 target.setKey((java.lang.String) value);
105 } catch (java.lang.Exception ex)
107 throw new IllegalStateException(ex.toString());
111 public java.lang.Object newInstance(java.lang.Object parent)
116 desc.setHandler(handler);
117 desc.setMultivalued(false);
118 addFieldDescriptor(desc);
120 // -- validation code for: _key
121 fieldValidator = new org.exolab.castor.xml.FieldValidator();
123 org.exolab.castor.xml.validators.StringValidator typeValidator;
124 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
125 fieldValidator.setValidator(typeValidator);
126 typeValidator.setWhiteSpace("preserve");
128 desc.setValidator(fieldValidator);
130 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
131 java.lang.String.class, "_value", "value",
132 org.exolab.castor.xml.NodeType.Attribute);
133 desc.setImmutable(true);
134 handler = new org.exolab.castor.xml.XMLFieldHandler()
136 public java.lang.Object getValue(java.lang.Object object)
137 throws IllegalStateException
139 SequenceSetProperties target = (SequenceSetProperties) object;
140 return target.getValue();
143 public void setValue(java.lang.Object object, java.lang.Object value)
144 throws IllegalStateException, IllegalArgumentException
148 SequenceSetProperties target = (SequenceSetProperties) object;
149 target.setValue((java.lang.String) value);
150 } catch (java.lang.Exception ex)
152 throw new IllegalStateException(ex.toString());
156 public java.lang.Object newInstance(java.lang.Object parent)
161 desc.setHandler(handler);
162 desc.setMultivalued(false);
163 addFieldDescriptor(desc);
165 // -- validation code for: _value
166 fieldValidator = new org.exolab.castor.xml.FieldValidator();
168 org.exolab.castor.xml.validators.StringValidator typeValidator;
169 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
170 fieldValidator.setValidator(typeValidator);
171 typeValidator.setWhiteSpace("preserve");
173 desc.setValidator(fieldValidator);
174 // -- initialize element descriptors
183 * Method getAccessMode.
185 * @return the access mode specified for this class.
187 public org.exolab.castor.mapping.AccessMode getAccessMode()
193 * Method getIdentity.
195 * @return the identity field, null if this class has no identity.
197 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
199 return super.getIdentity();
203 * Method getJavaClass.
205 * @return the Java class represented by this descriptor.
207 public java.lang.Class getJavaClass()
209 return jalview.schemabinding.version2.SequenceSetProperties.class;
213 * Method getNameSpacePrefix.
215 * @return the namespace prefix to use when marshaling as XML.
217 public java.lang.String getNameSpacePrefix()
223 * Method getNameSpaceURI.
225 * @return the namespace URI used when marshaling and unmarshaling as XML.
227 public java.lang.String getNameSpaceURI()
233 * Method getValidator.
235 * @return a specific validator for the class described by this
238 public org.exolab.castor.xml.TypeValidator getValidator()
246 * @return the XML Name for the Class being described.
248 public java.lang.String getXMLName()
254 * Method isElementDefinition.
256 * @return true if XML schema definition of this Class is that of a global
257 * element or element with anonymous type definition.
259 public boolean isElementDefinition()
261 return _elementDefinition;