View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://castor.exolab.org">Castor 0.9.2</a>, using an
4    * XML Schema.
5    * $Id$
6    */
7   
8   package org.apache.jetspeed.xml.api.jcm;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import java.io.Reader;
15  import java.io.Serializable;
16  import java.io.Writer;
17  import org.exolab.castor.xml.*;
18  import org.exolab.castor.xml.MarshalException;
19  import org.exolab.castor.xml.ValidationException;
20  import org.xml.sax.DocumentHandler;
21  
22  /***
23   * 
24   * @version $Revision$ $Date$
25  **/
26  public class Content implements java.io.Serializable {
27  
28  
29        //--------------------------/
30       //- Class/Member Variables -/
31      //--------------------------/
32  
33      private java.lang.String _version;
34  
35      private Channel _channel;
36  
37  
38        //----------------/
39       //- Constructors -/
40      //----------------/
41  
42      public Content() {
43          super();
44      } //-- org.apache.jetspeed.xml.api.jcm.Content()
45  
46  
47        //-----------/
48       //- Methods -/
49      //-----------/
50  
51      /***
52      **/
53      public Channel getChannel()
54      {
55          return this._channel;
56      } //-- Channel getChannel() 
57  
58      /***
59      **/
60      public java.lang.String getVersion()
61      {
62          return this._version;
63      } //-- java.lang.String getVersion() 
64  
65      /***
66      **/
67      public boolean isValid()
68      {
69          try {
70              validate();
71          }
72          catch (org.exolab.castor.xml.ValidationException vex) {
73              return false;
74          }
75          return true;
76      } //-- boolean isValid() 
77  
78      /***
79       * 
80       * @param out
81      **/
82      public void marshal(java.io.Writer out)
83          throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
84      {
85          
86          Marshaller.marshal(this, out);
87      } //-- void marshal(java.io.Writer) 
88  
89      /***
90       * 
91       * @param handler
92      **/
93      public void marshal(org.xml.sax.DocumentHandler handler)
94          throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
95      {
96          
97          Marshaller.marshal(this, handler);
98      } //-- void marshal(org.xml.sax.DocumentHandler) 
99  
100     /***
101      * 
102      * @param channel
103     **/
104     public void setChannel(Channel channel)
105     {
106         this._channel = channel;
107     } //-- void setChannel(Channel) 
108 
109     /***
110      * 
111      * @param version
112     **/
113     public void setVersion(java.lang.String version)
114     {
115         this._version = version;
116     } //-- void setVersion(java.lang.String) 
117 
118     /***
119      * 
120      * @param reader
121     **/
122     public static org.apache.jetspeed.xml.api.jcm.Content unmarshal(java.io.Reader reader)
123         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
124     {
125         return (org.apache.jetspeed.xml.api.jcm.Content) Unmarshaller.unmarshal(org.apache.jetspeed.xml.api.jcm.Content.class, reader);
126     } //-- org.apache.jetspeed.xml.api.jcm.Content unmarshal(java.io.Reader) 
127 
128     /***
129     **/
130     public void validate()
131         throws org.exolab.castor.xml.ValidationException
132     {
133         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
134         validator.validate(this);
135     } //-- void validate() 
136 
137 }