Clover icon

jalviewX

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

File PdbidsDescriptor.java

 

Coverage histogram

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

Code metrics

0
37
13
1
214
104
15
0.41
2.85
13
1.15

Classes

Class Line # Actions
PdbidsDescriptor 21 37 15 12
0.7676%
 

Contributing tests

This file is covered by 8 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.Pdbids;
15   
16    /**
17    * Class PdbidsDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class PdbidsDescriptor extends
22    jalview.schemabinding.version2.descriptors.PdbentryDescriptor
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  300 toggle public PdbidsDescriptor()
54    {
55  300 super();
56  300 setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.PdbentryDescriptor());
57  300 _nsURI = "www.jalview.org";
58  300 _xmlName = "pdbids";
59  300 _elementDefinition = true;
60   
61    // -- set grouping compositor
62  300 setCompositorAsSequence();
63  300 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64  300 org.exolab.castor.mapping.FieldHandler handler = null;
65  300 org.exolab.castor.xml.FieldValidator fieldValidator = null;
66    // -- initialize attribute descriptors
67   
68    // -- initialize element descriptors
69   
70    // -- _structureStateList
71  300 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
72    jalview.schemabinding.version2.StructureState.class,
73    "_structureStateList", "structureState",
74    org.exolab.castor.xml.NodeType.Element);
75  300 handler = new org.exolab.castor.xml.XMLFieldHandler()
76    {
 
77  100 toggle public java.lang.Object getValue(java.lang.Object object)
78    throws IllegalStateException
79    {
80  100 Pdbids target = (Pdbids) object;
81  100 return target.getStructureState();
82    }
83   
 
84  120 toggle public void setValue(java.lang.Object object, java.lang.Object value)
85    throws IllegalStateException, IllegalArgumentException
86    {
87  120 try
88    {
89  120 Pdbids target = (Pdbids) object;
90  120 target.addStructureState((jalview.schemabinding.version2.StructureState) value);
91    } catch (java.lang.Exception ex)
92    {
93  0 throw new IllegalStateException(ex.toString());
94    }
95    }
96   
 
97  0 toggle public void resetValue(Object object) throws IllegalStateException,
98    IllegalArgumentException
99    {
100  0 try
101    {
102  0 Pdbids target = (Pdbids) object;
103  0 target.removeAllStructureState();
104    } catch (java.lang.Exception ex)
105    {
106  0 throw new IllegalStateException(ex.toString());
107    }
108    }
109   
 
110  120 toggle public java.lang.Object newInstance(java.lang.Object parent)
111    {
112  120 return new jalview.schemabinding.version2.StructureState();
113    }
114    };
115  300 desc.setHandler(handler);
116  300 desc.setNameSpaceURI("www.jalview.org");
117  300 desc.setMultivalued(true);
118  300 addFieldDescriptor(desc);
119   
120    // -- validation code for: _structureStateList
121  300 fieldValidator = new org.exolab.castor.xml.FieldValidator();
122  300 fieldValidator.setMinOccurs(0);
123    { // -- local scope
124    }
125  300 desc.setValidator(fieldValidator);
126    }
127   
128    // -----------/
129    // - Methods -/
130    // -----------/
131   
132    /**
133    * Method getAccessMode.
134    *
135    * @return the access mode specified for this class.
136    */
 
137  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
138    {
139  0 return null;
140    }
141   
142    /**
143    * Method getIdentity.
144    *
145    * @return the identity field, null if this class has no identity.
146    */
 
147  538 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
148    {
149  538 return super.getIdentity();
150    }
151   
152    /**
153    * Method getJavaClass.
154    *
155    * @return the Java class represented by this descriptor.
156    */
 
157  250 toggle public java.lang.Class getJavaClass()
158    {
159  250 return jalview.schemabinding.version2.Pdbids.class;
160    }
161   
162    /**
163    * Method getNameSpacePrefix.
164    *
165    * @return the namespace prefix to use when marshaling as XML.
166    */
 
167  50 toggle public java.lang.String getNameSpacePrefix()
168    {
169  50 return _nsPrefix;
170    }
171   
172    /**
173    * Method getNameSpaceURI.
174    *
175    * @return the namespace URI used when marshaling and unmarshaling as XML.
176    */
 
177  0 toggle public java.lang.String getNameSpaceURI()
178    {
179  0 return _nsURI;
180    }
181   
182    /**
183    * Method getValidator.
184    *
185    * @return a specific validator for the class described by this
186    * ClassDescriptor.
187    */
 
188  50 toggle public org.exolab.castor.xml.TypeValidator getValidator()
189    {
190  50 return this;
191    }
192   
193    /**
194    * Method getXMLName.
195    *
196    * @return the XML Name for the Class being described.
197    */
 
198  600 toggle public java.lang.String getXMLName()
199    {
200  600 return _xmlName;
201    }
202   
203    /**
204    * Method isElementDefinition.
205    *
206    * @return true if XML schema definition of this Class is that of a global
207    * element or element with anonymous type definition.
208    */
 
209  0 toggle public boolean isElementDefinition()
210    {
211  0 return _elementDefinition;
212    }
213   
214    }