001: /*
002: * (C) Copyright 2000 - 2005 Nabh Information Systems, Inc.
003: *
004: * This program is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU General Public License
006: * as published by the Free Software Foundation; either version 2
007: * of the License, or (at your option) any later version.
008: *
009: * This program is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: * GNU General Public License for more details.
013: *
014: * You should have received a copy of the GNU General Public License
015: * along with this program; if not, write to the Free Software
016: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
017: *
018: */
019:
020: //
021: // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.4-b18-fcs
022: // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
023: // Any modifications to this file will be lost upon recompilation of the source schema.
024: // Generated on: 2005.03.04 at 10:20:40 PST
025: //
026:
027: package com.nabhinc.portal.config.impl;
028:
029: public class SupportsTypeImpl implements
030: com.nabhinc.portal.config.SupportsType,
031: com.sun.xml.bind.JAXBObject,
032: com.nabhinc.portal.config.impl.runtime.UnmarshallableObject,
033: com.nabhinc.portal.config.impl.runtime.XMLSerializable,
034: com.nabhinc.portal.config.impl.runtime.ValidatableObject {
035:
036: protected com.nabhinc.portal.config.MimeTypeType _MimeType;
037: protected com.sun.xml.bind.util.ListImpl _PortletMode;
038: protected java.lang.String _Id;
039: public final static java.lang.Class version = (com.nabhinc.portal.config.impl.JAXBVersion.class);
040: private static com.sun.msv.grammar.Grammar schemaFragment;
041:
042: private final static java.lang.Class PRIMARY_INTERFACE_CLASS() {
043: return (com.nabhinc.portal.config.SupportsType.class);
044: }
045:
046: public com.nabhinc.portal.config.MimeTypeType getMimeType() {
047: return _MimeType;
048: }
049:
050: public void setMimeType(com.nabhinc.portal.config.MimeTypeType value) {
051: _MimeType = value;
052: }
053:
054: protected com.sun.xml.bind.util.ListImpl _getPortletMode() {
055: if (_PortletMode == null) {
056: _PortletMode = new com.sun.xml.bind.util.ListImpl(
057: new java.util.ArrayList());
058: }
059: return _PortletMode;
060: }
061:
062: public java.util.List getPortletMode() {
063: return _getPortletMode();
064: }
065:
066: public java.lang.String getId() {
067: return _Id;
068: }
069:
070: public void setId(java.lang.String value) {
071: _Id = value;
072: }
073:
074: public com.nabhinc.portal.config.impl.runtime.UnmarshallingEventHandler createUnmarshaller(
075: com.nabhinc.portal.config.impl.runtime.UnmarshallingContext context) {
076: return new com.nabhinc.portal.config.impl.SupportsTypeImpl.Unmarshaller(
077: context);
078: }
079:
080: public void serializeBody(
081: com.nabhinc.portal.config.impl.runtime.XMLSerializer context)
082: throws org.xml.sax.SAXException {
083: int idx2 = 0;
084: final int len2 = ((_PortletMode == null) ? 0 : _PortletMode
085: .size());
086: context
087: .startElement(
088: "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd",
089: "mime-type");
090: context.childAsURIs(((com.sun.xml.bind.JAXBObject) _MimeType),
091: "MimeType");
092: context.endNamespaceDecls();
093: context.childAsAttributes(
094: ((com.sun.xml.bind.JAXBObject) _MimeType), "MimeType");
095: context.endAttributes();
096: context.childAsBody(((com.sun.xml.bind.JAXBObject) _MimeType),
097: "MimeType");
098: context.endElement();
099: while (idx2 != len2) {
100: context
101: .startElement(
102: "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd",
103: "portlet-mode");
104: int idx_2 = idx2;
105: context.childAsURIs(
106: ((com.sun.xml.bind.JAXBObject) _PortletMode
107: .get(idx_2++)), "PortletMode");
108: context.endNamespaceDecls();
109: int idx_3 = idx2;
110: context.childAsAttributes(
111: ((com.sun.xml.bind.JAXBObject) _PortletMode
112: .get(idx_3++)), "PortletMode");
113: context.endAttributes();
114: context.childAsBody(
115: ((com.sun.xml.bind.JAXBObject) _PortletMode
116: .get(idx2++)), "PortletMode");
117: context.endElement();
118: }
119: }
120:
121: public void serializeAttributes(
122: com.nabhinc.portal.config.impl.runtime.XMLSerializer context)
123: throws org.xml.sax.SAXException {
124: int idx2 = 0;
125: final int len2 = ((_PortletMode == null) ? 0 : _PortletMode
126: .size());
127: if (_Id != null) {
128: context.startAttribute("", "id");
129: try {
130: context.text(((java.lang.String) _Id), "Id");
131: } catch (java.lang.Exception e) {
132: com.nabhinc.portal.config.impl.runtime.Util
133: .handlePrintConversionException(this , e,
134: context);
135: }
136: context.endAttribute();
137: }
138: while (idx2 != len2) {
139: idx2 += 1;
140: }
141: }
142:
143: public void serializeURIs(
144: com.nabhinc.portal.config.impl.runtime.XMLSerializer context)
145: throws org.xml.sax.SAXException {
146: int idx2 = 0;
147: final int len2 = ((_PortletMode == null) ? 0 : _PortletMode
148: .size());
149: while (idx2 != len2) {
150: idx2 += 1;
151: }
152: }
153:
154: public java.lang.Class getPrimaryInterface() {
155: return (com.nabhinc.portal.config.SupportsType.class);
156: }
157:
158: public com.sun.msv.verifier.DocumentDeclaration createRawValidator() {
159: if (schemaFragment == null) {
160: schemaFragment = com.sun.xml.bind.validator.SchemaDeserializer
161: .deserialize(("\u00ac\u00ed\u0000\u0005sr\u0000\u001fcom.sun.msv.grammar.SequenceExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000\u001dcom.su"
162: + "n.msv.grammar.BinaryExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0002L\u0000\u0004exp1t\u0000 Lcom/sun/msv/gra"
163: + "mmar/Expression;L\u0000\u0004exp2q\u0000~\u0000\u0002xr\u0000\u001ecom.sun.msv.grammar.Expressi"
164: + "on\u00f8\u0018\u0082\u00e8N5~O\u0002\u0000\u0002L\u0000\u0013epsilonReducibilityt\u0000\u0013Ljava/lang/Boolean;L\u0000\u000b"
165: + "expandedExpq\u0000~\u0000\u0002xpppsq\u0000~\u0000\u0000ppsr\u0000\'com.sun.msv.grammar.trex.Ele"
166: + "mentPattern\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0001L\u0000\tnameClasst\u0000\u001fLcom/sun/msv/grammar/Na"
167: + "meClass;xr\u0000\u001ecom.sun.msv.grammar.ElementExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0002Z\u0000\u001aigno"
168: + "reUndeclaredAttributesL\u0000\fcontentModelq\u0000~\u0000\u0002xq\u0000~\u0000\u0003pp\u0000sq\u0000~\u0000\u0000pps"
169: + "q\u0000~\u0000\u0007pp\u0000sr\u0000\u001dcom.sun.msv.grammar.ChoiceExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xq\u0000~\u0000\u0001pp"
170: + "sr\u0000 com.sun.msv.grammar.OneOrMoreExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000\u001ccom.sun.m"
171: + "sv.grammar.UnaryExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0001L\u0000\u0003expq\u0000~\u0000\u0002xq\u0000~\u0000\u0003sr\u0000\u0011java.lang"
172: + ".Boolean\u00cd r\u0080\u00d5\u009c\u00fa\u00ee\u0002\u0000\u0001Z\u0000\u0005valuexp\u0000psr\u0000 com.sun.msv.grammar.Attri"
173: + "buteExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0002L\u0000\u0003expq\u0000~\u0000\u0002L\u0000\tnameClassq\u0000~\u0000\bxq\u0000~\u0000\u0003q\u0000~\u0000\u0013psr"
174: + "\u00002com.sun.msv.grammar.Expression$AnyStringExpression\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001"
175: + "\u0002\u0000\u0000xq\u0000~\u0000\u0003sq\u0000~\u0000\u0012\u0001q\u0000~\u0000\u0017sr\u0000 com.sun.msv.grammar.AnyNameClass\u0000\u0000\u0000"
176: + "\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000\u001dcom.sun.msv.grammar.NameClass\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xpsr\u00000co"
177: + "m.sun.msv.grammar.Expression$EpsilonExpression\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xq\u0000"
178: + "~\u0000\u0003q\u0000~\u0000\u0018q\u0000~\u0000\u001dsr\u0000#com.sun.msv.grammar.SimpleNameClass\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001"
179: + "\u0002\u0000\u0002L\u0000\tlocalNamet\u0000\u0012Ljava/lang/String;L\u0000\fnamespaceURIq\u0000~\u0000\u001fxq\u0000~"
180: + "\u0000\u001at\u0000&com.nabhinc.portal.config.MimeTypeTypet\u0000+http://java.su"
181: + "n.com/jaxb/xjc/dummy-elementssq\u0000~\u0000\rppsq\u0000~\u0000\u0014q\u0000~\u0000\u0013psr\u0000\u001bcom.sun"
182: + ".msv.grammar.DataExp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0003L\u0000\u0002dtt\u0000\u001fLorg/relaxng/datatype"
183: + "/Datatype;L\u0000\u0006exceptq\u0000~\u0000\u0002L\u0000\u0004namet\u0000\u001dLcom/sun/msv/util/StringPa"
184: + "ir;xq\u0000~\u0000\u0003ppsr\u0000\"com.sun.msv.datatype.xsd.QnameType\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000"
185: + "xr\u0000*com.sun.msv.datatype.xsd.BuiltinAtomicType\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000"
186: + "%com.sun.msv.datatype.xsd.ConcreteType\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000\'com.sun"
187: + ".msv.datatype.xsd.XSDatatypeImpl\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0003L\u0000\fnamespaceUriq\u0000"
188: + "~\u0000\u001fL\u0000\btypeNameq\u0000~\u0000\u001fL\u0000\nwhiteSpacet\u0000.Lcom/sun/msv/datatype/xsd"
189: + "/WhiteSpaceProcessor;xpt\u0000 http://www.w3.org/2001/XMLSchemat\u0000"
190: + "\u0005QNamesr\u00005com.sun.msv.datatype.xsd.WhiteSpaceProcessor$Colla"
191: + "pse\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xr\u0000,com.sun.msv.datatype.xsd.WhiteSpaceProcess"
192: + "or\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xpsr\u00000com.sun.msv.grammar.Expression$NullSetExp"
193: + "ression\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xq\u0000~\u0000\u0003ppsr\u0000\u001bcom.sun.msv.util.StringPair\u00d0t\u001e"
194: + "jB\u008f\u008d\u00a0\u0002\u0000\u0002L\u0000\tlocalNameq\u0000~\u0000\u001fL\u0000\fnamespaceURIq\u0000~\u0000\u001fxpq\u0000~\u00000q\u0000~\u0000/sq\u0000"
195: + "~\u0000\u001et\u0000\u0004typet\u0000)http://www.w3.org/2001/XMLSchema-instanceq\u0000~\u0000\u001ds"
196: + "q\u0000~\u0000\u001et\u0000\tmime-typet\u00006http://java.sun.com/xml/ns/portlet/portl"
197: + "et-app_1_0.xsdsq\u0000~\u0000\rppsq\u0000~\u0000\u000fq\u0000~\u0000\u0013psq\u0000~\u0000\u0007q\u0000~\u0000\u0013p\u0000sq\u0000~\u0000\u0000ppsq\u0000~\u0000"
198: + "\u0007pp\u0000sq\u0000~\u0000\rppsq\u0000~\u0000\u000fq\u0000~\u0000\u0013psq\u0000~\u0000\u0014q\u0000~\u0000\u0013pq\u0000~\u0000\u0017q\u0000~\u0000\u001bq\u0000~\u0000\u001dsq\u0000~\u0000\u001et\u0000)"
199: + "com.nabhinc.portal.config.PortletModeTypeq\u0000~\u0000\"sq\u0000~\u0000\rppsq\u0000~\u0000\u0014"
200: + "q\u0000~\u0000\u0013pq\u0000~\u0000(q\u0000~\u00008q\u0000~\u0000\u001dsq\u0000~\u0000\u001et\u0000\fportlet-modeq\u0000~\u0000=q\u0000~\u0000\u001dsq\u0000~\u0000\rpp"
201: + "sq\u0000~\u0000\u0014q\u0000~\u0000\u0013psq\u0000~\u0000%ppsr\u0000#com.sun.msv.datatype.xsd.StringType\u0000"
202: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0001Z\u0000\risAlwaysValidxq\u0000~\u0000*q\u0000~\u0000/t\u0000\u0006stringsr\u00005com.sun.ms"
203: + "v.datatype.xsd.WhiteSpaceProcessor$Preserve\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0000xq\u0000~\u00002"
204: + "\u0001q\u0000~\u00005sq\u0000~\u00006q\u0000~\u0000Qq\u0000~\u0000/sq\u0000~\u0000\u001et\u0000\u0002idt\u0000\u0000q\u0000~\u0000\u001dsr\u0000\"com.sun.msv.gra"
205: + "mmar.ExpressionPool\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0000\u0001L\u0000\bexpTablet\u0000/Lcom/sun/msv/gra"
206: + "mmar/ExpressionPool$ClosedHash;xpsr\u0000-com.sun.msv.grammar.Exp"
207: + "ressionPool$ClosedHash\u00d7j\u00d0N\u00ef\u00e8\u00ed\u001c\u0003\u0000\u0003I\u0000\u0005countB\u0000\rstreamVersionL\u0000\u0006"
208: + "parentt\u0000$Lcom/sun/msv/grammar/ExpressionPool;xp\u0000\u0000\u0000\r\u0001pq\u0000~\u0000?q\u0000"
209: + "~\u0000#q\u0000~\u0000Hq\u0000~\u0000\u0005q\u0000~\u0000Lq\u0000~\u0000\u000eq\u0000~\u0000Cq\u0000~\u0000\u0011q\u0000~\u0000Dq\u0000~\u0000>q\u0000~\u0000\u000bq\u0000~\u0000Aq\u0000~\u0000\u0006x"));
210: }
211: return new com.sun.msv.verifier.regexp.REDocumentDeclaration(
212: schemaFragment);
213: }
214:
215: public class Unmarshaller
216: extends
217: com.nabhinc.portal.config.impl.runtime.AbstractUnmarshallingEventHandlerImpl {
218:
219: public Unmarshaller(
220: com.nabhinc.portal.config.impl.runtime.UnmarshallingContext context) {
221: super (context, "----------");
222: }
223:
224: protected Unmarshaller(
225: com.nabhinc.portal.config.impl.runtime.UnmarshallingContext context,
226: int startState) {
227: this (context);
228: state = startState;
229: }
230:
231: public java.lang.Object owner() {
232: return com.nabhinc.portal.config.impl.SupportsTypeImpl.this ;
233: }
234:
235: public void enterElement(java.lang.String ___uri,
236: java.lang.String ___local, java.lang.String ___qname,
237: org.xml.sax.Attributes __atts)
238: throws org.xml.sax.SAXException {
239: int attIdx;
240: outer: while (true) {
241: switch (state) {
242: case 0:
243: attIdx = context.getAttribute("", "id");
244: if (attIdx >= 0) {
245: final java.lang.String v = context
246: .eatAttribute(attIdx);
247: eatText1(v);
248: state = 3;
249: continue outer;
250: }
251: state = 3;
252: continue outer;
253: case 9:
254: if (("portlet-mode" == ___local)
255: && ("http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" == ___uri)) {
256: context.pushAttributes(__atts, true);
257: state = 7;
258: return;
259: }
260: revertToParentFromEnterElement(___uri, ___local,
261: ___qname, __atts);
262: return;
263: case 6:
264: if (("portlet-mode" == ___local)
265: && ("http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" == ___uri)) {
266: context.pushAttributes(__atts, true);
267: state = 7;
268: return;
269: }
270: state = 9;
271: continue outer;
272: case 3:
273: if (("mime-type" == ___local)
274: && ("http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" == ___uri)) {
275: context.pushAttributes(__atts, true);
276: state = 4;
277: return;
278: }
279: break;
280: }
281: super .enterElement(___uri, ___local, ___qname, __atts);
282: break;
283: }
284: }
285:
286: private void eatText1(final java.lang.String value)
287: throws org.xml.sax.SAXException {
288: try {
289: _Id = value;
290: } catch (java.lang.Exception e) {
291: handleParseConversionException(e);
292: }
293: }
294:
295: public void leaveElement(java.lang.String ___uri,
296: java.lang.String ___local, java.lang.String ___qname)
297: throws org.xml.sax.SAXException {
298: int attIdx;
299: outer: while (true) {
300: switch (state) {
301: case 0:
302: attIdx = context.getAttribute("", "id");
303: if (attIdx >= 0) {
304: final java.lang.String v = context
305: .eatAttribute(attIdx);
306: eatText1(v);
307: state = 3;
308: continue outer;
309: }
310: state = 3;
311: continue outer;
312: case 5:
313: if (("mime-type" == ___local)
314: && ("http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" == ___uri)) {
315: context.popAttributes();
316: state = 6;
317: return;
318: }
319: break;
320: case 9:
321: revertToParentFromLeaveElement(___uri, ___local,
322: ___qname);
323: return;
324: case 8:
325: if (("portlet-mode" == ___local)
326: && ("http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" == ___uri)) {
327: context.popAttributes();
328: state = 9;
329: return;
330: }
331: break;
332: case 6:
333: state = 9;
334: continue outer;
335: }
336: super .leaveElement(___uri, ___local, ___qname);
337: break;
338: }
339: }
340:
341: public void enterAttribute(java.lang.String ___uri,
342: java.lang.String ___local, java.lang.String ___qname)
343: throws org.xml.sax.SAXException {
344: int attIdx;
345: outer: while (true) {
346: switch (state) {
347: case 0:
348: if (("id" == ___local) && ("" == ___uri)) {
349: state = 1;
350: return;
351: }
352: state = 3;
353: continue outer;
354: case 9:
355: revertToParentFromEnterAttribute(___uri, ___local,
356: ___qname);
357: return;
358: case 6:
359: state = 9;
360: continue outer;
361: }
362: super .enterAttribute(___uri, ___local, ___qname);
363: break;
364: }
365: }
366:
367: public void leaveAttribute(java.lang.String ___uri,
368: java.lang.String ___local, java.lang.String ___qname)
369: throws org.xml.sax.SAXException {
370: int attIdx;
371: outer: while (true) {
372: switch (state) {
373: case 0:
374: attIdx = context.getAttribute("", "id");
375: if (attIdx >= 0) {
376: final java.lang.String v = context
377: .eatAttribute(attIdx);
378: eatText1(v);
379: state = 3;
380: continue outer;
381: }
382: state = 3;
383: continue outer;
384: case 9:
385: revertToParentFromLeaveAttribute(___uri, ___local,
386: ___qname);
387: return;
388: case 2:
389: if (("id" == ___local) && ("" == ___uri)) {
390: state = 3;
391: return;
392: }
393: break;
394: case 6:
395: state = 9;
396: continue outer;
397: }
398: super .leaveAttribute(___uri, ___local, ___qname);
399: break;
400: }
401: }
402:
403: public void handleText(final java.lang.String value)
404: throws org.xml.sax.SAXException {
405: int attIdx;
406: outer: while (true) {
407: try {
408: switch (state) {
409: case 0:
410: attIdx = context.getAttribute("", "id");
411: if (attIdx >= 0) {
412: final java.lang.String v = context
413: .eatAttribute(attIdx);
414: eatText1(v);
415: state = 3;
416: continue outer;
417: }
418: state = 3;
419: continue outer;
420: case 4:
421: _MimeType = ((com.nabhinc.portal.config.impl.MimeTypeTypeImpl) spawnChildFromText(
422: (com.nabhinc.portal.config.impl.MimeTypeTypeImpl.class),
423: 5, value));
424: return;
425: case 7:
426: _getPortletMode()
427: .add(
428: ((com.nabhinc.portal.config.impl.PortletModeTypeImpl) spawnChildFromText(
429: (com.nabhinc.portal.config.impl.PortletModeTypeImpl.class),
430: 8, value)));
431: return;
432: case 1:
433: eatText1(value);
434: state = 2;
435: return;
436: case 9:
437: revertToParentFromText(value);
438: return;
439: case 6:
440: state = 9;
441: continue outer;
442: }
443: } catch (java.lang.RuntimeException e) {
444: handleUnexpectedTextException(value, e);
445: }
446: break;
447: }
448: }
449:
450: }
451:
452: }
|