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: XhtmlDocumentation.java,v 1.36 2007/01/04 16:26:33 clq2 Exp $
6    */
7   
8   package org.astrogrid.applications.beans.v1.parameters;
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   * should really reference the XHTML shema, but just did this for
26   * convienience
27   * 
28   * @version $Revision: 1.36 $ $Date: 2007/01/04 16:26:33 $
29   */
30  public class XhtmlDocumentation extends org.astrogrid.common.bean.BaseBean 
31  implements java.io.Serializable
32  {
33  
34  
35        //--------------------------/
36       //- Class/Member Variables -/
37      //--------------------------/
38  
39      /***
40       * internal content storage
41       */
42      private java.lang.String _content = "";
43  
44  
45        //----------------/
46       //- Constructors -/
47      //----------------/
48  
49      public XhtmlDocumentation() {
50          super();
51          setContent("");
52      } //-- org.astrogrid.applications.beans.v1.parameters.XhtmlDocumentation()
53  
54  
55        //-----------/
56       //- Methods -/
57      //-----------/
58  
59      /***
60       * Note: hashCode() has not been overriden
61       * 
62       * @param obj
63       */
64      public boolean equals(java.lang.Object obj)
65      {
66          if ( this == obj )
67              return true;
68          
69          if (super.equals(obj)==false)
70              return false;
71          
72          if (obj instanceof XhtmlDocumentation) {
73          
74              XhtmlDocumentation temp = (XhtmlDocumentation)obj;
75              if (this._content != null) {
76                  if (temp._content == null) return false;
77                  else if (!(this._content.equals(temp._content))) 
78                      return false;
79              }
80              else if (temp._content != null)
81                  return false;
82              return true;
83          }
84          return false;
85      } //-- boolean equals(java.lang.Object) 
86  
87      /***
88       * Returns the value of field 'content'. The field 'content'
89       * has the following description: internal content storage
90       * 
91       * @return the value of field 'content'.
92       */
93      public java.lang.String getContent()
94      {
95          return this._content;
96      } //-- java.lang.String getContent() 
97  
98      /***
99       * Method isValid
100      */
101     public boolean isValid()
102     {
103         try {
104             validate();
105         }
106         catch (org.exolab.castor.xml.ValidationException vex) {
107             return false;
108         }
109         return true;
110     } //-- boolean isValid() 
111 
112     /***
113      * Method marshal
114      * 
115      * @param out
116      */
117     public void marshal(java.io.Writer out)
118         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
119     {
120         
121         Marshaller.marshal(this, out);
122     } //-- void marshal(java.io.Writer) 
123 
124     /***
125      * Method marshal
126      * 
127      * @param handler
128      */
129     public void marshal(org.xml.sax.ContentHandler handler)
130         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
131     {
132         
133         Marshaller.marshal(this, handler);
134     } //-- void marshal(org.xml.sax.ContentHandler) 
135 
136     /***
137      * Sets the value of field 'content'. The field 'content' has
138      * the following description: internal content storage
139      * 
140      * @param content the value of field 'content'.
141      */
142     public void setContent(java.lang.String content)
143     {
144         this._content = content;
145     } //-- void setContent(java.lang.String) 
146 
147     /***
148      * Method unmarshalXhtmlDocumentation
149      * 
150      * @param reader
151      */
152     public static org.astrogrid.applications.beans.v1.parameters.XhtmlDocumentation unmarshalXhtmlDocumentation(java.io.Reader reader)
153         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
154     {
155         return (org.astrogrid.applications.beans.v1.parameters.XhtmlDocumentation) Unmarshaller.unmarshal(org.astrogrid.applications.beans.v1.parameters.XhtmlDocumentation.class, reader);
156     } //-- org.astrogrid.applications.beans.v1.parameters.XhtmlDocumentation unmarshalXhtmlDocumentation(java.io.Reader) 
157 
158     /***
159      * Method validate
160      */
161     public void validate()
162         throws org.exolab.castor.xml.ValidationException
163     {
164         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
165         validator.validate(this);
166     } //-- void validate() 
167 
168 }