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.xml.schema.annotations.solrj;
9   
10  /**
11   * Element 'field' is used to specify the use of the SOLRJ
12   *  @Field annotation.
13   *  
14   * 
15   * @version $Revision$ $Date$
16   */
17  @SuppressWarnings("serial")
18  public class Field implements java.io.Serializable {
19  
20  
21        //--------------------------/
22       //- Class/Member Variables -/
23      //--------------------------/
24  
25      /**
26       * Attribute 'name' is used to specify the name of
27       *  the index field to be mapped against.
28       *  
29       */
30      private java.lang.String _name;
31  
32  
33        //----------------/
34       //- Constructors -/
35      //----------------/
36  
37      public Field() {
38          super();
39      }
40  
41  
42        //-----------/
43       //- Methods -/
44      //-----------/
45  
46      /**
47       * Returns the value of field 'name'. The field 'name' has the
48       * following description: Attribute 'name' is used to specify
49       * the name of
50       *  the index field to be mapped against.
51       *  
52       * 
53       * @return the value of field 'Name'.
54       */
55      public java.lang.String getName(
56      ) {
57          return this._name;
58      }
59  
60      /**
61       * Method isValid.
62       * 
63       * @return true if this object is valid according to the schema
64       */
65      public boolean isValid(
66      ) {
67          try {
68              validate();
69          } catch (org.exolab.castor.xml.ValidationException vex) {
70              return false;
71          }
72          return true;
73      }
74  
75      /**
76       * 
77       * 
78       * @param out
79       * @throws org.exolab.castor.xml.MarshalException if object is
80       * null or if any SAXException is thrown during marshaling
81       * @throws org.exolab.castor.xml.ValidationException if this
82       * object is an invalid instance according to the schema
83       */
84      public void marshal(
85              final java.io.Writer out)
86      throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
87          org.exolab.castor.xml.Marshaller.marshal(this, out);
88      }
89  
90      /**
91       * 
92       * 
93       * @param handler
94       * @throws java.io.IOException if an IOException occurs during
95       * marshaling
96       * @throws org.exolab.castor.xml.ValidationException if this
97       * object is an invalid instance according to the schema
98       * @throws org.exolab.castor.xml.MarshalException if object is
99       * null or if any SAXException is thrown during marshaling
100      */
101     public void marshal(
102             final org.xml.sax.ContentHandler handler)
103     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
104         org.exolab.castor.xml.Marshaller.marshal(this, handler);
105     }
106 
107     /**
108      * Sets the value of field 'name'. The field 'name' has the
109      * following description: Attribute 'name' is used to specify
110      * the name of
111      *  the index field to be mapped against.
112      *  
113      * 
114      * @param name the value of field 'name'.
115      */
116     public void setName(
117             final java.lang.String name) {
118         this._name = name;
119     }
120 
121     /**
122      * Method unmarshal.
123      * 
124      * @param reader
125      * @throws org.exolab.castor.xml.MarshalException if object is
126      * null or if any SAXException is thrown during marshaling
127      * @throws org.exolab.castor.xml.ValidationException if this
128      * object is an invalid instance according to the schema
129      * @return the unmarshaled
130      * org.exolab.castor.xml.schema.annotations.solrj.Field
131      */
132     public static org.exolab.castor.xml.schema.annotations.solrj.Field unmarshal(
133             final java.io.Reader reader)
134     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
135         return (org.exolab.castor.xml.schema.annotations.solrj.Field) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.solrj.Field.class, reader);
136     }
137 
138     /**
139      * 
140      * 
141      * @throws org.exolab.castor.xml.ValidationException if this
142      * object is an invalid instance according to the schema
143      */
144     public void validate(
145     )
146     throws org.exolab.castor.xml.ValidationException {
147         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
148         validator.validate(this);
149     }
150 
151 }