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: GLUService.java,v 1.2 2007/01/04 16:26:26 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.v10.resource.dataservice;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import java.io.IOException;
15  import java.io.Reader;
16  import java.io.Serializable;
17  import java.io.Writer;
18  import org.exolab.castor.xml.MarshalException;
19  import org.exolab.castor.xml.Marshaller;
20  import org.exolab.castor.xml.Unmarshaller;
21  import org.exolab.castor.xml.ValidationException;
22  import org.xml.sax.ContentHandler;
23  
24  /***
25   * A web-based service that is described in a GLU registry.
26   *  
27   *  The AccessURL element gives the URL to the GLU record
28   * describing 
29   *  the service.
30   *  
31   * 
32   * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:26 $
33   */
34  public class GLUService extends org.astrogrid.registry.beans.v10.resource.Interface 
35  implements java.io.Serializable
36  {
37  
38  
39        //----------------/
40       //- Constructors -/
41      //----------------/
42  
43      public GLUService() {
44          super();
45      } //-- org.astrogrid.registry.beans.v10.resource.dataservice.GLUService()
46  
47  
48        //-----------/
49       //- Methods -/
50      //-----------/
51  
52      /***
53       * Note: hashCode() has not been overriden
54       * 
55       * @param obj
56       */
57      public boolean equals(java.lang.Object obj)
58      {
59          if ( this == obj )
60              return true;
61          
62          if (super.equals(obj)==false)
63              return false;
64          
65          if (obj instanceof GLUService) {
66          
67              GLUService temp = (GLUService)obj;
68              return true;
69          }
70          return false;
71      } //-- boolean equals(java.lang.Object) 
72  
73      /***
74       * Method isValid
75       */
76      public boolean isValid()
77      {
78          try {
79              validate();
80          }
81          catch (org.exolab.castor.xml.ValidationException vex) {
82              return false;
83          }
84          return true;
85      } //-- boolean isValid() 
86  
87      /***
88       * Method marshal
89       * 
90       * @param out
91       */
92      public void marshal(java.io.Writer out)
93          throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
94      {
95          
96          Marshaller.marshal(this, out);
97      } //-- void marshal(java.io.Writer) 
98  
99      /***
100      * Method marshal
101      * 
102      * @param handler
103      */
104     public void marshal(org.xml.sax.ContentHandler handler)
105         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
106     {
107         
108         Marshaller.marshal(this, handler);
109     } //-- void marshal(org.xml.sax.ContentHandler) 
110 
111     /***
112      * Method unmarshalGLUService
113      * 
114      * @param reader
115      */
116     public static org.astrogrid.registry.beans.v10.resource.dataservice.GLUService unmarshalGLUService(java.io.Reader reader)
117         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
118     {
119         return (org.astrogrid.registry.beans.v10.resource.dataservice.GLUService) Unmarshaller.unmarshal(org.astrogrid.registry.beans.v10.resource.dataservice.GLUService.class, reader);
120     } //-- org.astrogrid.registry.beans.v10.resource.dataservice.GLUService unmarshalGLUService(java.io.Reader) 
121 
122     /***
123      * Method validate
124      */
125     public void validate()
126         throws org.exolab.castor.xml.ValidationException
127     {
128         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
129         validator.validate(this);
130     } //-- void validate() 
131 
132 }