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 fr.in2p3.jsaga.engine.schema.config.types.AttributeSourceType;
15  import java.io.IOException;
16  import java.io.Reader;
17  import java.io.Serializable;
18  import java.io.Writer;
19  import org.exolab.castor.xml.MarshalException;
20  import org.exolab.castor.xml.Marshaller;
21  import org.exolab.castor.xml.Unmarshaller;
22  import org.exolab.castor.xml.ValidationException;
23  import org.xml.sax.ContentHandler;
24  
25  /**
26   * Class Attribute.
27   * 
28   * @version $Revision$ $Date$
29   */
30  public class Attribute implements java.io.Serializable {
31  
32  
33        //--------------------------/
34       //- Class/Member Variables -/
35      //--------------------------/
36  
37      /**
38       * Field _name
39       */
40      private java.lang.String _name;
41  
42      /**
43       * Field _value
44       */
45      private java.lang.String _value;
46  
47      /**
48       * Field _source
49       */
50      private fr.in2p3.jsaga.engine.schema.config.types.AttributeSourceType _source;
51  
52  
53        //----------------/
54       //- Constructors -/
55      //----------------/
56  
57      public Attribute() 
58       {
59          super();
60      } //-- fr.in2p3.jsaga.engine.schema.config.Attribute()
61  
62  
63        //-----------/
64       //- Methods -/
65      //-----------/
66  
67      /**
68       * Returns the value of field 'name'.
69       * 
70       * @return String
71       * @return the value of field 'name'.
72       */
73      public java.lang.String getName()
74      {
75          return this._name;
76      } //-- java.lang.String getName() 
77  
78      /**
79       * Returns the value of field 'source'.
80       * 
81       * @return AttributeSourceType
82       * @return the value of field 'source'.
83       */
84      public fr.in2p3.jsaga.engine.schema.config.types.AttributeSourceType getSource()
85      {
86          return this._source;
87      } //-- fr.in2p3.jsaga.engine.schema.config.types.AttributeSourceType getSource() 
88  
89      /**
90       * Returns the value of field 'value'.
91       * 
92       * @return String
93       * @return the value of field 'value'.
94       */
95      public java.lang.String getValue()
96      {
97          return this._value;
98      } //-- java.lang.String getValue() 
99  
100     /**
101      * Method isValid
102      * 
103      * 
104      * 
105      * @return boolean
106      */
107     public boolean isValid()
108     {
109         try {
110             validate();
111         }
112         catch (org.exolab.castor.xml.ValidationException vex) {
113             return false;
114         }
115         return true;
116     } //-- boolean isValid() 
117 
118     /**
119      * Method marshal
120      * 
121      * 
122      * 
123      * @param out
124      */
125     public void marshal(java.io.Writer out)
126         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
127     {
128         
129         Marshaller.marshal(this, out);
130     } //-- void marshal(java.io.Writer) 
131 
132     /**
133      * Method marshal
134      * 
135      * 
136      * 
137      * @param handler
138      */
139     public void marshal(org.xml.sax.ContentHandler handler)
140         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
141     {
142         
143         Marshaller.marshal(this, handler);
144     } //-- void marshal(org.xml.sax.ContentHandler) 
145 
146     /**
147      * Sets the value of field 'name'.
148      * 
149      * @param name the value of field 'name'.
150      */
151     public void setName(java.lang.String name)
152     {
153         this._name = name;
154     } //-- void setName(java.lang.String) 
155 
156     /**
157      * Sets the value of field 'source'.
158      * 
159      * @param source the value of field 'source'.
160      */
161     public void setSource(fr.in2p3.jsaga.engine.schema.config.types.AttributeSourceType source)
162     {
163         this._source = source;
164     } //-- void setSource(fr.in2p3.jsaga.engine.schema.config.types.AttributeSourceType) 
165 
166     /**
167      * Sets the value of field 'value'.
168      * 
169      * @param value the value of field 'value'.
170      */
171     public void setValue(java.lang.String value)
172     {
173         this._value = value;
174     } //-- void setValue(java.lang.String) 
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.engine.schema.config.Attribute) Unmarshaller.unmarshal(fr.in2p3.jsaga.engine.schema.config.Attribute.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 }