View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4    * Schema.
5    * $Id: VOResourcesDescriptor.java,v 1.2 2007/01/04 16:26:38 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.v10.wsinterface;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.exolab.castor.mapping.AccessMode;
15  import org.exolab.castor.xml.TypeValidator;
16  import org.exolab.castor.xml.XMLFieldDescriptor;
17  import org.exolab.castor.xml.validators.*;
18  
19  /***
20   * Class VOResourcesDescriptor.
21   * 
22   * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:38 $
23   */
24  public class VOResourcesDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25  
26  
27        //--------------------------/
28       //- Class/Member Variables -/
29      //--------------------------/
30  
31      /***
32       * Field nsPrefix
33       */
34      private java.lang.String nsPrefix;
35  
36      /***
37       * Field nsURI
38       */
39      private java.lang.String nsURI;
40  
41      /***
42       * Field xmlName
43       */
44      private java.lang.String xmlName;
45  
46      /***
47       * Field identity
48       */
49      private org.exolab.castor.xml.XMLFieldDescriptor identity;
50  
51  
52        //----------------/
53       //- Constructors -/
54      //----------------/
55  
56      public VOResourcesDescriptor() {
57          super();
58          nsURI = "http://www.ivoa.net/xml/RegistryInterface/v0.1";
59          xmlName = "VOResources";
60          
61          //-- set grouping compositor
62          setCompositorAsSequence();
63          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
64          org.exolab.castor.xml.XMLFieldHandler              handler        = null;
65          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
66          //-- initialize attribute descriptors
67          
68          //-- initialize element descriptors
69          
70          //-- _resourceList
71          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.registry.beans.v10.resource.Resource.class, "_resourceList", "Resource", org.exolab.castor.xml.NodeType.Element);
72          handler = (new org.exolab.castor.xml.XMLFieldHandler() {
73              public java.lang.Object getValue( java.lang.Object object ) 
74                  throws IllegalStateException
75              {
76                  VOResources target = (VOResources) object;
77                  return target.getResource();
78              }
79              public void setValue( java.lang.Object object, java.lang.Object value) 
80                  throws IllegalStateException, IllegalArgumentException
81              {
82                  try {
83                      VOResources target = (VOResources) object;
84                      target.addResource( (org.astrogrid.registry.beans.v10.resource.Resource) value);
85                  }
86                  catch (java.lang.Exception ex) {
87                      throw new IllegalStateException(ex.toString());
88                  }
89              }
90              public java.lang.Object newInstance( java.lang.Object parent ) {
91                  return new org.astrogrid.registry.beans.v10.resource.Resource();
92              }
93          } );
94          desc.setHandler(handler);
95          desc.setNameSpaceURI("http://www.ivoa.net/xml/RegistryInterface/v0.1");
96          desc.setRequired(true);
97          desc.setMultivalued(true);
98          addFieldDescriptor(desc);
99          
100         //-- validation code for: _resourceList
101         fieldValidator = new org.exolab.castor.xml.FieldValidator();
102         fieldValidator.setMinOccurs(1);
103         { //-- local scope
104         }
105         desc.setValidator(fieldValidator);
106     } //-- org.astrogrid.registry.beans.v10.wsinterface.VOResourcesDescriptor()
107 
108 
109       //-----------/
110      //- Methods -/
111     //-----------/
112 
113     /***
114      * Method getAccessMode
115      */
116     public org.exolab.castor.mapping.AccessMode getAccessMode()
117     {
118         return null;
119     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
120 
121     /***
122      * Method getExtends
123      */
124     public org.exolab.castor.mapping.ClassDescriptor getExtends()
125     {
126         return null;
127     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
128 
129     /***
130      * Method getIdentity
131      */
132     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
133     {
134         return identity;
135     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
136 
137     /***
138      * Method getJavaClass
139      */
140     public java.lang.Class getJavaClass()
141     {
142         return org.astrogrid.registry.beans.v10.wsinterface.VOResources.class;
143     } //-- java.lang.Class getJavaClass() 
144 
145     /***
146      * Method getNameSpacePrefix
147      */
148     public java.lang.String getNameSpacePrefix()
149     {
150         return nsPrefix;
151     } //-- java.lang.String getNameSpacePrefix() 
152 
153     /***
154      * Method getNameSpaceURI
155      */
156     public java.lang.String getNameSpaceURI()
157     {
158         return nsURI;
159     } //-- java.lang.String getNameSpaceURI() 
160 
161     /***
162      * Method getValidator
163      */
164     public org.exolab.castor.xml.TypeValidator getValidator()
165     {
166         return this;
167     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
168 
169     /***
170      * Method getXMLName
171      */
172     public java.lang.String getXMLName()
173     {
174         return xmlName;
175     } //-- java.lang.String getXMLName() 
176 
177 }