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