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 Resource.
26   * 
27   * @version $Revision$ $Date$
28   */
29  public class Resource extends ServiceType 
30  implements java.io.Serializable
31  {
32  
33  
34        //----------------/
35       //- Constructors -/
36      //----------------/
37  
38      public Resource() 
39       {
40          super();
41      } //-- fr.in2p3.jsaga.generated.session.Resource()
42  
43  
44        //-----------/
45       //- Methods -/
46      //-----------/
47  
48      /**
49       * Method isValid
50       * 
51       * 
52       * 
53       * @return boolean
54       */
55      public boolean isValid()
56      {
57          try {
58              validate();
59          }
60          catch (org.exolab.castor.xml.ValidationException vex) {
61              return false;
62          }
63          return true;
64      } //-- boolean isValid() 
65  
66      /**
67       * Method marshal
68       * 
69       * 
70       * 
71       * @param out
72       */
73      public void marshal(java.io.Writer out)
74          throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
75      {
76          
77          Marshaller.marshal(this, out);
78      } //-- void marshal(java.io.Writer) 
79  
80      /**
81       * Method marshal
82       * 
83       * 
84       * 
85       * @param handler
86       */
87      public void marshal(org.xml.sax.ContentHandler handler)
88          throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
89      {
90          
91          Marshaller.marshal(this, handler);
92      } //-- void marshal(org.xml.sax.ContentHandler) 
93  
94      /**
95       * Method unmarshal
96       * 
97       * 
98       * 
99       * @param reader
100      * @return Object
101      */
102     public static java.lang.Object unmarshal(java.io.Reader reader)
103         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
104     {
105         return (fr.in2p3.jsaga.generated.session.Resource) Unmarshaller.unmarshal(fr.in2p3.jsaga.generated.session.Resource.class, reader);
106     } //-- java.lang.Object unmarshal(java.io.Reader) 
107 
108     /**
109      * Method validate
110      * 
111      */
112     public void validate()
113         throws org.exolab.castor.xml.ValidationException
114     {
115         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
116         validator.validate(this);
117     } //-- void validate() 
118 
119 }