Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.schemabinding.version2.descriptors

File VAMSASDescriptor.java

 

Coverage histogram

../../../../img/srcFileCovDistChart7.png
28% of files have more coverage

Code metrics

0
61
17
1
273
157
21
0.34
3.59
17
1.24

Classes

Class Line # Actions
VAMSASDescriptor 21 61 21 30
0.6153846461.5%
 

Contributing tests

This file is covered by 14 tests. .

Source view

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.VAMSAS;
15   
16    /**
17    * Class VAMSASDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class VAMSASDescriptor extends
22    org.exolab.castor.xml.util.XMLClassDescriptorImpl
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  274 toggle public VAMSASDescriptor()
54    {
55  274 super();
56  274 _nsURI = "www.vamsas.ac.uk/jalview/version2";
57  274 _xmlName = "VAMSAS";
58  274 _elementDefinition = false;
59   
60    // -- set grouping compositor
61  274 setCompositorAsSequence();
62  274 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63  274 org.exolab.castor.mapping.FieldHandler handler = null;
64  274 org.exolab.castor.xml.FieldValidator fieldValidator = null;
65    // -- initialize attribute descriptors
66   
67    // -- initialize element descriptors
68   
69    // -- _treeList
70  274 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
71    java.lang.String.class, "_treeList", "Tree",
72    org.exolab.castor.xml.NodeType.Element);
73  274 desc.setImmutable(true);
74  274 handler = new org.exolab.castor.xml.XMLFieldHandler()
75    {
 
76  58 toggle public java.lang.Object getValue(java.lang.Object object)
77    throws IllegalStateException
78    {
79  58 VAMSAS target = (VAMSAS) object;
80  58 return target.getTree();
81    }
82   
 
83  0 toggle public void setValue(java.lang.Object object, java.lang.Object value)
84    throws IllegalStateException, IllegalArgumentException
85    {
86  0 try
87    {
88  0 VAMSAS target = (VAMSAS) object;
89  0 target.addTree((java.lang.String) value);
90    } catch (java.lang.Exception ex)
91    {
92  0 throw new IllegalStateException(ex.toString());
93    }
94    }
95   
 
96  0 toggle public void resetValue(Object object) throws IllegalStateException,
97    IllegalArgumentException
98    {
99  0 try
100    {
101  0 VAMSAS target = (VAMSAS) object;
102  0 target.removeAllTree();
103    } catch (java.lang.Exception ex)
104    {
105  0 throw new IllegalStateException(ex.toString());
106    }
107    }
108   
 
109  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
110    {
111  0 return null;
112    }
113    };
114  274 desc.setHandler(handler);
115  274 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
116  274 desc.setMultivalued(true);
117  274 addFieldDescriptor(desc);
118   
119    // -- validation code for: _treeList
120  274 fieldValidator = new org.exolab.castor.xml.FieldValidator();
121  274 fieldValidator.setMinOccurs(0);
122    { // -- local scope
123  274 org.exolab.castor.xml.validators.StringValidator typeValidator;
124  274 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
125  274 fieldValidator.setValidator(typeValidator);
126  274 typeValidator.setWhiteSpace("preserve");
127    }
128  274 desc.setValidator(fieldValidator);
129    // -- _sequenceSetList
130  274 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
131    jalview.schemabinding.version2.SequenceSet.class,
132    "_sequenceSetList", "SequenceSet",
133    org.exolab.castor.xml.NodeType.Element);
134  274 handler = new org.exolab.castor.xml.XMLFieldHandler()
135    {
 
136  58 toggle public java.lang.Object getValue(java.lang.Object object)
137    throws IllegalStateException
138    {
139  58 VAMSAS target = (VAMSAS) object;
140  58 return target.getSequenceSet();
141    }
142   
 
143  79 toggle public void setValue(java.lang.Object object, java.lang.Object value)
144    throws IllegalStateException, IllegalArgumentException
145    {
146  79 try
147    {
148  79 VAMSAS target = (VAMSAS) object;
149  79 target.addSequenceSet((jalview.schemabinding.version2.SequenceSet) value);
150    } catch (java.lang.Exception ex)
151    {
152  0 throw new IllegalStateException(ex.toString());
153    }
154    }
155   
 
156  0 toggle public void resetValue(Object object) throws IllegalStateException,
157    IllegalArgumentException
158    {
159  0 try
160    {
161  0 VAMSAS target = (VAMSAS) object;
162  0 target.removeAllSequenceSet();
163    } catch (java.lang.Exception ex)
164    {
165  0 throw new IllegalStateException(ex.toString());
166    }
167    }
168   
 
169  79 toggle public java.lang.Object newInstance(java.lang.Object parent)
170    {
171  79 return new jalview.schemabinding.version2.SequenceSet();
172    }
173    };
174  274 desc.setHandler(handler);
175  274 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
176  274 desc.setMultivalued(true);
177  274 addFieldDescriptor(desc);
178   
179    // -- validation code for: _sequenceSetList
180  274 fieldValidator = new org.exolab.castor.xml.FieldValidator();
181  274 fieldValidator.setMinOccurs(0);
182    { // -- local scope
183    }
184  274 desc.setValidator(fieldValidator);
185    }
186   
187    // -----------/
188    // - Methods -/
189    // -----------/
190   
191    /**
192    * Method getAccessMode.
193    *
194    * @return the access mode specified for this class.
195    */
 
196  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
197    {
198  0 return null;
199    }
200   
201    /**
202    * Method getIdentity.
203    *
204    * @return the identity field, null if this class has no identity.
205    */
 
206  58 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
207    {
208  58 return super.getIdentity();
209    }
210   
211    /**
212    * Method getJavaClass.
213    *
214    * @return the Java class represented by this descriptor.
215    */
 
216  29 toggle public java.lang.Class getJavaClass()
217    {
218  29 return jalview.schemabinding.version2.VAMSAS.class;
219    }
220   
221    /**
222    * Method getNameSpacePrefix.
223    *
224    * @return the namespace prefix to use when marshaling as XML.
225    */
 
226  0 toggle public java.lang.String getNameSpacePrefix()
227    {
228  0 return _nsPrefix;
229    }
230   
231    /**
232    * Method getNameSpaceURI.
233    *
234    * @return the namespace URI used when marshaling and unmarshaling as XML.
235    */
 
236  0 toggle public java.lang.String getNameSpaceURI()
237    {
238  0 return _nsURI;
239    }
240   
241    /**
242    * Method getValidator.
243    *
244    * @return a specific validator for the class described by this
245    * ClassDescriptor.
246    */
 
247  0 toggle public org.exolab.castor.xml.TypeValidator getValidator()
248    {
249  0 return this;
250    }
251   
252    /**
253    * Method getXMLName.
254    *
255    * @return the XML Name for the Class being described.
256    */
 
257  0 toggle public java.lang.String getXMLName()
258    {
259  0 return _xmlName;
260    }
261   
262    /**
263    * Method isElementDefinition.
264    *
265    * @return true if XML schema definition of this Class is that of a global
266    * element or element with anonymous type definition.
267    */
 
268  0 toggle public boolean isElementDefinition()
269    {
270  0 return _elementDefinition;
271    }
272   
273    }