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 JsagaDefault.
26   * 
27   * @version $Revision$ $Date$
28   */
29  public class JsagaDefault implements java.io.Serializable {
30  
31  
32        //--------------------------/
33       //- Class/Member Variables -/
34      //--------------------------/
35  
36      /**
37       * Field _extends
38       */
39      private java.lang.String _extends;
40  
41      /**
42       * Field _contexts
43       */
44      private fr.in2p3.jsaga.generated.session.Contexts _contexts;
45  
46      /**
47       * Field _session
48       */
49      private fr.in2p3.jsaga.generated.session.Session _session;
50  
51  
52        //----------------/
53       //- Constructors -/
54      //----------------/
55  
56      public JsagaDefault() 
57       {
58          super();
59      } //-- fr.in2p3.jsaga.generated.session.JsagaDefault()
60  
61  
62        //-----------/
63       //- Methods -/
64      //-----------/
65  
66      /**
67       * Returns the value of field 'contexts'.
68       * 
69       * @return Contexts
70       * @return the value of field 'contexts'.
71       */
72      public fr.in2p3.jsaga.generated.session.Contexts getContexts()
73      {
74          return this._contexts;
75      } //-- fr.in2p3.jsaga.generated.session.Contexts getContexts() 
76  
77      /**
78       * Returns the value of field 'extends'.
79       * 
80       * @return String
81       * @return the value of field 'extends'.
82       */
83      public java.lang.String getExtends()
84      {
85          return this._extends;
86      } //-- java.lang.String getExtends() 
87  
88      /**
89       * Returns the value of field 'session'.
90       * 
91       * @return Session
92       * @return the value of field 'session'.
93       */
94      public fr.in2p3.jsaga.generated.session.Session getSession()
95      {
96          return this._session;
97      } //-- fr.in2p3.jsaga.generated.session.Session getSession() 
98  
99      /**
100      * Method isValid
101      * 
102      * 
103      * 
104      * @return boolean
105      */
106     public boolean isValid()
107     {
108         try {
109             validate();
110         }
111         catch (org.exolab.castor.xml.ValidationException vex) {
112             return false;
113         }
114         return true;
115     } //-- boolean isValid() 
116 
117     /**
118      * Method marshal
119      * 
120      * 
121      * 
122      * @param out
123      */
124     public void marshal(java.io.Writer out)
125         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
126     {
127         
128         Marshaller.marshal(this, out);
129     } //-- void marshal(java.io.Writer) 
130 
131     /**
132      * Method marshal
133      * 
134      * 
135      * 
136      * @param handler
137      */
138     public void marshal(org.xml.sax.ContentHandler handler)
139         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
140     {
141         
142         Marshaller.marshal(this, handler);
143     } //-- void marshal(org.xml.sax.ContentHandler) 
144 
145     /**
146      * Sets the value of field 'contexts'.
147      * 
148      * @param contexts the value of field 'contexts'.
149      */
150     public void setContexts(fr.in2p3.jsaga.generated.session.Contexts contexts)
151     {
152         this._contexts = contexts;
153     } //-- void setContexts(fr.in2p3.jsaga.generated.session.Contexts) 
154 
155     /**
156      * Sets the value of field 'extends'.
157      * 
158      * @param _extends
159      * @param extends the value of field 'extends'.
160      */
161     public void setExtends(java.lang.String _extends)
162     {
163         this._extends = _extends;
164     } //-- void setExtends(java.lang.String) 
165 
166     /**
167      * Sets the value of field 'session'.
168      * 
169      * @param session the value of field 'session'.
170      */
171     public void setSession(fr.in2p3.jsaga.generated.session.Session session)
172     {
173         this._session = session;
174     } //-- void setSession(fr.in2p3.jsaga.generated.session.Session) 
175 
176     /**
177      * Method unmarshal
178      * 
179      * 
180      * 
181      * @param reader
182      * @return Object
183      */
184     public static java.lang.Object unmarshal(java.io.Reader reader)
185         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
186     {
187         return (fr.in2p3.jsaga.generated.session.JsagaDefault) Unmarshaller.unmarshal(fr.in2p3.jsaga.generated.session.JsagaDefault.class, reader);
188     } //-- java.lang.Object unmarshal(java.io.Reader) 
189 
190     /**
191      * Method validate
192      * 
193      */
194     public void validate()
195         throws org.exolab.castor.xml.ValidationException
196     {
197         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
198         validator.validate(this);
199     } //-- void validate() 
200 
201 }