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