001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
004: * Schema.
005: * $Id$
006: */
007:
008: package com.calipso.reportgenerator.reportdefinitions;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import java.io.IOException;
015: import java.io.Reader;
016: import java.io.Serializable;
017: import java.io.Writer;
018: import org.exolab.castor.xml.MarshalException;
019: import org.exolab.castor.xml.Marshaller;
020: import org.exolab.castor.xml.Unmarshaller;
021: import org.exolab.castor.xml.ValidationException;
022: import org.xml.sax.ContentHandler;
023:
024: /**
025: * Class Literals.
026: *
027: * @version $Revision$ $Date$
028: */
029: public class Literals implements java.io.Serializable {
030:
031: //--------------------------/
032: //- Class/Member Variables -/
033: //--------------------------/
034:
035: /**
036: * Field _code
037: */
038: private java.lang.String _code;
039:
040: /**
041: * Field _value
042: */
043: private java.lang.String _value;
044:
045: //----------------/
046: //- Constructors -/
047: //----------------/
048:
049: public Literals() {
050: super ();
051: } //-- com.calipso.reportgenerator.reportdefinitions.Literals()
052:
053: //-----------/
054: //- Methods -/
055: //-----------/
056:
057: /**
058: * Method getCodeReturns the value of field 'code'.
059: *
060: * @return the value of field 'code'.
061: */
062: public java.lang.String getCode() {
063: return this ._code;
064: } //-- java.lang.String getCode()
065:
066: /**
067: * Method getValueReturns the value of field 'value'.
068: *
069: * @return the value of field 'value'.
070: */
071: public java.lang.String getValue() {
072: return this ._value;
073: } //-- java.lang.String getValue()
074:
075: /**
076: * Method isValid
077: */
078: public boolean isValid() {
079: try {
080: validate();
081: } catch (org.exolab.castor.xml.ValidationException vex) {
082: return false;
083: }
084: return true;
085: } //-- boolean isValid()
086:
087: /**
088: * Method marshal
089: *
090: * @param out
091: */
092: public void marshal(java.io.Writer out)
093: throws org.exolab.castor.xml.MarshalException,
094: org.exolab.castor.xml.ValidationException {
095:
096: Marshaller.marshal(this , out);
097: } //-- void marshal(java.io.Writer)
098:
099: /**
100: * Method marshal
101: *
102: * @param handler
103: */
104: public void marshal(org.xml.sax.ContentHandler handler)
105: throws java.io.IOException,
106: org.exolab.castor.xml.MarshalException,
107: org.exolab.castor.xml.ValidationException {
108:
109: Marshaller.marshal(this , handler);
110: } //-- void marshal(org.xml.sax.ContentHandler)
111:
112: /**
113: * Method setCodeSets the value of field 'code'.
114: *
115: * @param code the value of field 'code'.
116: */
117: public void setCode(java.lang.String code) {
118: this ._code = code;
119: } //-- void setCode(java.lang.String)
120:
121: /**
122: * Method setValueSets the value of field 'value'.
123: *
124: * @param value the value of field 'value'.
125: */
126: public void setValue(java.lang.String value) {
127: this ._value = value;
128: } //-- void setValue(java.lang.String)
129:
130: /**
131: * Method unmarshal
132: *
133: * @param reader
134: */
135: public static com.calipso.reportgenerator.reportdefinitions.Literals unmarshal(
136: java.io.Reader reader)
137: throws org.exolab.castor.xml.MarshalException,
138: org.exolab.castor.xml.ValidationException {
139: return (com.calipso.reportgenerator.reportdefinitions.Literals) Unmarshaller
140: .unmarshal(
141: com.calipso.reportgenerator.reportdefinitions.Literals.class,
142: reader);
143: } //-- com.calipso.reportgenerator.reportdefinitions.Literals unmarshal(java.io.Reader)
144:
145: /**
146: * Method validate
147: */
148: public void validate()
149: throws org.exolab.castor.xml.ValidationException {
150: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
151: validator.validate(this );
152: } //-- void validate()
153:
154: }
|