View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 0.9.7</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package fr.in2p3.jsaga.generated.session;
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   * Class FilterType.
26   * 
27   * @version $Revision$ $Date$
28   */
29  public class FilterType implements java.io.Serializable {
30  
31  
32        //--------------------------/
33       //- Class/Member Variables -/
34      //--------------------------/
35  
36      /**
37       * Field _domain
38       */
39      private java.lang.String _domain;
40  
41      /**
42       * Field _host
43       */
44      private java.lang.String _host;
45  
46      /**
47       * Field _port
48       */
49      private int _port;
50  
51      /**
52       * keeps track of state for field: _port
53       */
54      private boolean _has_port;
55  
56      /**
57       * Field _isPortOptional
58       */
59      private boolean _isPortOptional = false;
60  
61      /**
62       * keeps track of state for field: _isPortOptional
63       */
64      private boolean _has_isPortOptional;
65  
66      /**
67       * Field _basepath
68       */
69      private java.lang.String _basepath;
70  
71  
72        //----------------/
73       //- Constructors -/
74      //----------------/
75  
76      public FilterType() 
77       {
78          super();
79      } //-- fr.in2p3.jsaga.generated.session.FilterType()
80  
81  
82        //-----------/
83       //- Methods -/
84      //-----------/
85  
86      /**
87       * Method deleteIsPortOptional
88       * 
89       */
90      public void deleteIsPortOptional()
91      {
92          this._has_isPortOptional= false;
93      } //-- void deleteIsPortOptional() 
94  
95      /**
96       * Method deletePort
97       * 
98       */
99      public void deletePort()
100     {
101         this._has_port= false;
102     } //-- void deletePort() 
103 
104     /**
105      * Returns the value of field 'basepath'.
106      * 
107      * @return String
108      * @return the value of field 'basepath'.
109      */
110     public java.lang.String getBasepath()
111     {
112         return this._basepath;
113     } //-- java.lang.String getBasepath() 
114 
115     /**
116      * Returns the value of field 'domain'.
117      * 
118      * @return String
119      * @return the value of field 'domain'.
120      */
121     public java.lang.String getDomain()
122     {
123         return this._domain;
124     } //-- java.lang.String getDomain() 
125 
126     /**
127      * Returns the value of field 'host'.
128      * 
129      * @return String
130      * @return the value of field 'host'.
131      */
132     public java.lang.String getHost()
133     {
134         return this._host;
135     } //-- java.lang.String getHost() 
136 
137     /**
138      * Returns the value of field 'isPortOptional'.
139      * 
140      * @return boolean
141      * @return the value of field 'isPortOptional'.
142      */
143     public boolean getIsPortOptional()
144     {
145         return this._isPortOptional;
146     } //-- boolean getIsPortOptional() 
147 
148     /**
149      * Returns the value of field 'port'.
150      * 
151      * @return int
152      * @return the value of field 'port'.
153      */
154     public int getPort()
155     {
156         return this._port;
157     } //-- int getPort() 
158 
159     /**
160      * Method hasIsPortOptional
161      * 
162      * 
163      * 
164      * @return boolean
165      */
166     public boolean hasIsPortOptional()
167     {
168         return this._has_isPortOptional;
169     } //-- boolean hasIsPortOptional() 
170 
171     /**
172      * Method hasPort
173      * 
174      * 
175      * 
176      * @return boolean
177      */
178     public boolean hasPort()
179     {
180         return this._has_port;
181     } //-- boolean hasPort() 
182 
183     /**
184      * Method isValid
185      * 
186      * 
187      * 
188      * @return boolean
189      */
190     public boolean isValid()
191     {
192         try {
193             validate();
194         }
195         catch (org.exolab.castor.xml.ValidationException vex) {
196             return false;
197         }
198         return true;
199     } //-- boolean isValid() 
200 
201     /**
202      * Method marshal
203      * 
204      * 
205      * 
206      * @param out
207      */
208     public void marshal(java.io.Writer out)
209         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
210     {
211         
212         Marshaller.marshal(this, out);
213     } //-- void marshal(java.io.Writer) 
214 
215     /**
216      * Method marshal
217      * 
218      * 
219      * 
220      * @param handler
221      */
222     public void marshal(org.xml.sax.ContentHandler handler)
223         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
224     {
225         
226         Marshaller.marshal(this, handler);
227     } //-- void marshal(org.xml.sax.ContentHandler) 
228 
229     /**
230      * Sets the value of field 'basepath'.
231      * 
232      * @param basepath the value of field 'basepath'.
233      */
234     public void setBasepath(java.lang.String basepath)
235     {
236         this._basepath = basepath;
237     } //-- void setBasepath(java.lang.String) 
238 
239     /**
240      * Sets the value of field 'domain'.
241      * 
242      * @param domain the value of field 'domain'.
243      */
244     public void setDomain(java.lang.String domain)
245     {
246         this._domain = domain;
247     } //-- void setDomain(java.lang.String) 
248 
249     /**
250      * Sets the value of field 'host'.
251      * 
252      * @param host the value of field 'host'.
253      */
254     public void setHost(java.lang.String host)
255     {
256         this._host = host;
257     } //-- void setHost(java.lang.String) 
258 
259     /**
260      * Sets the value of field 'isPortOptional'.
261      * 
262      * @param isPortOptional the value of field 'isPortOptional'.
263      */
264     public void setIsPortOptional(boolean isPortOptional)
265     {
266         this._isPortOptional = isPortOptional;
267         this._has_isPortOptional = true;
268     } //-- void setIsPortOptional(boolean) 
269 
270     /**
271      * Sets the value of field 'port'.
272      * 
273      * @param port the value of field 'port'.
274      */
275     public void setPort(int port)
276     {
277         this._port = port;
278         this._has_port = true;
279     } //-- void setPort(int) 
280 
281     /**
282      * Method unmarshal
283      * 
284      * 
285      * 
286      * @param reader
287      * @return Object
288      */
289     public static java.lang.Object unmarshal(java.io.Reader reader)
290         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
291     {
292         return (fr.in2p3.jsaga.generated.session.FilterType) Unmarshaller.unmarshal(fr.in2p3.jsaga.generated.session.FilterType.class, reader);
293     } //-- java.lang.Object unmarshal(java.io.Reader) 
294 
295     /**
296      * Method validate
297      * 
298      */
299     public void validate()
300         throws org.exolab.castor.xml.ValidationException
301     {
302         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
303         validator.validate(this);
304     } //-- void validate() 
305 
306 }