View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4    * Schema.
5    * $Id: Sequence.java,v 1.36 2007/01/04 16:26:28 clq2 Exp $
6    */
7   
8   package org.astrogrid.workflow.beans.v1;
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   * a collection of activities to be performed sequentially
26   * 
27   * @version $Revision: 1.36 $ $Date: 2007/01/04 16:26:28 $
28   */
29  public class Sequence extends org.astrogrid.workflow.beans.v1.ActivityContainer 
30  implements java.io.Serializable
31  {
32  
33  
34        //----------------/
35       //- Constructors -/
36      //----------------/
37  
38      public Sequence() {
39          super();
40      } //-- org.astrogrid.workflow.beans.v1.Sequence()
41  
42  
43        //-----------/
44       //- Methods -/
45      //-----------/
46  
47      /***
48       * Note: hashCode() has not been overriden
49       * 
50       * @param obj
51       */
52      public boolean equals(java.lang.Object obj)
53      {
54          if ( this == obj )
55              return true;
56          
57          if (super.equals(obj)==false)
58              return false;
59          
60          if (obj instanceof Sequence) {
61          
62              Sequence temp = (Sequence)obj;
63              return true;
64          }
65          return false;
66      } //-- boolean equals(java.lang.Object) 
67  
68      /***
69       * Method isValid
70       */
71      public boolean isValid()
72      {
73          try {
74              validate();
75          }
76          catch (org.exolab.castor.xml.ValidationException vex) {
77              return false;
78          }
79          return true;
80      } //-- boolean isValid() 
81  
82      /***
83       * Method marshal
84       * 
85       * @param out
86       */
87      public void marshal(java.io.Writer out)
88          throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
89      {
90          
91          Marshaller.marshal(this, out);
92      } //-- void marshal(java.io.Writer) 
93  
94      /***
95       * Method marshal
96       * 
97       * @param handler
98       */
99      public void marshal(org.xml.sax.ContentHandler handler)
100         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
101     {
102         
103         Marshaller.marshal(this, handler);
104     } //-- void marshal(org.xml.sax.ContentHandler) 
105 
106     /***
107      * Method unmarshalSequence
108      * 
109      * @param reader
110      */
111     public static org.astrogrid.workflow.beans.v1.Sequence unmarshalSequence(java.io.Reader reader)
112         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
113     {
114         return (org.astrogrid.workflow.beans.v1.Sequence) Unmarshaller.unmarshal(org.astrogrid.workflow.beans.v1.Sequence.class, reader);
115     } //-- org.astrogrid.workflow.beans.v1.Sequence unmarshalSequence(java.io.Reader) 
116 
117     /***
118      * Method validate
119      */
120     public void validate()
121         throws org.exolab.castor.xml.ValidationException
122     {
123         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
124         validator.validate(this);
125     } //-- void validate() 
126 
127 }