Clover icon

jalviewX

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

File FeatureMatcherSetDescriptor.java

 

Coverage histogram

../../../../img/srcFileCovDistChart8.png
19% of files have more coverage

Code metrics

0
48
15
1
258
143
17
0.35
3.2
15
1.13

Classes

Class Line # Actions
FeatureMatcherSetDescriptor 24 48 17 14
0.777777877.8%
 

Contributing tests

This file is covered by 2 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    import jalview.schemabinding.version2.CompoundMatcher;
11   
12    //---------------------------------/
13    //- Imported classes and packages -/
14    //---------------------------------/
15   
16    import jalview.schemabinding.version2.FeatureMatcherSet;
17    import jalview.schemabinding.version2.MatchCondition;
18   
19    /**
20    * Class FeatureMatcherSetDescriptor.
21    *
22    * @version $Revision$ $Date$
23    */
 
24    public class FeatureMatcherSetDescriptor
25    extends org.exolab.castor.xml.util.XMLClassDescriptorImpl
26    {
27   
28    // --------------------------/
29    // - Class/Member Variables -/
30    // --------------------------/
31   
32    /**
33    * Field _elementDefinition.
34    */
35    private boolean _elementDefinition;
36   
37    /**
38    * Field _nsPrefix.
39    */
40    private java.lang.String _nsPrefix;
41   
42    /**
43    * Field _nsURI.
44    */
45    private java.lang.String _nsURI;
46   
47    /**
48    * Field _xmlName.
49    */
50    private java.lang.String _xmlName;
51   
52    // ----------------/
53    // - Constructors -/
54    // ----------------/
55   
 
56  98 toggle public FeatureMatcherSetDescriptor()
57    {
58  98 super();
59  98 _nsURI = "www.jalview.org/colours";
60  98 _xmlName = "FeatureMatcherSet";
61  98 _elementDefinition = false;
62   
63    // -- set grouping compositor
64  98 setCompositorAsChoice();
65  98 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
66  98 org.exolab.castor.mapping.FieldHandler handler = null;
67  98 org.exolab.castor.xml.FieldValidator fieldValidator = null;
68    // -- initialize attribute descriptors
69   
70    // -- initialize element descriptors
71   
72    // -- _matchCondition
73  98 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
74    MatchCondition.class, "_matchCondition", "matchCondition",
75    org.exolab.castor.xml.NodeType.Element);
76  98 handler = new org.exolab.castor.xml.XMLFieldHandler()
77    {
 
78  50 toggle @Override
79    public java.lang.Object getValue(java.lang.Object object)
80    throws IllegalStateException
81    {
82  50 FeatureMatcherSet target = (FeatureMatcherSet) object;
83  50 return target.getMatchCondition();
84    }
85   
 
86  10 toggle @Override
87    public void setValue(java.lang.Object object, java.lang.Object value)
88    throws IllegalStateException, IllegalArgumentException
89    {
90  10 try
91    {
92  10 FeatureMatcherSet target = (FeatureMatcherSet) object;
93  10 target.setMatchCondition((MatchCondition) value);
94    } catch (java.lang.Exception ex)
95    {
96  0 throw new IllegalStateException(ex.toString());
97    }
98    }
99   
 
100  10 toggle @Override
101    public java.lang.Object newInstance(java.lang.Object parent)
102    {
103  10 return new MatchCondition();
104    }
105    };
106  98 desc.setHandler(handler);
107  98 desc.setRequired(true);
108  98 desc.setMultivalued(false);
109  98 addFieldDescriptor(desc);
110   
111    // -- validation code for: _matchCondition
112  98 fieldValidator = new org.exolab.castor.xml.FieldValidator();
113  98 fieldValidator.setMinOccurs(1);
114    { // -- local scope
115    }
116  98 desc.setValidator(fieldValidator);
117    // -- _compoundMatcher
118  98 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
119    CompoundMatcher.class, "_compoundMatcher", "compoundMatcher",
120    org.exolab.castor.xml.NodeType.Element);
121  98 handler = new org.exolab.castor.xml.XMLFieldHandler()
122    {
 
123  41 toggle @Override
124    public java.lang.Object getValue(java.lang.Object object)
125    throws IllegalStateException
126    {
127  41 FeatureMatcherSet target = (FeatureMatcherSet) object;
128  41 return target.getCompoundMatcher();
129    }
130   
 
131  4 toggle @Override
132    public void setValue(java.lang.Object object, java.lang.Object value)
133    throws IllegalStateException, IllegalArgumentException
134    {
135  4 try
136    {
137  4 FeatureMatcherSet target = (FeatureMatcherSet) object;
138  4 target.setCompoundMatcher((CompoundMatcher) value);
139    } catch (java.lang.Exception ex)
140    {
141  0 throw new IllegalStateException(ex.toString());
142    }
143    }
144   
 
145  4 toggle @Override
146    public java.lang.Object newInstance(java.lang.Object parent)
147    {
148  4 return new CompoundMatcher();
149    }
150    };
151  98 desc.setHandler(handler);
152  98 desc.setRequired(true);
153  98 desc.setMultivalued(false);
154  98 addFieldDescriptor(desc);
155   
156    // -- validation code for: _compoundMatcher
157  98 fieldValidator = new org.exolab.castor.xml.FieldValidator();
158  98 fieldValidator.setMinOccurs(1);
159    { // -- local scope
160    }
161  98 desc.setValidator(fieldValidator);
162    }
163   
164    // -----------/
165    // - Methods -/
166    // -----------/
167   
168    /**
169    * Method getAccessMode.
170    *
171    * @return the access mode specified for this class.
172    */
 
173  0 toggle @Override
174    public org.exolab.castor.mapping.AccessMode getAccessMode()
175    {
176  0 return null;
177    }
178   
179    /**
180    * Method getIdentity.
181    *
182    * @return the identity field, null if this class has no identity.
183    */
 
184  14 toggle @Override
185    public org.exolab.castor.mapping.FieldDescriptor getIdentity()
186    {
187  14 return super.getIdentity();
188    }
189   
190    /**
191    * Method getJavaClass.
192    *
193    * @return the Java class represented by this descriptor.
194    */
 
195  21 toggle @Override
196    public java.lang.Class getJavaClass()
197    {
198  21 return jalview.schemabinding.version2.FeatureMatcherSet.class;
199    }
200   
201    /**
202    * Method getNameSpacePrefix.
203    *
204    * @return the namespace prefix to use when marshaling as XML.
205    */
 
206  0 toggle @Override
207    public java.lang.String getNameSpacePrefix()
208    {
209  0 return _nsPrefix;
210    }
211   
212    /**
213    * Method getNameSpaceURI.
214    *
215    * @return the namespace URI used when marshaling and unmarshaling as XML.
216    */
 
217  0 toggle @Override
218    public java.lang.String getNameSpaceURI()
219    {
220  0 return _nsURI;
221    }
222   
223    /**
224    * Method getValidator.
225    *
226    * @return a specific validator for the class described by this
227    * ClassDescriptor.
228    */
 
229  0 toggle @Override
230    public org.exolab.castor.xml.TypeValidator getValidator()
231    {
232  0 return this;
233    }
234   
235    /**
236    * Method getXMLName.
237    *
238    * @return the XML Name for the Class being described.
239    */
 
240  0 toggle @Override
241    public java.lang.String getXMLName()
242    {
243  0 return _xmlName;
244    }
245   
246    /**
247    * Method isElementDefinition.
248    *
249    * @return true if XML schema definition of this Class is that of a global
250    * element or element with anonymous type definition.
251    */
 
252  0 toggle @Override
253    public boolean isElementDefinition()
254    {
255  0 return _elementDefinition;
256    }
257   
258    }