Clover icon

jalviewX

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

File PdbentryItemDescriptor.java

 

Coverage histogram

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

Code metrics

0
36
13
1
212
102
15
0.42
2.77
13
1.15

Classes

Class Line # Actions
PdbentryItemDescriptor 21 36 15 10
0.7959183579.6%
 

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