2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2.descriptors;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import jalview.schemabinding.version2.PdbentryItem;
17 * Class PdbentryItemDescriptor.
19 * @version $Revision$ $Date$
21 public class PdbentryItemDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
24 //--------------------------/
25 //- Class/Member Variables -/
26 //--------------------------/
29 * Field _elementDefinition.
31 private boolean _elementDefinition;
36 private java.lang.String _nsPrefix;
41 private java.lang.String _nsURI;
46 private java.lang.String _xmlName;
53 public PdbentryItemDescriptor() {
55 _nsURI = "www.jalview.org";
56 _xmlName = "pdbentry";
57 _elementDefinition = false;
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
66 //-- initialize element descriptors
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
74 PdbentryItem target = (PdbentryItem) object;
75 return target.getProperty();
77 public void setValue( java.lang.Object object, java.lang.Object value)
78 throws IllegalStateException, IllegalArgumentException
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());
87 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
89 PdbentryItem target = (PdbentryItem) object;
90 target.removeAllProperty();
91 } catch (java.lang.Exception ex) {
92 throw new IllegalStateException(ex.toString());
95 public java.lang.Object newInstance(java.lang.Object parent) {
96 return new jalview.schemabinding.version2.Property();
99 desc.setHandler(handler);
100 desc.setNameSpaceURI("www.jalview.org");
101 desc.setMultivalued(true);
102 addFieldDescriptor(desc);
104 //-- validation code for: _propertyList
105 fieldValidator = new org.exolab.castor.xml.FieldValidator();
106 fieldValidator.setMinOccurs(0);
109 desc.setValidator(fieldValidator);
118 * Method getAccessMode.
120 * @return the access mode specified for this class.
122 public org.exolab.castor.mapping.AccessMode getAccessMode(
128 * Method getIdentity.
130 * @return the identity field, null if this class has no
133 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
135 return super.getIdentity();
139 * Method getJavaClass.
141 * @return the Java class represented by this descriptor.
143 public java.lang.Class getJavaClass(
145 return jalview.schemabinding.version2.PdbentryItem.class;
149 * Method getNameSpacePrefix.
151 * @return the namespace prefix to use when marshaling as XML.
153 public java.lang.String getNameSpacePrefix(
159 * Method getNameSpaceURI.
161 * @return the namespace URI used when marshaling and
162 * unmarshaling as XML.
164 public java.lang.String getNameSpaceURI(
170 * Method getValidator.
172 * @return a specific validator for the class described by this
175 public org.exolab.castor.xml.TypeValidator getValidator(
183 * @return the XML Name for the Class being described.
185 public java.lang.String getXMLName(
191 * Method isElementDefinition.
193 * @return true if XML schema definition of this Class is that
195 * element or element with anonymous type definition.
197 public boolean isElementDefinition(
199 return _elementDefinition;