001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 1.1-M2</a>, using an XML
004: * Schema.
005: * $Id: IncludeType.java 6766 2007-01-18 21:12:08Z wguttmn $
006: */
007:
008: package org.exolab.castor.builder.binding.xml;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import org.exolab.castor.xml.Marshaller;
015: import org.exolab.castor.xml.Unmarshaller;
016:
017: /**
018: * A binding file can include other binding files by specifying the
019: * location
020: * (URI) of the binding files to include.
021: *
022: *
023: * @version $Revision: 6766 $ $Date$
024: */
025: public class IncludeType implements java.io.Serializable {
026:
027: //--------------------------/
028: //- Class/Member Variables -/
029: //--------------------------/
030:
031: /**
032: * Field _URI.
033: */
034: private java.lang.String _URI;
035:
036: //----------------/
037: //- Constructors -/
038: //----------------/
039:
040: public IncludeType() {
041: super ();
042: }
043:
044: //-----------/
045: //- Methods -/
046: //-----------/
047:
048: /**
049: * Returns the value of field 'URI'.
050: *
051: * @return the value of field 'URI'.
052: */
053: public java.lang.String getURI() {
054: return this ._URI;
055: }
056:
057: /**
058: * Method isValid.
059: *
060: * @return true if this object is valid according to the schema
061: */
062: public boolean isValid() {
063: try {
064: validate();
065: } catch (org.exolab.castor.xml.ValidationException vex) {
066: return false;
067: }
068: return true;
069: }
070:
071: /**
072: *
073: *
074: * @param out
075: * @throws org.exolab.castor.xml.MarshalException if object is
076: * null or if any SAXException is thrown during marshaling
077: * @throws org.exolab.castor.xml.ValidationException if this
078: * object is an invalid instance according to the schema
079: */
080: public void marshal(final java.io.Writer out)
081: throws org.exolab.castor.xml.MarshalException,
082: org.exolab.castor.xml.ValidationException {
083: Marshaller.marshal(this , out);
084: }
085:
086: /**
087: *
088: *
089: * @param handler
090: * @throws java.io.IOException if an IOException occurs during
091: * marshaling
092: * @throws org.exolab.castor.xml.ValidationException if this
093: * object is an invalid instance according to the schema
094: * @throws org.exolab.castor.xml.MarshalException if object is
095: * null or if any SAXException is thrown during marshaling
096: */
097: public void marshal(final org.xml.sax.ContentHandler handler)
098: throws java.io.IOException,
099: org.exolab.castor.xml.MarshalException,
100: org.exolab.castor.xml.ValidationException {
101: Marshaller.marshal(this , handler);
102: }
103:
104: /**
105: * Sets the value of field 'URI'.
106: *
107: * @param URI the value of field 'URI'.
108: */
109: public void setURI(final java.lang.String URI) {
110: this ._URI = URI;
111: }
112:
113: /**
114: * Method unmarshalIncludeType.
115: *
116: * @param reader
117: * @throws org.exolab.castor.xml.MarshalException if object is
118: * null or if any SAXException is thrown during marshaling
119: * @throws org.exolab.castor.xml.ValidationException if this
120: * object is an invalid instance according to the schema
121: * @return the unmarshaled
122: * org.exolab.castor.builder.binding.IncludeType
123: */
124: public static org.exolab.castor.builder.binding.xml.IncludeType unmarshalIncludeType(
125: final java.io.Reader reader)
126: throws org.exolab.castor.xml.MarshalException,
127: org.exolab.castor.xml.ValidationException {
128: return (org.exolab.castor.builder.binding.xml.IncludeType) Unmarshaller
129: .unmarshal(
130: org.exolab.castor.builder.binding.xml.IncludeType.class,
131: reader);
132: }
133:
134: /**
135: *
136: *
137: * @throws org.exolab.castor.xml.ValidationException if this
138: * object is an invalid instance according to the schema
139: */
140: public void validate()
141: throws org.exolab.castor.xml.ValidationException {
142: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
143: validator.validate(this);
144: }
145:
146: }
|