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