0001: /*
0002: * This class was automatically generated with
0003: * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
0004: * Schema.
0005: * $Id: Binding.java 6908 2007-03-29 08:22:29Z wguttmn $
0006: */
0007:
0008: package org.exolab.castor.builder.binding.xml;
0009:
0010: //---------------------------------/
0011: //- Imported classes and packages -/
0012: //---------------------------------/
0013:
0014: import org.exolab.castor.xml.Marshaller;
0015: import org.exolab.castor.xml.Unmarshaller;
0016:
0017: /**
0018: * The root element that contains the different binding elements.
0019: * The binding file is written from a schema point of view and
0020: * follows the
0021: * structure of an XML Schema.
0022: * The root element can also be used to configure the default
0023: * binding type.
0024: *
0025: *
0026: * @version $Revision: 6908 $ $Date$
0027: */
0028: public class Binding implements java.io.Serializable {
0029:
0030: //--------------------------/
0031: //- Class/Member Variables -/
0032: //--------------------------/
0033:
0034: /**
0035: * Field _defaultBindingType.
0036: */
0037: private org.exolab.castor.builder.binding.xml.types.BindingType _defaultBindingType = org.exolab.castor.builder.binding.xml.types.BindingType
0038: .valueOf("element");
0039:
0040: /**
0041: * Field _includeList.
0042: */
0043: private java.util.List _includeList;
0044:
0045: /**
0046: * Field _packageList.
0047: */
0048: private java.util.List _packageList;
0049:
0050: /**
0051: * Field _namingXML.
0052: */
0053: private org.exolab.castor.builder.binding.xml.NamingXMLType _namingXML;
0054:
0055: /**
0056: * Field _automaticNaming.
0057: */
0058: private org.exolab.castor.builder.binding.xml.AutomaticNamingType _automaticNaming;
0059:
0060: /**
0061: * Field _componentBindingList.
0062: */
0063: private java.util.List _componentBindingList;
0064:
0065: /**
0066: * Field _elementBindingList.
0067: */
0068: private java.util.List _elementBindingList;
0069:
0070: /**
0071: * Field _attributeBindingList.
0072: */
0073: private java.util.List _attributeBindingList;
0074:
0075: /**
0076: * Field _complexTypeBindingList.
0077: */
0078: private java.util.List _complexTypeBindingList;
0079:
0080: /**
0081: * Field _groupBindingList.
0082: */
0083: private java.util.List _groupBindingList;
0084:
0085: /**
0086: * Field _enumBindingList.
0087: */
0088: private java.util.List _enumBindingList;
0089:
0090: /**
0091: * Field _simpleTypeBindingList.
0092: */
0093: private java.util.List _simpleTypeBindingList;
0094:
0095: //----------------/
0096: //- Constructors -/
0097: //----------------/
0098:
0099: public Binding() {
0100: super ();
0101: setDefaultBindingType(org.exolab.castor.builder.binding.xml.types.BindingType
0102: .valueOf("element"));
0103: this ._includeList = new java.util.ArrayList();
0104: this ._packageList = new java.util.ArrayList();
0105: this ._componentBindingList = new java.util.ArrayList();
0106: this ._elementBindingList = new java.util.ArrayList();
0107: this ._attributeBindingList = new java.util.ArrayList();
0108: this ._complexTypeBindingList = new java.util.ArrayList();
0109: this ._groupBindingList = new java.util.ArrayList();
0110: this ._enumBindingList = new java.util.ArrayList();
0111: this ._simpleTypeBindingList = new java.util.ArrayList();
0112: }
0113:
0114: //-----------/
0115: //- Methods -/
0116: //-----------/
0117:
0118: /**
0119: *
0120: *
0121: * @param vAttributeBinding
0122: * @throws java.lang.IndexOutOfBoundsException if the index
0123: * given is outside the bounds of the collection
0124: */
0125: public void addAttributeBinding(
0126: final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding)
0127: throws java.lang.IndexOutOfBoundsException {
0128: this ._attributeBindingList.add(vAttributeBinding);
0129: }
0130:
0131: /**
0132: *
0133: *
0134: * @param index
0135: * @param vAttributeBinding
0136: * @throws java.lang.IndexOutOfBoundsException if the index
0137: * given is outside the bounds of the collection
0138: */
0139: public void addAttributeBinding(
0140: final int index,
0141: final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding)
0142: throws java.lang.IndexOutOfBoundsException {
0143: this ._attributeBindingList.add(index, vAttributeBinding);
0144: }
0145:
0146: /**
0147: *
0148: *
0149: * @param vComplexTypeBinding
0150: * @throws java.lang.IndexOutOfBoundsException if the index
0151: * given is outside the bounds of the collection
0152: */
0153: public void addComplexTypeBinding(
0154: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding)
0155: throws java.lang.IndexOutOfBoundsException {
0156: this ._complexTypeBindingList.add(vComplexTypeBinding);
0157: }
0158:
0159: /**
0160: *
0161: *
0162: * @param index
0163: * @param vComplexTypeBinding
0164: * @throws java.lang.IndexOutOfBoundsException if the index
0165: * given is outside the bounds of the collection
0166: */
0167: public void addComplexTypeBinding(
0168: final int index,
0169: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding)
0170: throws java.lang.IndexOutOfBoundsException {
0171: this ._complexTypeBindingList.add(index, vComplexTypeBinding);
0172: }
0173:
0174: /**
0175: *
0176: *
0177: * @param vComponentBinding
0178: * @throws java.lang.IndexOutOfBoundsException if the index
0179: * given is outside the bounds of the collection
0180: */
0181: public void addComponentBinding(
0182: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding)
0183: throws java.lang.IndexOutOfBoundsException {
0184: this ._componentBindingList.add(vComponentBinding);
0185: }
0186:
0187: /**
0188: *
0189: *
0190: * @param index
0191: * @param vComponentBinding
0192: * @throws java.lang.IndexOutOfBoundsException if the index
0193: * given is outside the bounds of the collection
0194: */
0195: public void addComponentBinding(
0196: final int index,
0197: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding)
0198: throws java.lang.IndexOutOfBoundsException {
0199: this ._componentBindingList.add(index, vComponentBinding);
0200: }
0201:
0202: /**
0203: *
0204: *
0205: * @param vElementBinding
0206: * @throws java.lang.IndexOutOfBoundsException if the index
0207: * given is outside the bounds of the collection
0208: */
0209: public void addElementBinding(
0210: final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding)
0211: throws java.lang.IndexOutOfBoundsException {
0212: this ._elementBindingList.add(vElementBinding);
0213: }
0214:
0215: /**
0216: *
0217: *
0218: * @param index
0219: * @param vElementBinding
0220: * @throws java.lang.IndexOutOfBoundsException if the index
0221: * given is outside the bounds of the collection
0222: */
0223: public void addElementBinding(
0224: final int index,
0225: final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding)
0226: throws java.lang.IndexOutOfBoundsException {
0227: this ._elementBindingList.add(index, vElementBinding);
0228: }
0229:
0230: /**
0231: *
0232: *
0233: * @param vEnumBinding
0234: * @throws java.lang.IndexOutOfBoundsException if the index
0235: * given is outside the bounds of the collection
0236: */
0237: public void addEnumBinding(
0238: final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding)
0239: throws java.lang.IndexOutOfBoundsException {
0240: this ._enumBindingList.add(vEnumBinding);
0241: }
0242:
0243: /**
0244: *
0245: *
0246: * @param index
0247: * @param vEnumBinding
0248: * @throws java.lang.IndexOutOfBoundsException if the index
0249: * given is outside the bounds of the collection
0250: */
0251: public void addEnumBinding(
0252: final int index,
0253: final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding)
0254: throws java.lang.IndexOutOfBoundsException {
0255: this ._enumBindingList.add(index, vEnumBinding);
0256: }
0257:
0258: /**
0259: *
0260: *
0261: * @param vGroupBinding
0262: * @throws java.lang.IndexOutOfBoundsException if the index
0263: * given is outside the bounds of the collection
0264: */
0265: public void addGroupBinding(
0266: final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding)
0267: throws java.lang.IndexOutOfBoundsException {
0268: this ._groupBindingList.add(vGroupBinding);
0269: }
0270:
0271: /**
0272: *
0273: *
0274: * @param index
0275: * @param vGroupBinding
0276: * @throws java.lang.IndexOutOfBoundsException if the index
0277: * given is outside the bounds of the collection
0278: */
0279: public void addGroupBinding(
0280: final int index,
0281: final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding)
0282: throws java.lang.IndexOutOfBoundsException {
0283: this ._groupBindingList.add(index, vGroupBinding);
0284: }
0285:
0286: /**
0287: *
0288: *
0289: * @param vInclude
0290: * @throws java.lang.IndexOutOfBoundsException if the index
0291: * given is outside the bounds of the collection
0292: */
0293: public void addInclude(
0294: final org.exolab.castor.builder.binding.xml.IncludeType vInclude)
0295: throws java.lang.IndexOutOfBoundsException {
0296: this ._includeList.add(vInclude);
0297: }
0298:
0299: /**
0300: *
0301: *
0302: * @param index
0303: * @param vInclude
0304: * @throws java.lang.IndexOutOfBoundsException if the index
0305: * given is outside the bounds of the collection
0306: */
0307: public void addInclude(
0308: final int index,
0309: final org.exolab.castor.builder.binding.xml.IncludeType vInclude)
0310: throws java.lang.IndexOutOfBoundsException {
0311: this ._includeList.add(index, vInclude);
0312: }
0313:
0314: /**
0315: *
0316: *
0317: * @param vPackage
0318: * @throws java.lang.IndexOutOfBoundsException if the index
0319: * given is outside the bounds of the collection
0320: */
0321: public void addPackage(
0322: final org.exolab.castor.builder.binding.xml.PackageType vPackage)
0323: throws java.lang.IndexOutOfBoundsException {
0324: this ._packageList.add(vPackage);
0325: }
0326:
0327: /**
0328: *
0329: *
0330: * @param index
0331: * @param vPackage
0332: * @throws java.lang.IndexOutOfBoundsException if the index
0333: * given is outside the bounds of the collection
0334: */
0335: public void addPackage(
0336: final int index,
0337: final org.exolab.castor.builder.binding.xml.PackageType vPackage)
0338: throws java.lang.IndexOutOfBoundsException {
0339: this ._packageList.add(index, vPackage);
0340: }
0341:
0342: /**
0343: *
0344: *
0345: * @param vSimpleTypeBinding
0346: * @throws java.lang.IndexOutOfBoundsException if the index
0347: * given is outside the bounds of the collection
0348: */
0349: public void addSimpleTypeBinding(
0350: final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding)
0351: throws java.lang.IndexOutOfBoundsException {
0352: this ._simpleTypeBindingList.add(vSimpleTypeBinding);
0353: }
0354:
0355: /**
0356: *
0357: *
0358: * @param index
0359: * @param vSimpleTypeBinding
0360: * @throws java.lang.IndexOutOfBoundsException if the index
0361: * given is outside the bounds of the collection
0362: */
0363: public void addSimpleTypeBinding(
0364: final int index,
0365: final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding)
0366: throws java.lang.IndexOutOfBoundsException {
0367: this ._simpleTypeBindingList.add(index, vSimpleTypeBinding);
0368: }
0369:
0370: /**
0371: * Method enumerateAttributeBinding.
0372: *
0373: * @return an Enumeration over all possible elements of this
0374: * collection
0375: */
0376: public java.util.Enumeration enumerateAttributeBinding() {
0377: return java.util.Collections
0378: .enumeration(this ._attributeBindingList);
0379: }
0380:
0381: /**
0382: * Method enumerateComplexTypeBinding.
0383: *
0384: * @return an Enumeration over all possible elements of this
0385: * collection
0386: */
0387: public java.util.Enumeration enumerateComplexTypeBinding() {
0388: return java.util.Collections
0389: .enumeration(this ._complexTypeBindingList);
0390: }
0391:
0392: /**
0393: * Method enumerateComponentBinding.
0394: *
0395: * @return an Enumeration over all possible elements of this
0396: * collection
0397: */
0398: public java.util.Enumeration enumerateComponentBinding() {
0399: return java.util.Collections
0400: .enumeration(this ._componentBindingList);
0401: }
0402:
0403: /**
0404: * Method enumerateElementBinding.
0405: *
0406: * @return an Enumeration over all possible elements of this
0407: * collection
0408: */
0409: public java.util.Enumeration enumerateElementBinding() {
0410: return java.util.Collections
0411: .enumeration(this ._elementBindingList);
0412: }
0413:
0414: /**
0415: * Method enumerateEnumBinding.
0416: *
0417: * @return an Enumeration over all possible elements of this
0418: * collection
0419: */
0420: public java.util.Enumeration enumerateEnumBinding() {
0421: return java.util.Collections.enumeration(this ._enumBindingList);
0422: }
0423:
0424: /**
0425: * Method enumerateGroupBinding.
0426: *
0427: * @return an Enumeration over all possible elements of this
0428: * collection
0429: */
0430: public java.util.Enumeration enumerateGroupBinding() {
0431: return java.util.Collections
0432: .enumeration(this ._groupBindingList);
0433: }
0434:
0435: /**
0436: * Method enumerateInclude.
0437: *
0438: * @return an Enumeration over all possible elements of this
0439: * collection
0440: */
0441: public java.util.Enumeration enumerateInclude() {
0442: return java.util.Collections.enumeration(this ._includeList);
0443: }
0444:
0445: /**
0446: * Method enumeratePackage.
0447: *
0448: * @return an Enumeration over all possible elements of this
0449: * collection
0450: */
0451: public java.util.Enumeration enumeratePackage() {
0452: return java.util.Collections.enumeration(this ._packageList);
0453: }
0454:
0455: /**
0456: * Method enumerateSimpleTypeBinding.
0457: *
0458: * @return an Enumeration over all possible elements of this
0459: * collection
0460: */
0461: public java.util.Enumeration enumerateSimpleTypeBinding() {
0462: return java.util.Collections
0463: .enumeration(this ._simpleTypeBindingList);
0464: }
0465:
0466: /**
0467: * Method getAttributeBinding.
0468: *
0469: * @param index
0470: * @throws java.lang.IndexOutOfBoundsException if the index
0471: * given is outside the bounds of the collection
0472: * @return the value of the
0473: * org.exolab.castor.builder.binding.xml.ComponentBindingType
0474: * at the given index
0475: */
0476: public org.exolab.castor.builder.binding.xml.ComponentBindingType getAttributeBinding(
0477: final int index) throws java.lang.IndexOutOfBoundsException {
0478: // check bounds for index
0479: if (index < 0 || index >= this ._attributeBindingList.size()) {
0480: throw new IndexOutOfBoundsException(
0481: "getAttributeBinding: Index value '" + index
0482: + "' not in range [0.."
0483: + (this ._attributeBindingList.size() - 1)
0484: + "]");
0485: }
0486:
0487: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _attributeBindingList
0488: .get(index);
0489: }
0490:
0491: /**
0492: * Method getAttributeBinding.Returns the contents of the
0493: * collection in an Array. <p>Note: Just in case the
0494: * collection contents are changing in another thread, we pass
0495: * a 0-length Array of the correct type into the API call.
0496: * This way we <i>know</i> that the Array returned is of
0497: * exactly the correct length.
0498: *
0499: * @return this collection as an Array
0500: */
0501: public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getAttributeBinding() {
0502: org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0];
0503: return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this ._attributeBindingList
0504: .toArray(array);
0505: }
0506:
0507: /**
0508: * Method getAttributeBindingCount.
0509: *
0510: * @return the size of this collection
0511: */
0512: public int getAttributeBindingCount() {
0513: return this ._attributeBindingList.size();
0514: }
0515:
0516: /**
0517: * Returns the value of field 'automaticNaming'.
0518: *
0519: * @return the value of field 'AutomaticNaming'.
0520: */
0521: public org.exolab.castor.builder.binding.xml.AutomaticNamingType getAutomaticNaming() {
0522: return this ._automaticNaming;
0523: }
0524:
0525: /**
0526: * Method getComplexTypeBinding.
0527: *
0528: * @param index
0529: * @throws java.lang.IndexOutOfBoundsException if the index
0530: * given is outside the bounds of the collection
0531: * @return the value of the
0532: * org.exolab.castor.builder.binding.xml.ComponentBindingType
0533: * at the given index
0534: */
0535: public org.exolab.castor.builder.binding.xml.ComponentBindingType getComplexTypeBinding(
0536: final int index) throws java.lang.IndexOutOfBoundsException {
0537: // check bounds for index
0538: if (index < 0 || index >= this ._complexTypeBindingList.size()) {
0539: throw new IndexOutOfBoundsException(
0540: "getComplexTypeBinding: Index value '" + index
0541: + "' not in range [0.."
0542: + (this ._complexTypeBindingList.size() - 1)
0543: + "]");
0544: }
0545:
0546: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _complexTypeBindingList
0547: .get(index);
0548: }
0549:
0550: /**
0551: * Method getComplexTypeBinding.Returns the contents of the
0552: * collection in an Array. <p>Note: Just in case the
0553: * collection contents are changing in another thread, we pass
0554: * a 0-length Array of the correct type into the API call.
0555: * This way we <i>know</i> that the Array returned is of
0556: * exactly the correct length.
0557: *
0558: * @return this collection as an Array
0559: */
0560: public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getComplexTypeBinding() {
0561: org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0];
0562: return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this ._complexTypeBindingList
0563: .toArray(array);
0564: }
0565:
0566: /**
0567: * Method getComplexTypeBindingCount.
0568: *
0569: * @return the size of this collection
0570: */
0571: public int getComplexTypeBindingCount() {
0572: return this ._complexTypeBindingList.size();
0573: }
0574:
0575: /**
0576: * Method getComponentBinding.
0577: *
0578: * @param index
0579: * @throws java.lang.IndexOutOfBoundsException if the index
0580: * given is outside the bounds of the collection
0581: * @return the value of the
0582: * org.exolab.castor.builder.binding.xml.ComponentBindingType
0583: * at the given index
0584: */
0585: public org.exolab.castor.builder.binding.xml.ComponentBindingType getComponentBinding(
0586: final int index) throws java.lang.IndexOutOfBoundsException {
0587: // check bounds for index
0588: if (index < 0 || index >= this ._componentBindingList.size()) {
0589: throw new IndexOutOfBoundsException(
0590: "getComponentBinding: Index value '" + index
0591: + "' not in range [0.."
0592: + (this ._componentBindingList.size() - 1)
0593: + "]");
0594: }
0595:
0596: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _componentBindingList
0597: .get(index);
0598: }
0599:
0600: /**
0601: * Method getComponentBinding.Returns the contents of the
0602: * collection in an Array. <p>Note: Just in case the
0603: * collection contents are changing in another thread, we pass
0604: * a 0-length Array of the correct type into the API call.
0605: * This way we <i>know</i> that the Array returned is of
0606: * exactly the correct length.
0607: *
0608: * @return this collection as an Array
0609: */
0610: public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getComponentBinding() {
0611: org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0];
0612: return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this ._componentBindingList
0613: .toArray(array);
0614: }
0615:
0616: /**
0617: * Method getComponentBindingCount.
0618: *
0619: * @return the size of this collection
0620: */
0621: public int getComponentBindingCount() {
0622: return this ._componentBindingList.size();
0623: }
0624:
0625: /**
0626: * Returns the value of field 'defaultBindingType'.
0627: *
0628: * @return the value of field 'DefaultBindingType'.
0629: */
0630: public org.exolab.castor.builder.binding.xml.types.BindingType getDefaultBindingType() {
0631: return this ._defaultBindingType;
0632: }
0633:
0634: /**
0635: * Method getElementBinding.
0636: *
0637: * @param index
0638: * @throws java.lang.IndexOutOfBoundsException if the index
0639: * given is outside the bounds of the collection
0640: * @return the value of the
0641: * org.exolab.castor.builder.binding.xml.ComponentBindingType
0642: * at the given index
0643: */
0644: public org.exolab.castor.builder.binding.xml.ComponentBindingType getElementBinding(
0645: final int index) throws java.lang.IndexOutOfBoundsException {
0646: // check bounds for index
0647: if (index < 0 || index >= this ._elementBindingList.size()) {
0648: throw new IndexOutOfBoundsException(
0649: "getElementBinding: Index value '" + index
0650: + "' not in range [0.."
0651: + (this ._elementBindingList.size() - 1)
0652: + "]");
0653: }
0654:
0655: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _elementBindingList
0656: .get(index);
0657: }
0658:
0659: /**
0660: * Method getElementBinding.Returns the contents of the
0661: * collection in an Array. <p>Note: Just in case the
0662: * collection contents are changing in another thread, we pass
0663: * a 0-length Array of the correct type into the API call.
0664: * This way we <i>know</i> that the Array returned is of
0665: * exactly the correct length.
0666: *
0667: * @return this collection as an Array
0668: */
0669: public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getElementBinding() {
0670: org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0];
0671: return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this ._elementBindingList
0672: .toArray(array);
0673: }
0674:
0675: /**
0676: * Method getElementBindingCount.
0677: *
0678: * @return the size of this collection
0679: */
0680: public int getElementBindingCount() {
0681: return this ._elementBindingList.size();
0682: }
0683:
0684: /**
0685: * Method getEnumBinding.
0686: *
0687: * @param index
0688: * @throws java.lang.IndexOutOfBoundsException if the index
0689: * given is outside the bounds of the collection
0690: * @return the value of the
0691: * org.exolab.castor.builder.binding.xml.ComponentBindingType
0692: * at the given index
0693: */
0694: public org.exolab.castor.builder.binding.xml.ComponentBindingType getEnumBinding(
0695: final int index) throws java.lang.IndexOutOfBoundsException {
0696: // check bounds for index
0697: if (index < 0 || index >= this ._enumBindingList.size()) {
0698: throw new IndexOutOfBoundsException(
0699: "getEnumBinding: Index value '" + index
0700: + "' not in range [0.."
0701: + (this ._enumBindingList.size() - 1) + "]");
0702: }
0703:
0704: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _enumBindingList
0705: .get(index);
0706: }
0707:
0708: /**
0709: * Method getEnumBinding.Returns the contents of the collection
0710: * in an Array. <p>Note: Just in case the collection contents
0711: * are changing in another thread, we pass a 0-length Array of
0712: * the correct type into the API call. This way we <i>know</i>
0713: * that the Array returned is of exactly the correct length.
0714: *
0715: * @return this collection as an Array
0716: */
0717: public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getEnumBinding() {
0718: org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0];
0719: return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this ._enumBindingList
0720: .toArray(array);
0721: }
0722:
0723: /**
0724: * Method getEnumBindingCount.
0725: *
0726: * @return the size of this collection
0727: */
0728: public int getEnumBindingCount() {
0729: return this ._enumBindingList.size();
0730: }
0731:
0732: /**
0733: * Method getGroupBinding.
0734: *
0735: * @param index
0736: * @throws java.lang.IndexOutOfBoundsException if the index
0737: * given is outside the bounds of the collection
0738: * @return the value of the
0739: * org.exolab.castor.builder.binding.xml.ComponentBindingType
0740: * at the given index
0741: */
0742: public org.exolab.castor.builder.binding.xml.ComponentBindingType getGroupBinding(
0743: final int index) throws java.lang.IndexOutOfBoundsException {
0744: // check bounds for index
0745: if (index < 0 || index >= this ._groupBindingList.size()) {
0746: throw new IndexOutOfBoundsException(
0747: "getGroupBinding: Index value '" + index
0748: + "' not in range [0.."
0749: + (this ._groupBindingList.size() - 1) + "]");
0750: }
0751:
0752: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _groupBindingList
0753: .get(index);
0754: }
0755:
0756: /**
0757: * Method getGroupBinding.Returns the contents of the
0758: * collection in an Array. <p>Note: Just in case the
0759: * collection contents are changing in another thread, we pass
0760: * a 0-length Array of the correct type into the API call.
0761: * This way we <i>know</i> that the Array returned is of
0762: * exactly the correct length.
0763: *
0764: * @return this collection as an Array
0765: */
0766: public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getGroupBinding() {
0767: org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0];
0768: return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this ._groupBindingList
0769: .toArray(array);
0770: }
0771:
0772: /**
0773: * Method getGroupBindingCount.
0774: *
0775: * @return the size of this collection
0776: */
0777: public int getGroupBindingCount() {
0778: return this ._groupBindingList.size();
0779: }
0780:
0781: /**
0782: * Method getInclude.
0783: *
0784: * @param index
0785: * @throws java.lang.IndexOutOfBoundsException if the index
0786: * given is outside the bounds of the collection
0787: * @return the value of the
0788: * org.exolab.castor.builder.binding.xml.IncludeType at the
0789: * given index
0790: */
0791: public org.exolab.castor.builder.binding.xml.IncludeType getInclude(
0792: final int index) throws java.lang.IndexOutOfBoundsException {
0793: // check bounds for index
0794: if (index < 0 || index >= this ._includeList.size()) {
0795: throw new IndexOutOfBoundsException(
0796: "getInclude: Index value '" + index
0797: + "' not in range [0.."
0798: + (this ._includeList.size() - 1) + "]");
0799: }
0800:
0801: return (org.exolab.castor.builder.binding.xml.IncludeType) _includeList
0802: .get(index);
0803: }
0804:
0805: /**
0806: * Method getInclude.Returns the contents of the collection in
0807: * an Array. <p>Note: Just in case the collection contents
0808: * are changing in another thread, we pass a 0-length Array of
0809: * the correct type into the API call. This way we <i>know</i>
0810: * that the Array returned is of exactly the correct length.
0811: *
0812: * @return this collection as an Array
0813: */
0814: public org.exolab.castor.builder.binding.xml.IncludeType[] getInclude() {
0815: org.exolab.castor.builder.binding.xml.IncludeType[] array = new org.exolab.castor.builder.binding.xml.IncludeType[0];
0816: return (org.exolab.castor.builder.binding.xml.IncludeType[]) this ._includeList
0817: .toArray(array);
0818: }
0819:
0820: /**
0821: * Method getIncludeCount.
0822: *
0823: * @return the size of this collection
0824: */
0825: public int getIncludeCount() {
0826: return this ._includeList.size();
0827: }
0828:
0829: /**
0830: * Returns the value of field 'namingXML'.
0831: *
0832: * @return the value of field 'NamingXML'.
0833: */
0834: public org.exolab.castor.builder.binding.xml.NamingXMLType getNamingXML() {
0835: return this ._namingXML;
0836: }
0837:
0838: /**
0839: * Method getPackage.
0840: *
0841: * @param index
0842: * @throws java.lang.IndexOutOfBoundsException if the index
0843: * given is outside the bounds of the collection
0844: * @return the value of the
0845: * org.exolab.castor.builder.binding.xml.PackageType at the
0846: * given index
0847: */
0848: public org.exolab.castor.builder.binding.xml.PackageType getPackage(
0849: final int index) throws java.lang.IndexOutOfBoundsException {
0850: // check bounds for index
0851: if (index < 0 || index >= this ._packageList.size()) {
0852: throw new IndexOutOfBoundsException(
0853: "getPackage: Index value '" + index
0854: + "' not in range [0.."
0855: + (this ._packageList.size() - 1) + "]");
0856: }
0857:
0858: return (org.exolab.castor.builder.binding.xml.PackageType) _packageList
0859: .get(index);
0860: }
0861:
0862: /**
0863: * Method getPackage.Returns the contents of the collection in
0864: * an Array. <p>Note: Just in case the collection contents
0865: * are changing in another thread, we pass a 0-length Array of
0866: * the correct type into the API call. This way we <i>know</i>
0867: * that the Array returned is of exactly the correct length.
0868: *
0869: * @return this collection as an Array
0870: */
0871: public org.exolab.castor.builder.binding.xml.PackageType[] getPackage() {
0872: org.exolab.castor.builder.binding.xml.PackageType[] array = new org.exolab.castor.builder.binding.xml.PackageType[0];
0873: return (org.exolab.castor.builder.binding.xml.PackageType[]) this ._packageList
0874: .toArray(array);
0875: }
0876:
0877: /**
0878: * Method getPackageCount.
0879: *
0880: * @return the size of this collection
0881: */
0882: public int getPackageCount() {
0883: return this ._packageList.size();
0884: }
0885:
0886: /**
0887: * Method getSimpleTypeBinding.
0888: *
0889: * @param index
0890: * @throws java.lang.IndexOutOfBoundsException if the index
0891: * given is outside the bounds of the collection
0892: * @return the value of the
0893: * org.exolab.castor.builder.binding.xml.ComponentBindingType
0894: * at the given index
0895: */
0896: public org.exolab.castor.builder.binding.xml.ComponentBindingType getSimpleTypeBinding(
0897: final int index) throws java.lang.IndexOutOfBoundsException {
0898: // check bounds for index
0899: if (index < 0 || index >= this ._simpleTypeBindingList.size()) {
0900: throw new IndexOutOfBoundsException(
0901: "getSimpleTypeBinding: Index value '" + index
0902: + "' not in range [0.."
0903: + (this ._simpleTypeBindingList.size() - 1)
0904: + "]");
0905: }
0906:
0907: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _simpleTypeBindingList
0908: .get(index);
0909: }
0910:
0911: /**
0912: * Method getSimpleTypeBinding.Returns the contents of the
0913: * collection in an Array. <p>Note: Just in case the
0914: * collection contents are changing in another thread, we pass
0915: * a 0-length Array of the correct type into the API call.
0916: * This way we <i>know</i> that the Array returned is of
0917: * exactly the correct length.
0918: *
0919: * @return this collection as an Array
0920: */
0921: public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getSimpleTypeBinding() {
0922: org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0];
0923: return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this ._simpleTypeBindingList
0924: .toArray(array);
0925: }
0926:
0927: /**
0928: * Method getSimpleTypeBindingCount.
0929: *
0930: * @return the size of this collection
0931: */
0932: public int getSimpleTypeBindingCount() {
0933: return this ._simpleTypeBindingList.size();
0934: }
0935:
0936: /**
0937: * Method isValid.
0938: *
0939: * @return true if this object is valid according to the schema
0940: */
0941: public boolean isValid() {
0942: try {
0943: validate();
0944: } catch (org.exolab.castor.xml.ValidationException vex) {
0945: return false;
0946: }
0947: return true;
0948: }
0949:
0950: /**
0951: * Method iterateAttributeBinding.
0952: *
0953: * @return an Iterator over all possible elements in this
0954: * collection
0955: */
0956: public java.util.Iterator iterateAttributeBinding() {
0957: return this ._attributeBindingList.iterator();
0958: }
0959:
0960: /**
0961: * Method iterateComplexTypeBinding.
0962: *
0963: * @return an Iterator over all possible elements in this
0964: * collection
0965: */
0966: public java.util.Iterator iterateComplexTypeBinding() {
0967: return this ._complexTypeBindingList.iterator();
0968: }
0969:
0970: /**
0971: * Method iterateComponentBinding.
0972: *
0973: * @return an Iterator over all possible elements in this
0974: * collection
0975: */
0976: public java.util.Iterator iterateComponentBinding() {
0977: return this ._componentBindingList.iterator();
0978: }
0979:
0980: /**
0981: * Method iterateElementBinding.
0982: *
0983: * @return an Iterator over all possible elements in this
0984: * collection
0985: */
0986: public java.util.Iterator iterateElementBinding() {
0987: return this ._elementBindingList.iterator();
0988: }
0989:
0990: /**
0991: * Method iterateEnumBinding.
0992: *
0993: * @return an Iterator over all possible elements in this
0994: * collection
0995: */
0996: public java.util.Iterator iterateEnumBinding() {
0997: return this ._enumBindingList.iterator();
0998: }
0999:
1000: /**
1001: * Method iterateGroupBinding.
1002: *
1003: * @return an Iterator over all possible elements in this
1004: * collection
1005: */
1006: public java.util.Iterator iterateGroupBinding() {
1007: return this ._groupBindingList.iterator();
1008: }
1009:
1010: /**
1011: * Method iterateInclude.
1012: *
1013: * @return an Iterator over all possible elements in this
1014: * collection
1015: */
1016: public java.util.Iterator iterateInclude() {
1017: return this ._includeList.iterator();
1018: }
1019:
1020: /**
1021: * Method iteratePackage.
1022: *
1023: * @return an Iterator over all possible elements in this
1024: * collection
1025: */
1026: public java.util.Iterator iteratePackage() {
1027: return this ._packageList.iterator();
1028: }
1029:
1030: /**
1031: * Method iterateSimpleTypeBinding.
1032: *
1033: * @return an Iterator over all possible elements in this
1034: * collection
1035: */
1036: public java.util.Iterator iterateSimpleTypeBinding() {
1037: return this ._simpleTypeBindingList.iterator();
1038: }
1039:
1040: /**
1041: *
1042: *
1043: * @param out
1044: * @throws org.exolab.castor.xml.MarshalException if object is
1045: * null or if any SAXException is thrown during marshaling
1046: * @throws org.exolab.castor.xml.ValidationException if this
1047: * object is an invalid instance according to the schema
1048: */
1049: public void marshal(final java.io.Writer out)
1050: throws org.exolab.castor.xml.MarshalException,
1051: org.exolab.castor.xml.ValidationException {
1052: Marshaller.marshal(this , out);
1053: }
1054:
1055: /**
1056: *
1057: *
1058: * @param handler
1059: * @throws java.io.IOException if an IOException occurs during
1060: * marshaling
1061: * @throws org.exolab.castor.xml.ValidationException if this
1062: * object is an invalid instance according to the schema
1063: * @throws org.exolab.castor.xml.MarshalException if object is
1064: * null or if any SAXException is thrown during marshaling
1065: */
1066: public void marshal(final org.xml.sax.ContentHandler handler)
1067: throws java.io.IOException,
1068: org.exolab.castor.xml.MarshalException,
1069: org.exolab.castor.xml.ValidationException {
1070: Marshaller.marshal(this , handler);
1071: }
1072:
1073: /**
1074: */
1075: public void removeAllAttributeBinding() {
1076: this ._attributeBindingList.clear();
1077: }
1078:
1079: /**
1080: */
1081: public void removeAllComplexTypeBinding() {
1082: this ._complexTypeBindingList.clear();
1083: }
1084:
1085: /**
1086: */
1087: public void removeAllComponentBinding() {
1088: this ._componentBindingList.clear();
1089: }
1090:
1091: /**
1092: */
1093: public void removeAllElementBinding() {
1094: this ._elementBindingList.clear();
1095: }
1096:
1097: /**
1098: */
1099: public void removeAllEnumBinding() {
1100: this ._enumBindingList.clear();
1101: }
1102:
1103: /**
1104: */
1105: public void removeAllGroupBinding() {
1106: this ._groupBindingList.clear();
1107: }
1108:
1109: /**
1110: */
1111: public void removeAllInclude() {
1112: this ._includeList.clear();
1113: }
1114:
1115: /**
1116: */
1117: public void removeAllPackage() {
1118: this ._packageList.clear();
1119: }
1120:
1121: /**
1122: */
1123: public void removeAllSimpleTypeBinding() {
1124: this ._simpleTypeBindingList.clear();
1125: }
1126:
1127: /**
1128: * Method removeAttributeBinding.
1129: *
1130: * @param vAttributeBinding
1131: * @return true if the object was removed from the collection.
1132: */
1133: public boolean removeAttributeBinding(
1134: final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) {
1135: boolean removed = _attributeBindingList
1136: .remove(vAttributeBinding);
1137: return removed;
1138: }
1139:
1140: /**
1141: * Method removeAttributeBindingAt.
1142: *
1143: * @param index
1144: * @return the element removed from the collection
1145: */
1146: public org.exolab.castor.builder.binding.xml.ComponentBindingType removeAttributeBindingAt(
1147: final int index) {
1148: java.lang.Object obj = this ._attributeBindingList.remove(index);
1149: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj;
1150: }
1151:
1152: /**
1153: * Method removeComplexTypeBinding.
1154: *
1155: * @param vComplexTypeBinding
1156: * @return true if the object was removed from the collection.
1157: */
1158: public boolean removeComplexTypeBinding(
1159: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) {
1160: boolean removed = _complexTypeBindingList
1161: .remove(vComplexTypeBinding);
1162: return removed;
1163: }
1164:
1165: /**
1166: * Method removeComplexTypeBindingAt.
1167: *
1168: * @param index
1169: * @return the element removed from the collection
1170: */
1171: public org.exolab.castor.builder.binding.xml.ComponentBindingType removeComplexTypeBindingAt(
1172: final int index) {
1173: java.lang.Object obj = this ._complexTypeBindingList
1174: .remove(index);
1175: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj;
1176: }
1177:
1178: /**
1179: * Method removeComponentBinding.
1180: *
1181: * @param vComponentBinding
1182: * @return true if the object was removed from the collection.
1183: */
1184: public boolean removeComponentBinding(
1185: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) {
1186: boolean removed = _componentBindingList
1187: .remove(vComponentBinding);
1188: return removed;
1189: }
1190:
1191: /**
1192: * Method removeComponentBindingAt.
1193: *
1194: * @param index
1195: * @return the element removed from the collection
1196: */
1197: public org.exolab.castor.builder.binding.xml.ComponentBindingType removeComponentBindingAt(
1198: final int index) {
1199: java.lang.Object obj = this ._componentBindingList.remove(index);
1200: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj;
1201: }
1202:
1203: /**
1204: * Method removeElementBinding.
1205: *
1206: * @param vElementBinding
1207: * @return true if the object was removed from the collection.
1208: */
1209: public boolean removeElementBinding(
1210: final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) {
1211: boolean removed = _elementBindingList.remove(vElementBinding);
1212: return removed;
1213: }
1214:
1215: /**
1216: * Method removeElementBindingAt.
1217: *
1218: * @param index
1219: * @return the element removed from the collection
1220: */
1221: public org.exolab.castor.builder.binding.xml.ComponentBindingType removeElementBindingAt(
1222: final int index) {
1223: java.lang.Object obj = this ._elementBindingList.remove(index);
1224: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj;
1225: }
1226:
1227: /**
1228: * Method removeEnumBinding.
1229: *
1230: * @param vEnumBinding
1231: * @return true if the object was removed from the collection.
1232: */
1233: public boolean removeEnumBinding(
1234: final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) {
1235: boolean removed = _enumBindingList.remove(vEnumBinding);
1236: return removed;
1237: }
1238:
1239: /**
1240: * Method removeEnumBindingAt.
1241: *
1242: * @param index
1243: * @return the element removed from the collection
1244: */
1245: public org.exolab.castor.builder.binding.xml.ComponentBindingType removeEnumBindingAt(
1246: final int index) {
1247: java.lang.Object obj = this ._enumBindingList.remove(index);
1248: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj;
1249: }
1250:
1251: /**
1252: * Method removeGroupBinding.
1253: *
1254: * @param vGroupBinding
1255: * @return true if the object was removed from the collection.
1256: */
1257: public boolean removeGroupBinding(
1258: final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) {
1259: boolean removed = _groupBindingList.remove(vGroupBinding);
1260: return removed;
1261: }
1262:
1263: /**
1264: * Method removeGroupBindingAt.
1265: *
1266: * @param index
1267: * @return the element removed from the collection
1268: */
1269: public org.exolab.castor.builder.binding.xml.ComponentBindingType removeGroupBindingAt(
1270: final int index) {
1271: java.lang.Object obj = this ._groupBindingList.remove(index);
1272: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj;
1273: }
1274:
1275: /**
1276: * Method removeInclude.
1277: *
1278: * @param vInclude
1279: * @return true if the object was removed from the collection.
1280: */
1281: public boolean removeInclude(
1282: final org.exolab.castor.builder.binding.xml.IncludeType vInclude) {
1283: boolean removed = _includeList.remove(vInclude);
1284: return removed;
1285: }
1286:
1287: /**
1288: * Method removeIncludeAt.
1289: *
1290: * @param index
1291: * @return the element removed from the collection
1292: */
1293: public org.exolab.castor.builder.binding.xml.IncludeType removeIncludeAt(
1294: final int index) {
1295: java.lang.Object obj = this ._includeList.remove(index);
1296: return (org.exolab.castor.builder.binding.xml.IncludeType) obj;
1297: }
1298:
1299: /**
1300: * Method removePackage.
1301: *
1302: * @param vPackage
1303: * @return true if the object was removed from the collection.
1304: */
1305: public boolean removePackage(
1306: final org.exolab.castor.builder.binding.xml.PackageType vPackage) {
1307: boolean removed = _packageList.remove(vPackage);
1308: return removed;
1309: }
1310:
1311: /**
1312: * Method removePackageAt.
1313: *
1314: * @param index
1315: * @return the element removed from the collection
1316: */
1317: public org.exolab.castor.builder.binding.xml.PackageType removePackageAt(
1318: final int index) {
1319: java.lang.Object obj = this ._packageList.remove(index);
1320: return (org.exolab.castor.builder.binding.xml.PackageType) obj;
1321: }
1322:
1323: /**
1324: * Method removeSimpleTypeBinding.
1325: *
1326: * @param vSimpleTypeBinding
1327: * @return true if the object was removed from the collection.
1328: */
1329: public boolean removeSimpleTypeBinding(
1330: final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) {
1331: boolean removed = _simpleTypeBindingList
1332: .remove(vSimpleTypeBinding);
1333: return removed;
1334: }
1335:
1336: /**
1337: * Method removeSimpleTypeBindingAt.
1338: *
1339: * @param index
1340: * @return the element removed from the collection
1341: */
1342: public org.exolab.castor.builder.binding.xml.ComponentBindingType removeSimpleTypeBindingAt(
1343: final int index) {
1344: java.lang.Object obj = this ._simpleTypeBindingList
1345: .remove(index);
1346: return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj;
1347: }
1348:
1349: /**
1350: *
1351: *
1352: * @param index
1353: * @param vAttributeBinding
1354: * @throws java.lang.IndexOutOfBoundsException if the index
1355: * given is outside the bounds of the collection
1356: */
1357: public void setAttributeBinding(
1358: final int index,
1359: final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding)
1360: throws java.lang.IndexOutOfBoundsException {
1361: // check bounds for index
1362: if (index < 0 || index >= this ._attributeBindingList.size()) {
1363: throw new IndexOutOfBoundsException(
1364: "setAttributeBinding: Index value '" + index
1365: + "' not in range [0.."
1366: + (this ._attributeBindingList.size() - 1)
1367: + "]");
1368: }
1369:
1370: this ._attributeBindingList.set(index, vAttributeBinding);
1371: }
1372:
1373: /**
1374: *
1375: *
1376: * @param vAttributeBindingArray
1377: */
1378: public void setAttributeBinding(
1379: final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vAttributeBindingArray) {
1380: //-- copy array
1381: _attributeBindingList.clear();
1382:
1383: for (int i = 0; i < vAttributeBindingArray.length; i++) {
1384: this ._attributeBindingList.add(vAttributeBindingArray[i]);
1385: }
1386: }
1387:
1388: /**
1389: * Sets the value of field 'automaticNaming'.
1390: *
1391: * @param automaticNaming the value of field 'automaticNaming'.
1392: */
1393: public void setAutomaticNaming(
1394: final org.exolab.castor.builder.binding.xml.AutomaticNamingType automaticNaming) {
1395: this ._automaticNaming = automaticNaming;
1396: }
1397:
1398: /**
1399: *
1400: *
1401: * @param index
1402: * @param vComplexTypeBinding
1403: * @throws java.lang.IndexOutOfBoundsException if the index
1404: * given is outside the bounds of the collection
1405: */
1406: public void setComplexTypeBinding(
1407: final int index,
1408: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding)
1409: throws java.lang.IndexOutOfBoundsException {
1410: // check bounds for index
1411: if (index < 0 || index >= this ._complexTypeBindingList.size()) {
1412: throw new IndexOutOfBoundsException(
1413: "setComplexTypeBinding: Index value '" + index
1414: + "' not in range [0.."
1415: + (this ._complexTypeBindingList.size() - 1)
1416: + "]");
1417: }
1418:
1419: this ._complexTypeBindingList.set(index, vComplexTypeBinding);
1420: }
1421:
1422: /**
1423: *
1424: *
1425: * @param vComplexTypeBindingArray
1426: */
1427: public void setComplexTypeBinding(
1428: final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vComplexTypeBindingArray) {
1429: //-- copy array
1430: _complexTypeBindingList.clear();
1431:
1432: for (int i = 0; i < vComplexTypeBindingArray.length; i++) {
1433: this ._complexTypeBindingList
1434: .add(vComplexTypeBindingArray[i]);
1435: }
1436: }
1437:
1438: /**
1439: *
1440: *
1441: * @param index
1442: * @param vComponentBinding
1443: * @throws java.lang.IndexOutOfBoundsException if the index
1444: * given is outside the bounds of the collection
1445: */
1446: public void setComponentBinding(
1447: final int index,
1448: final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding)
1449: throws java.lang.IndexOutOfBoundsException {
1450: // check bounds for index
1451: if (index < 0 || index >= this ._componentBindingList.size()) {
1452: throw new IndexOutOfBoundsException(
1453: "setComponentBinding: Index value '" + index
1454: + "' not in range [0.."
1455: + (this ._componentBindingList.size() - 1)
1456: + "]");
1457: }
1458:
1459: this ._componentBindingList.set(index, vComponentBinding);
1460: }
1461:
1462: /**
1463: *
1464: *
1465: * @param vComponentBindingArray
1466: */
1467: public void setComponentBinding(
1468: final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vComponentBindingArray) {
1469: //-- copy array
1470: _componentBindingList.clear();
1471:
1472: for (int i = 0; i < vComponentBindingArray.length; i++) {
1473: this ._componentBindingList.add(vComponentBindingArray[i]);
1474: }
1475: }
1476:
1477: /**
1478: * Sets the value of field 'defaultBindingType'.
1479: *
1480: * @param defaultBindingType the value of field
1481: * 'defaultBindingType'.
1482: */
1483: public void setDefaultBindingType(
1484: final org.exolab.castor.builder.binding.xml.types.BindingType defaultBindingType) {
1485: this ._defaultBindingType = defaultBindingType;
1486: }
1487:
1488: /**
1489: *
1490: *
1491: * @param index
1492: * @param vElementBinding
1493: * @throws java.lang.IndexOutOfBoundsException if the index
1494: * given is outside the bounds of the collection
1495: */
1496: public void setElementBinding(
1497: final int index,
1498: final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding)
1499: throws java.lang.IndexOutOfBoundsException {
1500: // check bounds for index
1501: if (index < 0 || index >= this ._elementBindingList.size()) {
1502: throw new IndexOutOfBoundsException(
1503: "setElementBinding: Index value '" + index
1504: + "' not in range [0.."
1505: + (this ._elementBindingList.size() - 1)
1506: + "]");
1507: }
1508:
1509: this ._elementBindingList.set(index, vElementBinding);
1510: }
1511:
1512: /**
1513: *
1514: *
1515: * @param vElementBindingArray
1516: */
1517: public void setElementBinding(
1518: final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vElementBindingArray) {
1519: //-- copy array
1520: _elementBindingList.clear();
1521:
1522: for (int i = 0; i < vElementBindingArray.length; i++) {
1523: this ._elementBindingList.add(vElementBindingArray[i]);
1524: }
1525: }
1526:
1527: /**
1528: *
1529: *
1530: * @param index
1531: * @param vEnumBinding
1532: * @throws java.lang.IndexOutOfBoundsException if the index
1533: * given is outside the bounds of the collection
1534: */
1535: public void setEnumBinding(
1536: final int index,
1537: final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding)
1538: throws java.lang.IndexOutOfBoundsException {
1539: // check bounds for index
1540: if (index < 0 || index >= this ._enumBindingList.size()) {
1541: throw new IndexOutOfBoundsException(
1542: "setEnumBinding: Index value '" + index
1543: + "' not in range [0.."
1544: + (this ._enumBindingList.size() - 1) + "]");
1545: }
1546:
1547: this ._enumBindingList.set(index, vEnumBinding);
1548: }
1549:
1550: /**
1551: *
1552: *
1553: * @param vEnumBindingArray
1554: */
1555: public void setEnumBinding(
1556: final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vEnumBindingArray) {
1557: //-- copy array
1558: _enumBindingList.clear();
1559:
1560: for (int i = 0; i < vEnumBindingArray.length; i++) {
1561: this ._enumBindingList.add(vEnumBindingArray[i]);
1562: }
1563: }
1564:
1565: /**
1566: *
1567: *
1568: * @param index
1569: * @param vGroupBinding
1570: * @throws java.lang.IndexOutOfBoundsException if the index
1571: * given is outside the bounds of the collection
1572: */
1573: public void setGroupBinding(
1574: final int index,
1575: final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding)
1576: throws java.lang.IndexOutOfBoundsException {
1577: // check bounds for index
1578: if (index < 0 || index >= this ._groupBindingList.size()) {
1579: throw new IndexOutOfBoundsException(
1580: "setGroupBinding: Index value '" + index
1581: + "' not in range [0.."
1582: + (this ._groupBindingList.size() - 1) + "]");
1583: }
1584:
1585: this ._groupBindingList.set(index, vGroupBinding);
1586: }
1587:
1588: /**
1589: *
1590: *
1591: * @param vGroupBindingArray
1592: */
1593: public void setGroupBinding(
1594: final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vGroupBindingArray) {
1595: //-- copy array
1596: _groupBindingList.clear();
1597:
1598: for (int i = 0; i < vGroupBindingArray.length; i++) {
1599: this ._groupBindingList.add(vGroupBindingArray[i]);
1600: }
1601: }
1602:
1603: /**
1604: *
1605: *
1606: * @param index
1607: * @param vInclude
1608: * @throws java.lang.IndexOutOfBoundsException if the index
1609: * given is outside the bounds of the collection
1610: */
1611: public void setInclude(
1612: final int index,
1613: final org.exolab.castor.builder.binding.xml.IncludeType vInclude)
1614: throws java.lang.IndexOutOfBoundsException {
1615: // check bounds for index
1616: if (index < 0 || index >= this ._includeList.size()) {
1617: throw new IndexOutOfBoundsException(
1618: "setInclude: Index value '" + index
1619: + "' not in range [0.."
1620: + (this ._includeList.size() - 1) + "]");
1621: }
1622:
1623: this ._includeList.set(index, vInclude);
1624: }
1625:
1626: /**
1627: *
1628: *
1629: * @param vIncludeArray
1630: */
1631: public void setInclude(
1632: final org.exolab.castor.builder.binding.xml.IncludeType[] vIncludeArray) {
1633: //-- copy array
1634: _includeList.clear();
1635:
1636: for (int i = 0; i < vIncludeArray.length; i++) {
1637: this ._includeList.add(vIncludeArray[i]);
1638: }
1639: }
1640:
1641: /**
1642: * Sets the value of field 'namingXML'.
1643: *
1644: * @param namingXML the value of field 'namingXML'.
1645: */
1646: public void setNamingXML(
1647: final org.exolab.castor.builder.binding.xml.NamingXMLType namingXML) {
1648: this ._namingXML = namingXML;
1649: }
1650:
1651: /**
1652: *
1653: *
1654: * @param index
1655: * @param vPackage
1656: * @throws java.lang.IndexOutOfBoundsException if the index
1657: * given is outside the bounds of the collection
1658: */
1659: public void setPackage(
1660: final int index,
1661: final org.exolab.castor.builder.binding.xml.PackageType vPackage)
1662: throws java.lang.IndexOutOfBoundsException {
1663: // check bounds for index
1664: if (index < 0 || index >= this ._packageList.size()) {
1665: throw new IndexOutOfBoundsException(
1666: "setPackage: Index value '" + index
1667: + "' not in range [0.."
1668: + (this ._packageList.size() - 1) + "]");
1669: }
1670:
1671: this ._packageList.set(index, vPackage);
1672: }
1673:
1674: /**
1675: *
1676: *
1677: * @param vPackageArray
1678: */
1679: public void setPackage(
1680: final org.exolab.castor.builder.binding.xml.PackageType[] vPackageArray) {
1681: //-- copy array
1682: _packageList.clear();
1683:
1684: for (int i = 0; i < vPackageArray.length; i++) {
1685: this ._packageList.add(vPackageArray[i]);
1686: }
1687: }
1688:
1689: /**
1690: *
1691: *
1692: * @param index
1693: * @param vSimpleTypeBinding
1694: * @throws java.lang.IndexOutOfBoundsException if the index
1695: * given is outside the bounds of the collection
1696: */
1697: public void setSimpleTypeBinding(
1698: final int index,
1699: final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding)
1700: throws java.lang.IndexOutOfBoundsException {
1701: // check bounds for index
1702: if (index < 0 || index >= this ._simpleTypeBindingList.size()) {
1703: throw new IndexOutOfBoundsException(
1704: "setSimpleTypeBinding: Index value '" + index
1705: + "' not in range [0.."
1706: + (this ._simpleTypeBindingList.size() - 1)
1707: + "]");
1708: }
1709:
1710: this ._simpleTypeBindingList.set(index, vSimpleTypeBinding);
1711: }
1712:
1713: /**
1714: *
1715: *
1716: * @param vSimpleTypeBindingArray
1717: */
1718: public void setSimpleTypeBinding(
1719: final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vSimpleTypeBindingArray) {
1720: //-- copy array
1721: _simpleTypeBindingList.clear();
1722:
1723: for (int i = 0; i < vSimpleTypeBindingArray.length; i++) {
1724: this ._simpleTypeBindingList.add(vSimpleTypeBindingArray[i]);
1725: }
1726: }
1727:
1728: /**
1729: * Method unmarshalBinding.
1730: *
1731: * @param reader
1732: * @throws org.exolab.castor.xml.MarshalException if object is
1733: * null or if any SAXException is thrown during marshaling
1734: * @throws org.exolab.castor.xml.ValidationException if this
1735: * object is an invalid instance according to the schema
1736: * @return the unmarshaled
1737: * org.exolab.castor.builder.binding.xml.Binding
1738: */
1739: public static org.exolab.castor.builder.binding.xml.Binding unmarshalBinding(
1740: final java.io.Reader reader)
1741: throws org.exolab.castor.xml.MarshalException,
1742: org.exolab.castor.xml.ValidationException {
1743: return (org.exolab.castor.builder.binding.xml.Binding) Unmarshaller
1744: .unmarshal(
1745: org.exolab.castor.builder.binding.xml.Binding.class,
1746: reader);
1747: }
1748:
1749: /**
1750: *
1751: *
1752: * @throws org.exolab.castor.xml.ValidationException if this
1753: * object is an invalid instance according to the schema
1754: */
1755: public void validate()
1756: throws org.exolab.castor.xml.ValidationException {
1757: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1758: validator.validate(this);
1759: }
1760:
1761: }
|