01: /*
02: * This class was automatically generated with
03: * <a href="http://www.castor.org">Castor 0.9.5.2</a>, using an XML
04: * Schema.
05: * $Id: Preference.java 6385 2007-10-25 14:02:26Z wehrens $
06: */
07:
08: package org.gridsphere.portletcontainer.impl.descriptor;
09:
10: //---------------------------------/
11: //- Imported classes and packages -/
12: //---------------------------------/
13:
14: import org.exolab.castor.xml.Marshaller;
15: import org.exolab.castor.xml.Unmarshaller;
16:
17: /**
18: * Class Preference.
19: *
20: * @version $Revision: 3298 $ $Date: 2004-06-29 07:19:44 -0700 (Tue, 29 Jun 2004) $
21: */
22: public class Preference extends PreferenceType implements
23: java.io.Serializable {
24:
25: //----------------/
26: //- Constructors -/
27: //----------------/
28:
29: public Preference() {
30: super ();
31: } //-- org.gridsphere.portletcontainer.jsr.descriptor.Preference()
32:
33: //-----------/
34: //- Methods -/
35: //-----------/
36:
37: /**
38: * Method isValid
39: */
40: public boolean isValid() {
41: try {
42: validate();
43: } catch (org.exolab.castor.xml.ValidationException vex) {
44: return false;
45: }
46: return true;
47: } //-- boolean isValid()
48:
49: /**
50: * Method marshal
51: *
52: * @param out
53: */
54: public void marshal(java.io.Writer out)
55: throws org.exolab.castor.xml.MarshalException,
56: org.exolab.castor.xml.ValidationException {
57:
58: Marshaller.marshal(this , out);
59: } //-- void marshal(java.io.Writer)
60:
61: /**
62: * Method marshal
63: *
64: * @param handler
65: */
66: public void marshal(org.xml.sax.ContentHandler handler)
67: throws java.io.IOException,
68: org.exolab.castor.xml.MarshalException,
69: org.exolab.castor.xml.ValidationException {
70:
71: Marshaller.marshal(this , handler);
72: } //-- void marshal(org.xml.sax.ContentHandler)
73:
74: /**
75: * Method unmarshal
76: *
77: * @param reader
78: */
79: public static java.lang.Object unmarshal(java.io.Reader reader)
80: throws org.exolab.castor.xml.MarshalException,
81: org.exolab.castor.xml.ValidationException {
82: return (org.gridsphere.portletcontainer.impl.descriptor.Preference) Unmarshaller
83: .unmarshal(
84: org.gridsphere.portletcontainer.impl.descriptor.Preference.class,
85: reader);
86: } //-- java.lang.Object unmarshal(java.io.Reader)
87:
88: /**
89: * Method validate
90: */
91: public void validate()
92: throws org.exolab.castor.xml.ValidationException {
93: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
94: validator.validate(this );
95: } //-- void validate()
96:
97: }
|