View Javadoc
1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.exolab.castor.builder.binding.xml;
9   
10  /**
11   * Class Interface.
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class Interface implements java.io.Serializable {
16  
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * Field _name.
24       */
25      private java.lang.String _name;
26  
27  
28        //----------------/
29       //- Constructors -/
30      //----------------/
31  
32      public Interface() {
33          super();
34      }
35  
36  
37        //-----------/
38       //- Methods -/
39      //-----------/
40  
41      /**
42       * Returns the value of field 'name'.
43       * 
44       * @return the value of field 'Name'.
45       */
46      public java.lang.String getName(
47      ) {
48          return this._name;
49      }
50  
51      /**
52       * Method isValid.
53       * 
54       * @return true if this object is valid according to the schema
55       */
56      public boolean isValid(
57      ) {
58          try {
59              validate();
60          } catch (org.exolab.castor.xml.ValidationException vex) {
61              return false;
62          }
63          return true;
64      }
65  
66      /**
67       * 
68       * 
69       * @param out
70       * @throws org.exolab.castor.xml.MarshalException if object is
71       * null or if any SAXException is thrown during marshaling
72       * @throws org.exolab.castor.xml.ValidationException if this
73       * object is an invalid instance according to the schema
74       */
75      public void marshal(
76              final java.io.Writer out)
77      throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
78          org.exolab.castor.xml.Marshaller.marshal(this, out);
79      }
80  
81      /**
82       * 
83       * 
84       * @param handler
85       * @throws java.io.IOException if an IOException occurs during
86       * marshaling
87       * @throws org.exolab.castor.xml.ValidationException if this
88       * object is an invalid instance according to the schema
89       * @throws org.exolab.castor.xml.MarshalException if object is
90       * null or if any SAXException is thrown during marshaling
91       */
92      public void marshal(
93              final org.xml.sax.ContentHandler handler)
94      throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
95          org.exolab.castor.xml.Marshaller.marshal(this, handler);
96      }
97  
98      /**
99       * Sets the value of field 'name'.
100      * 
101      * @param name the value of field 'name'.
102      */
103     public void setName(
104             final java.lang.String name) {
105         this._name = name;
106     }
107 
108     /**
109      * Method unmarshalInterface.
110      * 
111      * @param reader
112      * @throws org.exolab.castor.xml.MarshalException if object is
113      * null or if any SAXException is thrown during marshaling
114      * @throws org.exolab.castor.xml.ValidationException if this
115      * object is an invalid instance according to the schema
116      * @return the unmarshaled
117      * org.exolab.castor.builder.binding.xml.Interface
118      */
119     public static org.exolab.castor.builder.binding.xml.Interface unmarshalInterface(
120             final java.io.Reader reader)
121     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
122         return (org.exolab.castor.builder.binding.xml.Interface) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.Interface.class, reader);
123     }
124 
125     /**
126      * 
127      * 
128      * @throws org.exolab.castor.xml.ValidationException if this
129      * object is an invalid instance according to the schema
130      */
131     public void validate(
132     )
133     throws org.exolab.castor.xml.ValidationException {
134         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
135         validator.validate(this);
136     }
137 
138 }