Clover icon

jalviewX

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

File SequenceDescriptor.java

 

Coverage histogram

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

Code metrics

0
56
16
1
258
143
19
0.34
3.5
16
1.19

Classes

Class Line # Actions
SequenceDescriptor 21 56 19 15
0.791666779.2%
 

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