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.mapping.xml;
9
10 /**
11 * Class PropertyType.
12 *
13 * @version $Revision$ $Date$
14 */
15 @SuppressWarnings("serial")
16 public abstract class PropertyType implements java.io.Serializable {
17
18
19 //--------------------------/
20 //- Class/Member Variables -/
21 //--------------------------/
22
23 /**
24 * Field _name.
25 */
26 private java.lang.String _name;
27
28 /**
29 * Field _value.
30 */
31 private java.lang.String _value;
32
33
34 //----------------/
35 //- Constructors -/
36 //----------------/
37
38 public PropertyType() {
39 super();
40 }
41
42
43 //-----------/
44 //- Methods -/
45 //-----------/
46
47 /**
48 * Returns the value of field 'name'.
49 *
50 * @return the value of field 'Name'.
51 */
52 public java.lang.String getName(
53 ) {
54 return this._name;
55 }
56
57 /**
58 * Returns the value of field 'value'.
59 *
60 * @return the value of field 'Value'.
61 */
62 public java.lang.String getValue(
63 ) {
64 return this._value;
65 }
66
67 /**
68 * Method isValid.
69 *
70 * @return true if this object is valid according to the schema
71 */
72 public boolean isValid(
73 ) {
74 try {
75 validate();
76 } catch (org.exolab.castor.xml.ValidationException vex) {
77 return false;
78 }
79 return true;
80 }
81
82 /**
83 * Sets the value of field 'name'.
84 *
85 * @param name the value of field 'name'.
86 */
87 public void setName(
88 final java.lang.String name) {
89 this._name = name;
90 }
91
92 /**
93 * Sets the value of field 'value'.
94 *
95 * @param value the value of field 'value'.
96 */
97 public void setValue(
98 final java.lang.String value) {
99 this._value = value;
100 }
101
102 /**
103 *
104 *
105 * @throws org.exolab.castor.xml.ValidationException if this
106 * object is an invalid instance according to the schema
107 */
108 public void validate(
109 )
110 throws org.exolab.castor.xml.ValidationException {
111 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
112 validator.validate(this);
113 }
114
115 }