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: AuthorityDescriptor.java,v 1.2 2007/01/04 16:26:34 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.v10.resource.registry;
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 AuthorityDescriptor.
21   * 
22   * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:34 $
23   */
24  public class AuthorityDescriptor extends org.astrogrid.registry.beans.v10.resource.ResourceDescriptor {
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 AuthorityDescriptor() {
57          super();
58          setExtendsWithoutFlatten(new org.astrogrid.registry.beans.v10.resource.ResourceDescriptor());
59          nsURI = "http://www.ivoa.net/xml/VORegistry/v0.3";
60          xmlName = "Authority";
61          
62          //-- set grouping compositor
63          setCompositorAsSequence();
64          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
65          org.exolab.castor.xml.XMLFieldHandler              handler        = null;
66          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
67          //-- initialize attribute descriptors
68          
69          //-- initialize element descriptors
70          
71          //-- _managingOrg
72          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.registry.beans.v10.resource.ResourceName.class, "_managingOrg", "managingOrg", org.exolab.castor.xml.NodeType.Element);
73          handler = (new org.exolab.castor.xml.XMLFieldHandler() {
74              public java.lang.Object getValue( java.lang.Object object ) 
75                  throws IllegalStateException
76              {
77                  Authority target = (Authority) object;
78                  return target.getManagingOrg();
79              }
80              public void setValue( java.lang.Object object, java.lang.Object value) 
81                  throws IllegalStateException, IllegalArgumentException
82              {
83                  try {
84                      Authority target = (Authority) object;
85                      target.setManagingOrg( (org.astrogrid.registry.beans.v10.resource.ResourceName) value);
86                  }
87                  catch (java.lang.Exception ex) {
88                      throw new IllegalStateException(ex.toString());
89                  }
90              }
91              public java.lang.Object newInstance( java.lang.Object parent ) {
92                  return new org.astrogrid.registry.beans.v10.resource.ResourceName();
93              }
94          } );
95          desc.setHandler(handler);
96          desc.setNameSpaceURI("http://www.ivoa.net/xml/VORegistry/v0.3");
97          desc.setMultivalued(false);
98          addFieldDescriptor(desc);
99          
100         //-- validation code for: _managingOrg
101         fieldValidator = new org.exolab.castor.xml.FieldValidator();
102         { //-- local scope
103         }
104         desc.setValidator(fieldValidator);
105     } //-- org.astrogrid.registry.beans.v10.resource.registry.AuthorityDescriptor()
106 
107 
108       //-----------/
109      //- Methods -/
110     //-----------/
111 
112     /***
113      * Method getAccessMode
114      */
115     public org.exolab.castor.mapping.AccessMode getAccessMode()
116     {
117         return null;
118     } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
119 
120     /***
121      * Method getExtends
122      */
123     public org.exolab.castor.mapping.ClassDescriptor getExtends()
124     {
125         return super.getExtends();
126     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
127 
128     /***
129      * Method getIdentity
130      */
131     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
132     {
133         if (identity == null)
134             return super.getIdentity();
135         return identity;
136     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
137 
138     /***
139      * Method getJavaClass
140      */
141     public java.lang.Class getJavaClass()
142     {
143         return org.astrogrid.registry.beans.v10.resource.registry.Authority.class;
144     } //-- java.lang.Class getJavaClass() 
145 
146     /***
147      * Method getNameSpacePrefix
148      */
149     public java.lang.String getNameSpacePrefix()
150     {
151         return nsPrefix;
152     } //-- java.lang.String getNameSpacePrefix() 
153 
154     /***
155      * Method getNameSpaceURI
156      */
157     public java.lang.String getNameSpaceURI()
158     {
159         return nsURI;
160     } //-- java.lang.String getNameSpaceURI() 
161 
162     /***
163      * Method getValidator
164      */
165     public org.exolab.castor.xml.TypeValidator getValidator()
166     {
167         return this;
168     } //-- org.exolab.castor.xml.TypeValidator getValidator() 
169 
170     /***
171      * Method getXMLName
172      */
173     public java.lang.String getXMLName()
174     {
175         return xmlName;
176     } //-- java.lang.String getXMLName() 
177 
178 }