debian/0000755000000000000000000000000011712421106007161 5ustar debian/source/0000755000000000000000000000000011712417334010471 5ustar debian/source/format0000644000000000000000000000001411712417334011677 0ustar 3.0 (quilt) debian/classpath-debian0000644000000000000000000000057711712417334012327 0ustar usr/share/java/commons-logging.jar usr/share/java/commons-lang.jar usr/share/java/commons-cli.jar usr/share/java/oro.jar usr/share/java/regexp.jar usr/share/java/easymock.jar usr/share/java/junit4.jar usr/share/java/ant.jar usr/share/java/geronimo-jta_1.1_spec.jar usr/share/java/cglib.jar usr/share/java/log4j-1.2.jar usr/share/java/glassfish-javaee.jar usr/share/java/velocity.jar debian/orig-tar.sh0000755000000000000000000000066411712417334011262 0ustar #!/bin/sh set -e # called by uscan with '--upstream-version' echo "version $2" package=`dpkg-parsechangelog | sed -n 's/^Source: //p'` version=$2 tarball=$3 TAR=${package}_${version}.orig.tar.gz DIR=${package}-${version}.orig tar zxvf $tarball && mv "${package}-${version}" $DIR GZIP=--best tar --numeric --group 0 --owner 0 -c -v -z -f $TAR \ --anchored -X debian/orig-tar.excludes $DIR rm -rf $tarball $DIR debian/changelog0000644000000000000000000000102111712417401011030 0ustar castor (1.3.2-1) unstable; urgency=low * New upstream release. * Refresh patches. * Bump Standards-Version to 3.9.2. No changes were required. * Add dependencies on libcommons-lang-java, libcommons-cli-java and javacc. * Fix Vcs-Git URL. * Fix clean target to allow twice-in-a-row builds. -- Miguel Landaeta Sun, 22 Jan 2012 00:02:52 -0430 castor (1.3.1-1) unstable; urgency=low * Initial release. (Closes: #581862). -- Miguel Landaeta Fri, 02 Jul 2010 20:14:04 -0430 debian/copyright0000644000000000000000000000611711712417334011131 0ustar The sources where downloaded from http://dist.codehaus.org/castor/1.3.1/castor-1.3.1-src.tgz. Files: * Copyright: © 1999-2004, Intalio Inc., and others, © 2004-2010, Werner Guttmann, © 2006-2007, Keith Visco, © 2005-2009, Ralf Joachim, © 2006-2007, Edward Kuns, © 2005-2007, Assaf Arkin, © 2007-2009, Peter Eibner, © 2005-2006, Gregory Block, © 2005-2006, Thomas Yip, © 2008-2009, Udai Gupta, © 2008-2009, Lukas Lang, © 2007-2008, Joachim Grueneis, © 2006-2007, Le Duc Bao, © 2005-2006,2008, Bruce Snyder, © 2007, Arnaud Blandin, © 2007, Andrew Fawcett, © 2008, Tobias Hochwallner, © 2008, Filip Hianik, © 2008, Sebastian Gabmeyer, © 2007, Jim Procter, © 2005, Martin Fuchs, © 2005, Nissim Karpenstein, © 2005, Stein M. Hugubakken, © 2005, Tim Telcik, © 2008, Oleg Nitz, © 2008, Leonardo Souza Mario Bueno, © 2008, Thomas Fach, © 2009, Ahmad Hassan, © 2009, Dan Daugherty, © 2005, Nick Stuart, © 2006, Holger West, © 2004, Robert La Ferla, © 2006, Thierry Guerin, © 2009, Torsten Juergeleit License: BSD-like, Apache-2.0 Files: debian/* Copyright: © 2010, Miguel Landaeta License: Apache-2.0 License BSD-like Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name "ExoLab" must not be used to endorse or promote products derived from this Software without prior written permission of Intalio Inc. For written permission, please contact info@exolab.org. 4. Products derived from this Software may not be called "Castor" nor may "Castor" appear in their names without prior written permission of Intalio Inc. Exolab, Castor and Intalio are trademarks of Intalio Inc. 5. Due credit should be given to the ExoLab Project (http://www.exolab.org/). THIS SOFTWARE IS PROVIDED BY INTALIO AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTALIO OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: Apache-2.0 The full text of the Apache 2.0 license is distributed in /usr/share/common-licenses/Apache-2.0 on Debian systems. debian/compat0000644000000000000000000000000211712417334010367 0ustar 7 debian/control0000644000000000000000000002251111712417334010575 0ustar Source: castor Maintainer: Debian Java Maintainers Uploaders: Miguel Landaeta Section: java Priority: optional Build-Depends: debhelper (>= 7.0.50), default-jdk, javahelper, ant, libcommons-logging-java, liboro-java, libregexp-java, libeasymock-java, junit, junit4, libgeronimo-jta-1.1-spec-java, libcglib-java, liblog4j1.2-java, glassfish-javaee, velocity, maven-repo-helper, ant-optional, libcommons-lang-java, libcommons-cli-java, javacc Standards-Version: 3.9.2 Homepage: http://www.castor.org/ Vcs-Git: git://git.debian.org/git/pkg-java/castor.git Vcs-Browser: http://git.debian.org/?p=pkg-java/castor.git Package: libcastor-xml-java Architecture: all Depends: libcastor-core-java, libcommons-logging-java, ${misc:Depends} Recommends: liboro-java, libregexp-java, libcommons-lang-java Suggests: libcastor-java-doc (= ${binary:Version}) Description: Data binding framework for Java (XML, Objects, DB) - XML module Castor is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. . This package contains the core XML data binding framework with support for marshalling Java objects to and unmarshalling from XML documents. Package: libcastor-core-java Architecture: all Depends: libcommons-logging-java, ${misc:Depends} Suggests: libcastor-java-doc (= ${binary:Version}) Description: Data binding framework for Java (XML, Objects, DB) - Core Castor is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. . This package contains the core functionality of Castor and it is required by all other modules. Package: libcastor-jdo-java Architecture: all Depends: libcastor-core-java, libcastor-xml-java, libcastor-xml-schema-java, libgeronimo-jta-1.0.1b-spec-java, libcglib-java, glassfish-javaee, ${misc:Depends} Suggests: libcastor-java-doc (= ${binary:Version}) Description: Data binding framework for Java (XML, Objects, DB) - JDO Castor is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. . This package contains Castor JDO: a persistence framework. Package: libcastor-codegen-java Architecture: all Depends: libcastor-core-java, libcastor-xml-java, libcastor-xml-schema-java, libcommons-logging-java, ${misc:Depends} Recommends: velocity Suggests: libcastor-java-doc (= ${binary:Version}) Description: Data binding framework for Java (XML, Objects, DB) - Codegen Castor is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. . This package contains the Castor XML code generator. Package: libcastor-ddlgen-java Architecture: all Depends: libcastor-xml-java, ${misc:Depends} Suggests: libcastor-java-doc (= ${binary:Version}) Description: Data binding framework for Java (XML, Objects, DB) - DDL generator Castor is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. . This package contains the Castor JDO DDL generator. Package: libcastor-xml-schema-java Architecture: all Depends: libcastor-xml-java, libcastor-core-java, libcommons-logging-java, ${misc:Depends} Suggests: libcastor-java-doc (= ${binary:Version}), libcommons-cli-java Description: Data binding framework for Java (XML, Objects, DB) - XML Schema Castor is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. . This package contains a module with Castor XML schema support and provides functionality to reading, processing and writing XML schema documents. Package: libcastor-anttasks-java Architecture: all Depends: libcastor-ddlgen-java, libcastor-codegen-java, libcommons-logging-java, ${misc:Depends} Recommends: ant Suggests: libcastor-java-doc (= ${binary:Version}) Description: Data binding framework for Java (XML, Objects, DB) - Ant Tasks Castor is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. . This package contains Ant task definitions for Castor XML code generator. Package: libcastor-java-doc Architecture: all Section: doc Depends: ${misc:Depends} Suggests: libcastor-xml-java (= ${binary:Version}) Description: Documentation for Castor Java databinding framework Documentation for Castor, that is a data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. . Castor XML is an XML data binding framework. Unlike the two main XML APIs, DOM (Document Object Model) and SAX (Simple API for XML) which deal with the structure of an XML document, Castor enables you to deal with the data defined in an XML document through an object model which represents that data. . Castor XML can be compared to XMLBeans framework. . Castor JDO is an Object-Relational Mapping and Data-Binding Framework. Castor can map relational database data into Java Data Object based on user-defined mapping schema. In the other point-of-view, it provides java data objects a persistence layer. debian/README.source0000644000000000000000000000102311712417334011344 0ustar The upstream tarball has been modified as follows, to comply with DFSG: * All files under lib directories files were removed since Debian packages must build with libraries installed on system. * All .xsd files under xmlctf/tests/MasterTestSuite/sourcegenerator directory were removed because they have unclear licenses and/or copyright statements. Those files are not needed to build or use the libraries shipped with this package. -- Miguel Landaeta Mon, 28 Jun 2010 19:07:59 -0430 debian/rules0000755000000000000000000000352511712417334010256 0ustar #!/usr/bin/make -f export JAVA_HOME=/usr/lib/jvm/default-java VERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ' | sed 's/-[^-]*$$//') %: dh $@ --with javahelper override_dh_auto_build: cd src && ant release tar zxf dist/castor-*-doc.tgz -C target rm -f target/doc/*license* override_dh_install: dh_install -Xjavadoc # XML module mh_installpom -plibcastor-xml-java --no-parent xml/pom.xml mh_installjar -plibcastor-xml-java -l xml/pom.xml \ dist/castor-xml-$(VERSION).jar # Core module mh_installpom -plibcastor-core-java --no-parent core/pom.xml mh_installjar -plibcastor-core-java -l core/pom.xml \ dist/castor-core-$(VERSION).jar # JDO module mh_installpom -plibcastor-jdo-java --no-parent cpa/pom.xml mh_installjar -plibcastor-jdo-java -l cpa/pom.xml \ dist/castor-jdo-$(VERSION).jar # Codegen module mh_installpom -plibcastor-codegen-java --no-parent codegen/pom.xml mh_installjar -plibcastor-codegen-java -l codegen/pom.xml \ dist/castor-codegen-$(VERSION).jar # Ant tasks mh_installpom -plibcastor-anttasks-java --no-parent anttask/pom.xml mh_installjar -plibcastor-anttasks-java -l anttask/pom.xml \ dist/castor-anttasks-$(VERSION).jar # DDLgen module mh_installpom -plibcastor-ddlgen-java --no-parent ddlgen/pom.xml mh_installjar -plibcastor-ddlgen-java -l ddlgen/pom.xml \ dist/castor-ddlgen-$(VERSION).jar # XML Schema module mh_installpom -plibcastor-xml-schema-java --no-parent schema/pom.xml mh_installjar -plibcastor-xml-schema-java -l schema/pom.xml \ dist/castor-xml-schema-$(VERSION).jar override_dh_auto_clean: -cd src && ant distclean mh_clean cd cpa/target/generated-sources && rm -rf jjtree javacc get-orig-source: cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \ uscan \ --verbose \ --no-symlink \ --destdir $(CURDIR) \ --watchfile debian/watch \ --force-download debian/watch0000644000000000000000000000020311712417334010215 0ustar version=3 http://www.castor.org/download.html \ http://dist.codehaus.org/castor/.*/castor-(.*)-src.tgz \ debian debian/orig-tar.sh debian/libcastor-java-doc.install0000644000000000000000000000005511712417334014225 0ustar target/doc usr/share/doc/libcastor-xml-java debian/libcastor-java-doc.javadoc0000644000000000000000000000007111712417334014164 0ustar target/doc/javadoc usr/share/doc/libcastor-xml-java/api debian/orig-tar.excludes0000644000000000000000000000033111712417334012450 0ustar # bundled libraries castor-*/lib/* # so many unused xsd files with unclear licenses and copyright statements castor-*/xmlctf/tests/MasterTestSuite/sourcegenerator/*.xsd # sourceless pdf files castor-*/src/doc/*.pdf debian/patches/0000755000000000000000000000000011712417334010620 5ustar debian/patches/add_xml_generated_sources.diff0000644000000000000000000205211311712417334016647 0ustar Description: add autogenerated sources to xml module These classes were generated with castor-maven-plugin. The reason why they are not generated at build time is because castor-maven-plugin is not available in Debian since it depends on this package. When castor gets accepted in the archive, castor-maven-plugin will be packaged and when it gets accepted in the archive, this package will re rebuilt with that plugin and this patch will be removed. Author: Miguel Landaeta Forwarded: no Last-Update: 2012-01-21 --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/FieldHandlerDef.java @@ -0,0 +1,331 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class FieldHandlerDef. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class FieldHandlerDef implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _clazz. + */ + private java.lang.String _clazz; + + /** + * Field _paramList. + */ + private java.util.List _paramList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldHandlerDef() { + super(); + this._paramList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(vParam); + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final int index, + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(index, vParam); + } + + /** + * Method enumerateParam. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateParam( + ) { + return java.util.Collections.enumeration(this._paramList); + } + + /** + * Returns the value of field 'clazz'. + * + * @return the value of field 'Clazz'. + */ + public java.lang.String getClazz( + ) { + return this._clazz; + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method getParam. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.exolab.castor.mapping.xml.Param + * at the given index + */ + public org.exolab.castor.mapping.xml.Param getParam( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("getParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.Param) _paramList.get(index); + } + + /** + * Method getParam.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.Param[] getParam( + ) { + org.exolab.castor.mapping.xml.Param[] array = new org.exolab.castor.mapping.xml.Param[0]; + return (org.exolab.castor.mapping.xml.Param[]) this._paramList.toArray(array); + } + + /** + * Method getParamCount. + * + * @return the size of this collection + */ + public int getParamCount( + ) { + return this._paramList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateParam. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateParam( + ) { + return this._paramList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllParam( + ) { + this._paramList.clear(); + } + + /** + * Method removeParam. + * + * @param vParam + * @return true if the object was removed from the collection. + */ + public boolean removeParam( + final org.exolab.castor.mapping.xml.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.exolab.castor.mapping.xml.Param) obj; + } + + /** + * Sets the value of field 'clazz'. + * + * @param clazz the value of field 'clazz'. + */ + public void setClazz( + final java.lang.String clazz) { + this._clazz = clazz; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setParam( + final int index, + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("setParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + this._paramList.set(index, vParam); + } + + /** + * + * + * @param vParamArray + */ + public void setParam( + final org.exolab.castor.mapping.xml.Param[] vParamArray) { + //-- copy array + _paramList.clear(); + + for (int i = 0; i < vParamArray.length; i++) { + this._paramList.add(vParamArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.FieldHandlerDef + */ + public static org.exolab.castor.mapping.xml.FieldHandlerDef unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.FieldHandlerDef) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.FieldHandlerDef.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/.castor.cdr @@ -0,0 +1,20 @@ +#Sun Jan 22 02:11:58 UTC 2012 +org.exolab.castor.mapping.xml.BindXml=org.exolab.castor.mapping.xml.descriptors.BindXmlDescriptor +org.exolab.castor.mapping.xml.FieldHandlerDef=org.exolab.castor.mapping.xml.descriptors.FieldHandlerDefDescriptor +org.exolab.castor.mapping.xml.Container=org.exolab.castor.mapping.xml.descriptors.ContainerDescriptor +org.exolab.castor.mapping.xml.Include=org.exolab.castor.mapping.xml.descriptors.IncludeDescriptor +org.exolab.castor.mapping.xml.Param=org.exolab.castor.mapping.xml.descriptors.ParamDescriptor +org.exolab.castor.mapping.xml.Ldap=org.exolab.castor.mapping.xml.descriptors.LdapDescriptor +org.exolab.castor.mapping.xml.ClassChoice=org.exolab.castor.mapping.xml.descriptors.ClassChoiceDescriptor +org.exolab.castor.mapping.xml.NamedQuery=org.exolab.castor.mapping.xml.descriptors.NamedQueryDescriptor +org.exolab.castor.mapping.xml.ClassMapping=org.exolab.castor.mapping.xml.descriptors.ClassMappingDescriptor +org.exolab.castor.mapping.xml.CacheTypeMapping=org.exolab.castor.mapping.xml.descriptors.CacheTypeMappingDescriptor +org.exolab.castor.mapping.xml.FieldMapping=org.exolab.castor.mapping.xml.descriptors.FieldMappingDescriptor +org.exolab.castor.mapping.xml.MappingRoot=org.exolab.castor.mapping.xml.descriptors.MappingRootDescriptor +org.exolab.castor.mapping.xml.Sql=org.exolab.castor.mapping.xml.descriptors.SqlDescriptor +org.exolab.castor.mapping.xml.KeyGeneratorDef=org.exolab.castor.mapping.xml.descriptors.KeyGeneratorDefDescriptor +org.exolab.castor.mapping.xml.MapTo=org.exolab.castor.mapping.xml.descriptors.MapToDescriptor +org.exolab.castor.mapping.xml.Property=org.exolab.castor.mapping.xml.descriptors.PropertyDescriptor +org.exolab.castor.mapping.xml.PropertyType=org.exolab.castor.mapping.xml.descriptors.PropertyTypeDescriptor +org.exolab.castor.mapping.xml.QueryHint=org.exolab.castor.mapping.xml.descriptors.QueryHintDescriptor +org.exolab.castor.mapping.xml.NamedNativeQuery=org.exolab.castor.mapping.xml.descriptors.NamedNativeQueryDescriptor --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/MapTo.java @@ -0,0 +1,335 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * The 'map-to' element is used for specifying the name of the item + * + * that should be associated with the given Java object. + * + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class MapTo implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * An optional attribute used to specify the name of the table + * to which the given Java object is associated. + * + */ + private java.lang.String _table; + + /** + * Field _xml. + */ + private java.lang.String _xml; + + /** + * Field _nsUri. + */ + private java.lang.String _nsUri; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition = false; + + /** + * keeps track of state for field: _elementDefinition + */ + private boolean _has_elementDefinition; + + /** + * Field _ldapDn. + */ + private java.lang.String _ldapDn; + + /** + * Field _ldapOc. + */ + private java.lang.String _ldapOc; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MapTo() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteElementDefinition( + ) { + this._has_elementDefinition= false; + } + + /** + * Returns the value of field 'elementDefinition'. + * + * @return the value of field 'ElementDefinition'. + */ + public boolean getElementDefinition( + ) { + return this._elementDefinition; + } + + /** + * Returns the value of field 'ldapDn'. + * + * @return the value of field 'LdapDn'. + */ + public java.lang.String getLdapDn( + ) { + return this._ldapDn; + } + + /** + * Returns the value of field 'ldapOc'. + * + * @return the value of field 'LdapOc'. + */ + public java.lang.String getLdapOc( + ) { + return this._ldapOc; + } + + /** + * Returns the value of field 'nsPrefix'. + * + * @return the value of field 'NsPrefix'. + */ + public java.lang.String getNsPrefix( + ) { + return this._nsPrefix; + } + + /** + * Returns the value of field 'nsUri'. + * + * @return the value of field 'NsUri'. + */ + public java.lang.String getNsUri( + ) { + return this._nsUri; + } + + /** + * Returns the value of field 'table'. The field 'table' has + * the following description: An optional attribute used to + * specify the name of the table + * to which the given Java object is associated. + * + * + * @return the value of field 'Table'. + */ + public java.lang.String getTable( + ) { + return this._table; + } + + /** + * Returns the value of field 'xml'. + * + * @return the value of field 'Xml'. + */ + public java.lang.String getXml( + ) { + return this._xml; + } + + /** + * Method hasElementDefinition. + * + * @return true if at least one ElementDefinition has been added + */ + public boolean hasElementDefinition( + ) { + return this._has_elementDefinition; + } + + /** + * Returns the value of field 'elementDefinition'. + * + * @return the value of field 'ElementDefinition'. + */ + public boolean isElementDefinition( + ) { + return this._elementDefinition; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'elementDefinition'. + * + * @param elementDefinition the value of field + * 'elementDefinition'. + */ + public void setElementDefinition( + final boolean elementDefinition) { + this._elementDefinition = elementDefinition; + this._has_elementDefinition = true; + } + + /** + * Sets the value of field 'ldapDn'. + * + * @param ldapDn the value of field 'ldapDn'. + */ + public void setLdapDn( + final java.lang.String ldapDn) { + this._ldapDn = ldapDn; + } + + /** + * Sets the value of field 'ldapOc'. + * + * @param ldapOc the value of field 'ldapOc'. + */ + public void setLdapOc( + final java.lang.String ldapOc) { + this._ldapOc = ldapOc; + } + + /** + * Sets the value of field 'nsPrefix'. + * + * @param nsPrefix the value of field 'nsPrefix'. + */ + public void setNsPrefix( + final java.lang.String nsPrefix) { + this._nsPrefix = nsPrefix; + } + + /** + * Sets the value of field 'nsUri'. + * + * @param nsUri the value of field 'nsUri'. + */ + public void setNsUri( + final java.lang.String nsUri) { + this._nsUri = nsUri; + } + + /** + * Sets the value of field 'table'. The field 'table' has the + * following description: An optional attribute used to specify + * the name of the table + * to which the given Java object is associated. + * + * + * @param table the value of field 'table'. + */ + public void setTable( + final java.lang.String table) { + this._table = table; + } + + /** + * Sets the value of field 'xml'. + * + * @param xml the value of field 'xml'. + */ + public void setXml( + final java.lang.String xml) { + this._xml = xml; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.exolab.castor.mapping.xml.MapTo + */ + public static org.exolab.castor.mapping.xml.MapTo unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.MapTo) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.MapTo.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/BindXml.java @@ -0,0 +1,670 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * The 'bind-xml' element is used for specifying XML specific + * databinding + * properties and behavior for a specific field. 'bind-xml' may + * only appear + * as a child of a 'field' element. + * + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class BindXml implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * An optional attribute used for specifying the XML name for + * the + * field associated with the 'bind-xml' element. + * + */ + private java.lang.String _name; + + /** + * Field _type. + */ + private java.lang.String _type; + + /** + * Allows specifying how Castor should automatically determines + * the XML name of this field when no name has been specified. + * In most cases the XML name is determined by using the field + * name, + * but in some cases the user may want to use the Class name + * of + * the field type. This attribute allows choosing between the + * two approaches. If this attribute is not specified, the + * field + * name is used as the XML name. + * + */ + private org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType _autoNaming; + + /** + * Allows specifying a nested location path for this field, + * the value should just be a simplified XPath like value + * where names are separated by "/". + * + */ + private java.lang.String _location; + + /** + * Field _matches. + */ + private java.lang.String _matches; + + /** + * Field _reference. + */ + private boolean _reference; + + /** + * keeps track of state for field: _reference + */ + private boolean _has_reference; + + /** + * Field _node. + */ + private org.exolab.castor.mapping.xml.types.BindXmlNodeType _node; + + /** + * Field _QNamePrefix. + */ + private java.lang.String _QNamePrefix; + + /** + * Field _transient. + */ + private boolean _transient; + + /** + * keeps track of state for field: _transient + */ + private boolean _has_transient; + + /** + * The 'class' element is used to store information about + * mapping of a class. + * + */ + private org.exolab.castor.mapping.xml.ClassMapping _classMapping; + + /** + * Field _propertyList. + */ + private java.util.List _propertyList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public BindXml() { + super(); + this._propertyList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vProperty + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addProperty( + final org.exolab.castor.mapping.xml.Property vProperty) + throws java.lang.IndexOutOfBoundsException { + this._propertyList.add(vProperty); + } + + /** + * + * + * @param index + * @param vProperty + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addProperty( + final int index, + final org.exolab.castor.mapping.xml.Property vProperty) + throws java.lang.IndexOutOfBoundsException { + this._propertyList.add(index, vProperty); + } + + /** + */ + public void deleteReference( + ) { + this._has_reference= false; + } + + /** + */ + public void deleteTransient( + ) { + this._has_transient= false; + } + + /** + * Method enumerateProperty. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateProperty( + ) { + return java.util.Collections.enumeration(this._propertyList); + } + + /** + * Returns the value of field 'autoNaming'. The field + * 'autoNaming' has the following description: Allows + * specifying how Castor should automatically determines + * the XML name of this field when no name has been specified. + * In most cases the XML name is determined by using the field + * name, + * but in some cases the user may want to use the Class name + * of + * the field type. This attribute allows choosing between the + * two approaches. If this attribute is not specified, the + * field + * name is used as the XML name. + * + * + * @return the value of field 'AutoNaming'. + */ + public org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType getAutoNaming( + ) { + return this._autoNaming; + } + + /** + * Returns the value of field 'classMapping'. The field + * 'classMapping' has the following description: The 'class' + * element is used to store information about mapping of a + * class. + * + * + * @return the value of field 'ClassMapping'. + */ + public org.exolab.castor.mapping.xml.ClassMapping getClassMapping( + ) { + return this._classMapping; + } + + /** + * Returns the value of field 'location'. The field 'location' + * has the following description: Allows specifying a nested + * location path for this field, + * the value should just be a simplified XPath like value + * where names are separated by "/". + * + * + * @return the value of field 'Location'. + */ + public java.lang.String getLocation( + ) { + return this._location; + } + + /** + * Returns the value of field 'matches'. + * + * @return the value of field 'Matches'. + */ + public java.lang.String getMatches( + ) { + return this._matches; + } + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: An optional attribute used for + * specifying the XML name for the + * field associated with the 'bind-xml' element. + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'node'. + * + * @return the value of field 'Node'. + */ + public org.exolab.castor.mapping.xml.types.BindXmlNodeType getNode( + ) { + return this._node; + } + + /** + * Method getProperty. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.Property at the given index + */ + public org.exolab.castor.mapping.xml.Property getProperty( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._propertyList.size()) { + throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.Property) _propertyList.get(index); + } + + /** + * Method getProperty.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.Property[] getProperty( + ) { + org.exolab.castor.mapping.xml.Property[] array = new org.exolab.castor.mapping.xml.Property[0]; + return (org.exolab.castor.mapping.xml.Property[]) this._propertyList.toArray(array); + } + + /** + * Method getPropertyCount. + * + * @return the size of this collection + */ + public int getPropertyCount( + ) { + return this._propertyList.size(); + } + + /** + * Returns the value of field 'QNamePrefix'. + * + * @return the value of field 'QNamePrefix'. + */ + public java.lang.String getQNamePrefix( + ) { + return this._QNamePrefix; + } + + /** + * Returns the value of field 'reference'. + * + * @return the value of field 'Reference'. + */ + public boolean getReference( + ) { + return this._reference; + } + + /** + * Returns the value of field 'transient'. + * + * @return the value of field 'Transient'. + */ + public boolean getTransient( + ) { + return this._transient; + } + + /** + * Returns the value of field 'type'. + * + * @return the value of field 'Type'. + */ + public java.lang.String getType( + ) { + return this._type; + } + + /** + * Method hasReference. + * + * @return true if at least one Reference has been added + */ + public boolean hasReference( + ) { + return this._has_reference; + } + + /** + * Method hasTransient. + * + * @return true if at least one Transient has been added + */ + public boolean hasTransient( + ) { + return this._has_transient; + } + + /** + * Returns the value of field 'reference'. + * + * @return the value of field 'Reference'. + */ + public boolean isReference( + ) { + return this._reference; + } + + /** + * Returns the value of field 'transient'. + * + * @return the value of field 'Transient'. + */ + public boolean isTransient( + ) { + return this._transient; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateProperty. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateProperty( + ) { + return this._propertyList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllProperty( + ) { + this._propertyList.clear(); + } + + /** + * Method removeProperty. + * + * @param vProperty + * @return true if the object was removed from the collection. + */ + public boolean removeProperty( + final org.exolab.castor.mapping.xml.Property vProperty) { + boolean removed = _propertyList.remove(vProperty); + return removed; + } + + /** + * Method removePropertyAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.Property removePropertyAt( + final int index) { + java.lang.Object obj = this._propertyList.remove(index); + return (org.exolab.castor.mapping.xml.Property) obj; + } + + /** + * Sets the value of field 'autoNaming'. The field 'autoNaming' + * has the following description: Allows specifying how Castor + * should automatically determines + * the XML name of this field when no name has been specified. + * In most cases the XML name is determined by using the field + * name, + * but in some cases the user may want to use the Class name + * of + * the field type. This attribute allows choosing between the + * two approaches. If this attribute is not specified, the + * field + * name is used as the XML name. + * + * + * @param autoNaming the value of field 'autoNaming'. + */ + public void setAutoNaming( + final org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType autoNaming) { + this._autoNaming = autoNaming; + } + + /** + * Sets the value of field 'classMapping'. The field + * 'classMapping' has the following description: The 'class' + * element is used to store information about mapping of a + * class. + * + * + * @param classMapping the value of field 'classMapping'. + */ + public void setClassMapping( + final org.exolab.castor.mapping.xml.ClassMapping classMapping) { + this._classMapping = classMapping; + } + + /** + * Sets the value of field 'location'. The field 'location' has + * the following description: Allows specifying a nested + * location path for this field, + * the value should just be a simplified XPath like value + * where names are separated by "/". + * + * + * @param location the value of field 'location'. + */ + public void setLocation( + final java.lang.String location) { + this._location = location; + } + + /** + * Sets the value of field 'matches'. + * + * @param matches the value of field 'matches'. + */ + public void setMatches( + final java.lang.String matches) { + this._matches = matches; + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: An optional attribute used for + * specifying the XML name for the + * field associated with the 'bind-xml' element. + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'node'. + * + * @param node the value of field 'node'. + */ + public void setNode( + final org.exolab.castor.mapping.xml.types.BindXmlNodeType node) { + this._node = node; + } + + /** + * + * + * @param index + * @param vProperty + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setProperty( + final int index, + final org.exolab.castor.mapping.xml.Property vProperty) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._propertyList.size()) { + throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]"); + } + + this._propertyList.set(index, vProperty); + } + + /** + * + * + * @param vPropertyArray + */ + public void setProperty( + final org.exolab.castor.mapping.xml.Property[] vPropertyArray) { + //-- copy array + _propertyList.clear(); + + for (int i = 0; i < vPropertyArray.length; i++) { + this._propertyList.add(vPropertyArray[i]); + } + } + + /** + * Sets the value of field 'QNamePrefix'. + * + * @param QNamePrefix the value of field 'QNamePrefix'. + */ + public void setQNamePrefix( + final java.lang.String QNamePrefix) { + this._QNamePrefix = QNamePrefix; + } + + /** + * Sets the value of field 'reference'. + * + * @param reference the value of field 'reference'. + */ + public void setReference( + final boolean reference) { + this._reference = reference; + this._has_reference = true; + } + + /** + * Sets the value of field 'transient'. + * + * @param _transient + * @param transient the value of field 'transient'. + */ + public void setTransient( + final boolean _transient) { + this._transient = _transient; + this._has_transient = true; + } + + /** + * Sets the value of field 'type'. + * + * @param type the value of field 'type'. + */ + public void setType( + final java.lang.String type) { + this._type = type; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.exolab.castor.mapping.xml.BindXml + */ + public static org.exolab.castor.mapping.xml.BindXml unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.BindXml) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.BindXml.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/PropertyType.java @@ -0,0 +1,115 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class PropertyType. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public abstract class PropertyType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _value. + */ + private java.lang.String _value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PropertyType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'value'. + * + * @return the value of field 'Value'. + */ + public java.lang.String getValue( + ) { + return this._value; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue( + final java.lang.String value) { + this._value = value; + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/MappingRoot.java @@ -0,0 +1,814 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class MappingRoot. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class MappingRoot implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _description. + */ + private java.lang.String _description; + + /** + * Field _includeList. + */ + private java.util.List _includeList; + + /** + * Field _fieldHandlerDefList. + */ + private java.util.List _fieldHandlerDefList; + + /** + * The 'class' element is used to store information about + * mapping of a class. + * + */ + private java.util.List _classMappingList; + + /** + * Field _keyGeneratorDefList. + */ + private java.util.List _keyGeneratorDefList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MappingRoot() { + super(); + this._includeList = new java.util.ArrayList(); + this._fieldHandlerDefList = new java.util.ArrayList(); + this._classMappingList = new java.util.ArrayList(); + this._keyGeneratorDefList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vClassMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addClassMapping( + final org.exolab.castor.mapping.xml.ClassMapping vClassMapping) + throws java.lang.IndexOutOfBoundsException { + this._classMappingList.add(vClassMapping); + } + + /** + * + * + * @param index + * @param vClassMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addClassMapping( + final int index, + final org.exolab.castor.mapping.xml.ClassMapping vClassMapping) + throws java.lang.IndexOutOfBoundsException { + this._classMappingList.add(index, vClassMapping); + } + + /** + * + * + * @param vFieldHandlerDef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addFieldHandlerDef( + final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef) + throws java.lang.IndexOutOfBoundsException { + this._fieldHandlerDefList.add(vFieldHandlerDef); + } + + /** + * + * + * @param index + * @param vFieldHandlerDef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addFieldHandlerDef( + final int index, + final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef) + throws java.lang.IndexOutOfBoundsException { + this._fieldHandlerDefList.add(index, vFieldHandlerDef); + } + + /** + * + * + * @param vInclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addInclude( + final org.exolab.castor.mapping.xml.Include vInclude) + throws java.lang.IndexOutOfBoundsException { + this._includeList.add(vInclude); + } + + /** + * + * + * @param index + * @param vInclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addInclude( + final int index, + final org.exolab.castor.mapping.xml.Include vInclude) + throws java.lang.IndexOutOfBoundsException { + this._includeList.add(index, vInclude); + } + + /** + * + * + * @param vKeyGeneratorDef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addKeyGeneratorDef( + final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef) + throws java.lang.IndexOutOfBoundsException { + this._keyGeneratorDefList.add(vKeyGeneratorDef); + } + + /** + * + * + * @param index + * @param vKeyGeneratorDef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addKeyGeneratorDef( + final int index, + final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef) + throws java.lang.IndexOutOfBoundsException { + this._keyGeneratorDefList.add(index, vKeyGeneratorDef); + } + + /** + * Method enumerateClassMapping. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateClassMapping( + ) { + return java.util.Collections.enumeration(this._classMappingList); + } + + /** + * Method enumerateFieldHandlerDef. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateFieldHandlerDef( + ) { + return java.util.Collections.enumeration(this._fieldHandlerDefList); + } + + /** + * Method enumerateInclude. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateInclude( + ) { + return java.util.Collections.enumeration(this._includeList); + } + + /** + * Method enumerateKeyGeneratorDef. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateKeyGeneratorDef( + ) { + return java.util.Collections.enumeration(this._keyGeneratorDefList); + } + + /** + * Method getClassMapping. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.ClassMapping at the given index + */ + public org.exolab.castor.mapping.xml.ClassMapping getClassMapping( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._classMappingList.size()) { + throw new IndexOutOfBoundsException("getClassMapping: Index value '" + index + "' not in range [0.." + (this._classMappingList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.ClassMapping) _classMappingList.get(index); + } + + /** + * Method getClassMapping.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.ClassMapping[] getClassMapping( + ) { + org.exolab.castor.mapping.xml.ClassMapping[] array = new org.exolab.castor.mapping.xml.ClassMapping[0]; + return (org.exolab.castor.mapping.xml.ClassMapping[]) this._classMappingList.toArray(array); + } + + /** + * Method getClassMappingCount. + * + * @return the size of this collection + */ + public int getClassMappingCount( + ) { + return this._classMappingList.size(); + } + + /** + * Returns the value of field 'description'. + * + * @return the value of field 'Description'. + */ + public java.lang.String getDescription( + ) { + return this._description; + } + + /** + * Method getFieldHandlerDef. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.FieldHandlerDef at the given + * index + */ + public org.exolab.castor.mapping.xml.FieldHandlerDef getFieldHandlerDef( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._fieldHandlerDefList.size()) { + throw new IndexOutOfBoundsException("getFieldHandlerDef: Index value '" + index + "' not in range [0.." + (this._fieldHandlerDefList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.FieldHandlerDef) _fieldHandlerDefList.get(index); + } + + /** + * Method getFieldHandlerDef.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.FieldHandlerDef[] getFieldHandlerDef( + ) { + org.exolab.castor.mapping.xml.FieldHandlerDef[] array = new org.exolab.castor.mapping.xml.FieldHandlerDef[0]; + return (org.exolab.castor.mapping.xml.FieldHandlerDef[]) this._fieldHandlerDefList.toArray(array); + } + + /** + * Method getFieldHandlerDefCount. + * + * @return the size of this collection + */ + public int getFieldHandlerDefCount( + ) { + return this._fieldHandlerDefList.size(); + } + + /** + * Method getInclude. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.Include at the given index + */ + public org.exolab.castor.mapping.xml.Include getInclude( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._includeList.size()) { + throw new IndexOutOfBoundsException("getInclude: Index value '" + index + "' not in range [0.." + (this._includeList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.Include) _includeList.get(index); + } + + /** + * Method getInclude.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.Include[] getInclude( + ) { + org.exolab.castor.mapping.xml.Include[] array = new org.exolab.castor.mapping.xml.Include[0]; + return (org.exolab.castor.mapping.xml.Include[]) this._includeList.toArray(array); + } + + /** + * Method getIncludeCount. + * + * @return the size of this collection + */ + public int getIncludeCount( + ) { + return this._includeList.size(); + } + + /** + * Method getKeyGeneratorDef. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.KeyGeneratorDef at the given + * index + */ + public org.exolab.castor.mapping.xml.KeyGeneratorDef getKeyGeneratorDef( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._keyGeneratorDefList.size()) { + throw new IndexOutOfBoundsException("getKeyGeneratorDef: Index value '" + index + "' not in range [0.." + (this._keyGeneratorDefList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.KeyGeneratorDef) _keyGeneratorDefList.get(index); + } + + /** + * Method getKeyGeneratorDef.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.KeyGeneratorDef[] getKeyGeneratorDef( + ) { + org.exolab.castor.mapping.xml.KeyGeneratorDef[] array = new org.exolab.castor.mapping.xml.KeyGeneratorDef[0]; + return (org.exolab.castor.mapping.xml.KeyGeneratorDef[]) this._keyGeneratorDefList.toArray(array); + } + + /** + * Method getKeyGeneratorDefCount. + * + * @return the size of this collection + */ + public int getKeyGeneratorDefCount( + ) { + return this._keyGeneratorDefList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateClassMapping. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateClassMapping( + ) { + return this._classMappingList.iterator(); + } + + /** + * Method iterateFieldHandlerDef. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateFieldHandlerDef( + ) { + return this._fieldHandlerDefList.iterator(); + } + + /** + * Method iterateInclude. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateInclude( + ) { + return this._includeList.iterator(); + } + + /** + * Method iterateKeyGeneratorDef. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateKeyGeneratorDef( + ) { + return this._keyGeneratorDefList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllClassMapping( + ) { + this._classMappingList.clear(); + } + + /** + */ + public void removeAllFieldHandlerDef( + ) { + this._fieldHandlerDefList.clear(); + } + + /** + */ + public void removeAllInclude( + ) { + this._includeList.clear(); + } + + /** + */ + public void removeAllKeyGeneratorDef( + ) { + this._keyGeneratorDefList.clear(); + } + + /** + * Method removeClassMapping. + * + * @param vClassMapping + * @return true if the object was removed from the collection. + */ + public boolean removeClassMapping( + final org.exolab.castor.mapping.xml.ClassMapping vClassMapping) { + boolean removed = _classMappingList.remove(vClassMapping); + return removed; + } + + /** + * Method removeClassMappingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.ClassMapping removeClassMappingAt( + final int index) { + java.lang.Object obj = this._classMappingList.remove(index); + return (org.exolab.castor.mapping.xml.ClassMapping) obj; + } + + /** + * Method removeFieldHandlerDef. + * + * @param vFieldHandlerDef + * @return true if the object was removed from the collection. + */ + public boolean removeFieldHandlerDef( + final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef) { + boolean removed = _fieldHandlerDefList.remove(vFieldHandlerDef); + return removed; + } + + /** + * Method removeFieldHandlerDefAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.FieldHandlerDef removeFieldHandlerDefAt( + final int index) { + java.lang.Object obj = this._fieldHandlerDefList.remove(index); + return (org.exolab.castor.mapping.xml.FieldHandlerDef) obj; + } + + /** + * Method removeInclude. + * + * @param vInclude + * @return true if the object was removed from the collection. + */ + public boolean removeInclude( + final org.exolab.castor.mapping.xml.Include vInclude) { + boolean removed = _includeList.remove(vInclude); + return removed; + } + + /** + * Method removeIncludeAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.Include removeIncludeAt( + final int index) { + java.lang.Object obj = this._includeList.remove(index); + return (org.exolab.castor.mapping.xml.Include) obj; + } + + /** + * Method removeKeyGeneratorDef. + * + * @param vKeyGeneratorDef + * @return true if the object was removed from the collection. + */ + public boolean removeKeyGeneratorDef( + final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef) { + boolean removed = _keyGeneratorDefList.remove(vKeyGeneratorDef); + return removed; + } + + /** + * Method removeKeyGeneratorDefAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.KeyGeneratorDef removeKeyGeneratorDefAt( + final int index) { + java.lang.Object obj = this._keyGeneratorDefList.remove(index); + return (org.exolab.castor.mapping.xml.KeyGeneratorDef) obj; + } + + /** + * + * + * @param index + * @param vClassMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setClassMapping( + final int index, + final org.exolab.castor.mapping.xml.ClassMapping vClassMapping) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._classMappingList.size()) { + throw new IndexOutOfBoundsException("setClassMapping: Index value '" + index + "' not in range [0.." + (this._classMappingList.size() - 1) + "]"); + } + + this._classMappingList.set(index, vClassMapping); + } + + /** + * + * + * @param vClassMappingArray + */ + public void setClassMapping( + final org.exolab.castor.mapping.xml.ClassMapping[] vClassMappingArray) { + //-- copy array + _classMappingList.clear(); + + for (int i = 0; i < vClassMappingArray.length; i++) { + this._classMappingList.add(vClassMappingArray[i]); + } + } + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription( + final java.lang.String description) { + this._description = description; + } + + /** + * + * + * @param index + * @param vFieldHandlerDef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setFieldHandlerDef( + final int index, + final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._fieldHandlerDefList.size()) { + throw new IndexOutOfBoundsException("setFieldHandlerDef: Index value '" + index + "' not in range [0.." + (this._fieldHandlerDefList.size() - 1) + "]"); + } + + this._fieldHandlerDefList.set(index, vFieldHandlerDef); + } + + /** + * + * + * @param vFieldHandlerDefArray + */ + public void setFieldHandlerDef( + final org.exolab.castor.mapping.xml.FieldHandlerDef[] vFieldHandlerDefArray) { + //-- copy array + _fieldHandlerDefList.clear(); + + for (int i = 0; i < vFieldHandlerDefArray.length; i++) { + this._fieldHandlerDefList.add(vFieldHandlerDefArray[i]); + } + } + + /** + * + * + * @param index + * @param vInclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setInclude( + final int index, + final org.exolab.castor.mapping.xml.Include vInclude) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._includeList.size()) { + throw new IndexOutOfBoundsException("setInclude: Index value '" + index + "' not in range [0.." + (this._includeList.size() - 1) + "]"); + } + + this._includeList.set(index, vInclude); + } + + /** + * + * + * @param vIncludeArray + */ + public void setInclude( + final org.exolab.castor.mapping.xml.Include[] vIncludeArray) { + //-- copy array + _includeList.clear(); + + for (int i = 0; i < vIncludeArray.length; i++) { + this._includeList.add(vIncludeArray[i]); + } + } + + /** + * + * + * @param index + * @param vKeyGeneratorDef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setKeyGeneratorDef( + final int index, + final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._keyGeneratorDefList.size()) { + throw new IndexOutOfBoundsException("setKeyGeneratorDef: Index value '" + index + "' not in range [0.." + (this._keyGeneratorDefList.size() - 1) + "]"); + } + + this._keyGeneratorDefList.set(index, vKeyGeneratorDef); + } + + /** + * + * + * @param vKeyGeneratorDefArray + */ + public void setKeyGeneratorDef( + final org.exolab.castor.mapping.xml.KeyGeneratorDef[] vKeyGeneratorDefArray) { + //-- copy array + _keyGeneratorDefList.clear(); + + for (int i = 0; i < vKeyGeneratorDefArray.length; i++) { + this._keyGeneratorDefList.add(vKeyGeneratorDefArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.MappingRoot + */ + public static org.exolab.castor.mapping.xml.MappingRoot unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.MappingRoot) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.MappingRoot.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/Include.java @@ -0,0 +1,138 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class Include. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Include implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _href. + */ + private java.lang.String _href; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Include() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'href'. + * + * @return the value of field 'Href'. + */ + public java.lang.String getHref( + ) { + return this._href; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'href'. + * + * @param href the value of field 'href'. + */ + public void setHref( + final java.lang.String href) { + this._href = href; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.exolab.castor.mapping.xml.Include + */ + public static org.exolab.castor.mapping.xml.Include unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.Include) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.Include.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/Ldap.java @@ -0,0 +1,138 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class Ldap. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Ldap implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Ldap() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.exolab.castor.mapping.xml.Ldap + */ + public static org.exolab.castor.mapping.xml.Ldap unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.Ldap) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.Ldap.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/NamedNativeQuery.java @@ -0,0 +1,381 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class NamedNativeQuery. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class NamedNativeQuery implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _resultClass. + */ + private java.lang.String _resultClass; + + /** + * Field _resultSetMapping. + */ + private java.lang.String _resultSetMapping; + + /** + * Field _query. + */ + private java.lang.String _query; + + /** + * Field _queryHintList. + */ + private java.util.List _queryHintList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamedNativeQuery() { + super(); + this._queryHintList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vQueryHint + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addQueryHint( + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) + throws java.lang.IndexOutOfBoundsException { + this._queryHintList.add(vQueryHint); + } + + /** + * + * + * @param index + * @param vQueryHint + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addQueryHint( + final int index, + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) + throws java.lang.IndexOutOfBoundsException { + this._queryHintList.add(index, vQueryHint); + } + + /** + * Method enumerateQueryHint. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateQueryHint( + ) { + return java.util.Collections.enumeration(this._queryHintList); + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'query'. + * + * @return the value of field 'Query'. + */ + public java.lang.String getQuery( + ) { + return this._query; + } + + /** + * Method getQueryHint. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.QueryHint at the given index + */ + public org.exolab.castor.mapping.xml.QueryHint getQueryHint( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._queryHintList.size()) { + throw new IndexOutOfBoundsException("getQueryHint: Index value '" + index + "' not in range [0.." + (this._queryHintList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.QueryHint) _queryHintList.get(index); + } + + /** + * Method getQueryHint.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.QueryHint[] getQueryHint( + ) { + org.exolab.castor.mapping.xml.QueryHint[] array = new org.exolab.castor.mapping.xml.QueryHint[0]; + return (org.exolab.castor.mapping.xml.QueryHint[]) this._queryHintList.toArray(array); + } + + /** + * Method getQueryHintCount. + * + * @return the size of this collection + */ + public int getQueryHintCount( + ) { + return this._queryHintList.size(); + } + + /** + * Returns the value of field 'resultClass'. + * + * @return the value of field 'ResultClass'. + */ + public java.lang.String getResultClass( + ) { + return this._resultClass; + } + + /** + * Returns the value of field 'resultSetMapping'. + * + * @return the value of field 'ResultSetMapping'. + */ + public java.lang.String getResultSetMapping( + ) { + return this._resultSetMapping; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateQueryHint. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateQueryHint( + ) { + return this._queryHintList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllQueryHint( + ) { + this._queryHintList.clear(); + } + + /** + * Method removeQueryHint. + * + * @param vQueryHint + * @return true if the object was removed from the collection. + */ + public boolean removeQueryHint( + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) { + boolean removed = _queryHintList.remove(vQueryHint); + return removed; + } + + /** + * Method removeQueryHintAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.QueryHint removeQueryHintAt( + final int index) { + java.lang.Object obj = this._queryHintList.remove(index); + return (org.exolab.castor.mapping.xml.QueryHint) obj; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'query'. + * + * @param query the value of field 'query'. + */ + public void setQuery( + final java.lang.String query) { + this._query = query; + } + + /** + * + * + * @param index + * @param vQueryHint + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setQueryHint( + final int index, + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._queryHintList.size()) { + throw new IndexOutOfBoundsException("setQueryHint: Index value '" + index + "' not in range [0.." + (this._queryHintList.size() - 1) + "]"); + } + + this._queryHintList.set(index, vQueryHint); + } + + /** + * + * + * @param vQueryHintArray + */ + public void setQueryHint( + final org.exolab.castor.mapping.xml.QueryHint[] vQueryHintArray) { + //-- copy array + _queryHintList.clear(); + + for (int i = 0; i < vQueryHintArray.length; i++) { + this._queryHintList.add(vQueryHintArray[i]); + } + } + + /** + * Sets the value of field 'resultClass'. + * + * @param resultClass the value of field 'resultClass'. + */ + public void setResultClass( + final java.lang.String resultClass) { + this._resultClass = resultClass; + } + + /** + * Sets the value of field 'resultSetMapping'. + * + * @param resultSetMapping the value of field 'resultSetMapping' + */ + public void setResultSetMapping( + final java.lang.String resultSetMapping) { + this._resultSetMapping = resultSetMapping; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.NamedNativeQuery + */ + public static org.exolab.castor.mapping.xml.NamedNativeQuery unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.NamedNativeQuery) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.NamedNativeQuery.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/FieldMapping.java @@ -0,0 +1,930 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * The 'field' element is used to describe the property of a Java + * object. + * + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class FieldMapping implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * A required attribute used to identify the name of the + * property. + * + */ + private java.lang.String _name; + + /** + * An optional attribute used to identify the type of the + * property. + * + */ + private java.lang.String _type; + + /** + * Field _required. + */ + private boolean _required = false; + + /** + * keeps track of state for field: _required + */ + private boolean _has_required; + + /** + * Field _transient. + */ + private boolean _transient = false; + + /** + * keeps track of state for field: _transient + */ + private boolean _has_transient; + + /** + * Field _nillable. + */ + private boolean _nillable = false; + + /** + * keeps track of state for field: _nillable + */ + private boolean _has_nillable; + + /** + * Field _direct. + */ + private boolean _direct = false; + + /** + * keeps track of state for field: _direct + */ + private boolean _has_direct; + + /** + * Field _lazy. + */ + private boolean _lazy = false; + + /** + * keeps track of state for field: _lazy + */ + private boolean _has_lazy; + + /** + * Indicates whether the field should be treated as a + * container, + * i.e. only it's fields should be persisted, but not the + * containing + * class itself. In this case, the container attribute should + * be set to true (supported in Castor XML only). + * + */ + private boolean _container; + + /** + * keeps track of state for field: _container + */ + private boolean _has_container; + + /** + * Field _getMethod. + */ + private java.lang.String _getMethod; + + /** + * Field _hasMethod. + */ + private java.lang.String _hasMethod; + + /** + * Field _setMethod. + */ + private java.lang.String _setMethod; + + /** + * Field _createMethod. + */ + private java.lang.String _createMethod; + + /** + * Field _handler. + */ + private java.lang.String _handler; + + /** + * An optional attribute used to specify the type of the + * collection, if + * the property is multi-valued. + * + */ + private org.exolab.castor.mapping.xml.types.FieldMappingCollectionType _collection; + + /** + * Field _comparator. + */ + private java.lang.String _comparator; + + /** + * Field _identity. + */ + private boolean _identity = false; + + /** + * keeps track of state for field: _identity + */ + private boolean _has_identity; + + /** + * Field _description. + */ + private java.lang.String _description; + + /** + * The 'sql' element is used to store information about the + * database + * column to which a Java object is mapped to. + * + */ + private org.exolab.castor.mapping.xml.Sql _sql; + + /** + * The 'bind-xml' element is used for specifying XML specific + * databinding + * properties and behavior for a specific field. 'bind-xml' + * may only appear + * as a child of a 'field' element. + * + */ + private org.exolab.castor.mapping.xml.BindXml _bindXml; + + /** + * Field _ldap. + */ + private org.exolab.castor.mapping.xml.Ldap _ldap; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldMapping() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteContainer( + ) { + this._has_container= false; + } + + /** + */ + public void deleteDirect( + ) { + this._has_direct= false; + } + + /** + */ + public void deleteIdentity( + ) { + this._has_identity= false; + } + + /** + */ + public void deleteLazy( + ) { + this._has_lazy= false; + } + + /** + */ + public void deleteNillable( + ) { + this._has_nillable= false; + } + + /** + */ + public void deleteRequired( + ) { + this._has_required= false; + } + + /** + */ + public void deleteTransient( + ) { + this._has_transient= false; + } + + /** + * Returns the value of field 'bindXml'. The field 'bindXml' + * has the following description: The 'bind-xml' element is + * used for specifying XML specific databinding + * properties and behavior for a specific field. 'bind-xml' + * may only appear + * as a child of a 'field' element. + * + * + * @return the value of field 'BindXml'. + */ + public org.exolab.castor.mapping.xml.BindXml getBindXml( + ) { + return this._bindXml; + } + + /** + * Returns the value of field 'collection'. The field + * 'collection' has the following description: An optional + * attribute used to specify the type of the collection, if + * the property is multi-valued. + * + * + * @return the value of field 'Collection'. + */ + public org.exolab.castor.mapping.xml.types.FieldMappingCollectionType getCollection( + ) { + return this._collection; + } + + /** + * Returns the value of field 'comparator'. + * + * @return the value of field 'Comparator'. + */ + public java.lang.String getComparator( + ) { + return this._comparator; + } + + /** + * Returns the value of field 'container'. The field + * 'container' has the following description: Indicates whether + * the field should be treated as a container, + * i.e. only it's fields should be persisted, but not the + * containing + * class itself. In this case, the container attribute should + * be set to true (supported in Castor XML only). + * + * + * @return the value of field 'Container'. + */ + public boolean getContainer( + ) { + return this._container; + } + + /** + * Returns the value of field 'createMethod'. + * + * @return the value of field 'CreateMethod'. + */ + public java.lang.String getCreateMethod( + ) { + return this._createMethod; + } + + /** + * Returns the value of field 'description'. + * + * @return the value of field 'Description'. + */ + public java.lang.String getDescription( + ) { + return this._description; + } + + /** + * Returns the value of field 'direct'. + * + * @return the value of field 'Direct'. + */ + public boolean getDirect( + ) { + return this._direct; + } + + /** + * Returns the value of field 'getMethod'. + * + * @return the value of field 'GetMethod'. + */ + public java.lang.String getGetMethod( + ) { + return this._getMethod; + } + + /** + * Returns the value of field 'handler'. + * + * @return the value of field 'Handler'. + */ + public java.lang.String getHandler( + ) { + return this._handler; + } + + /** + * Returns the value of field 'hasMethod'. + * + * @return the value of field 'HasMethod'. + */ + public java.lang.String getHasMethod( + ) { + return this._hasMethod; + } + + /** + * Returns the value of field 'identity'. + * + * @return the value of field 'Identity'. + */ + public boolean getIdentity( + ) { + return this._identity; + } + + /** + * Returns the value of field 'lazy'. + * + * @return the value of field 'Lazy'. + */ + public boolean getLazy( + ) { + return this._lazy; + } + + /** + * Returns the value of field 'ldap'. + * + * @return the value of field 'Ldap'. + */ + public org.exolab.castor.mapping.xml.Ldap getLdap( + ) { + return this._ldap; + } + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: A required attribute used to identify + * the name of the property. + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'nillable'. + * + * @return the value of field 'Nillable'. + */ + public boolean getNillable( + ) { + return this._nillable; + } + + /** + * Returns the value of field 'required'. + * + * @return the value of field 'Required'. + */ + public boolean getRequired( + ) { + return this._required; + } + + /** + * Returns the value of field 'setMethod'. + * + * @return the value of field 'SetMethod'. + */ + public java.lang.String getSetMethod( + ) { + return this._setMethod; + } + + /** + * Returns the value of field 'sql'. The field 'sql' has the + * following description: The 'sql' element is used to store + * information about the database + * column to which a Java object is mapped to. + * + * + * @return the value of field 'Sql'. + */ + public org.exolab.castor.mapping.xml.Sql getSql( + ) { + return this._sql; + } + + /** + * Returns the value of field 'transient'. + * + * @return the value of field 'Transient'. + */ + public boolean getTransient( + ) { + return this._transient; + } + + /** + * Returns the value of field 'type'. The field 'type' has the + * following description: An optional attribute used to + * identify the type of the property. + * + * + * @return the value of field 'Type'. + */ + public java.lang.String getType( + ) { + return this._type; + } + + /** + * Method hasContainer. + * + * @return true if at least one Container has been added + */ + public boolean hasContainer( + ) { + return this._has_container; + } + + /** + * Method hasDirect. + * + * @return true if at least one Direct has been added + */ + public boolean hasDirect( + ) { + return this._has_direct; + } + + /** + * Method hasIdentity. + * + * @return true if at least one Identity has been added + */ + public boolean hasIdentity( + ) { + return this._has_identity; + } + + /** + * Method hasLazy. + * + * @return true if at least one Lazy has been added + */ + public boolean hasLazy( + ) { + return this._has_lazy; + } + + /** + * Method hasNillable. + * + * @return true if at least one Nillable has been added + */ + public boolean hasNillable( + ) { + return this._has_nillable; + } + + /** + * Method hasRequired. + * + * @return true if at least one Required has been added + */ + public boolean hasRequired( + ) { + return this._has_required; + } + + /** + * Method hasTransient. + * + * @return true if at least one Transient has been added + */ + public boolean hasTransient( + ) { + return this._has_transient; + } + + /** + * Returns the value of field 'container'. The field + * 'container' has the following description: Indicates whether + * the field should be treated as a container, + * i.e. only it's fields should be persisted, but not the + * containing + * class itself. In this case, the container attribute should + * be set to true (supported in Castor XML only). + * + * + * @return the value of field 'Container'. + */ + public boolean isContainer( + ) { + return this._container; + } + + /** + * Returns the value of field 'direct'. + * + * @return the value of field 'Direct'. + */ + public boolean isDirect( + ) { + return this._direct; + } + + /** + * Returns the value of field 'identity'. + * + * @return the value of field 'Identity'. + */ + public boolean isIdentity( + ) { + return this._identity; + } + + /** + * Returns the value of field 'lazy'. + * + * @return the value of field 'Lazy'. + */ + public boolean isLazy( + ) { + return this._lazy; + } + + /** + * Returns the value of field 'nillable'. + * + * @return the value of field 'Nillable'. + */ + public boolean isNillable( + ) { + return this._nillable; + } + + /** + * Returns the value of field 'required'. + * + * @return the value of field 'Required'. + */ + public boolean isRequired( + ) { + return this._required; + } + + /** + * Returns the value of field 'transient'. + * + * @return the value of field 'Transient'. + */ + public boolean isTransient( + ) { + return this._transient; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'bindXml'. The field 'bindXml' has + * the following description: The 'bind-xml' element is used + * for specifying XML specific databinding + * properties and behavior for a specific field. 'bind-xml' + * may only appear + * as a child of a 'field' element. + * + * + * @param bindXml the value of field 'bindXml'. + */ + public void setBindXml( + final org.exolab.castor.mapping.xml.BindXml bindXml) { + this._bindXml = bindXml; + } + + /** + * Sets the value of field 'collection'. The field 'collection' + * has the following description: An optional attribute used to + * specify the type of the collection, if + * the property is multi-valued. + * + * + * @param collection the value of field 'collection'. + */ + public void setCollection( + final org.exolab.castor.mapping.xml.types.FieldMappingCollectionType collection) { + this._collection = collection; + } + + /** + * Sets the value of field 'comparator'. + * + * @param comparator the value of field 'comparator'. + */ + public void setComparator( + final java.lang.String comparator) { + this._comparator = comparator; + } + + /** + * Sets the value of field 'container'. The field 'container' + * has the following description: Indicates whether the field + * should be treated as a container, + * i.e. only it's fields should be persisted, but not the + * containing + * class itself. In this case, the container attribute should + * be set to true (supported in Castor XML only). + * + * + * @param container the value of field 'container'. + */ + public void setContainer( + final boolean container) { + this._container = container; + this._has_container = true; + } + + /** + * Sets the value of field 'createMethod'. + * + * @param createMethod the value of field 'createMethod'. + */ + public void setCreateMethod( + final java.lang.String createMethod) { + this._createMethod = createMethod; + } + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription( + final java.lang.String description) { + this._description = description; + } + + /** + * Sets the value of field 'direct'. + * + * @param direct the value of field 'direct'. + */ + public void setDirect( + final boolean direct) { + this._direct = direct; + this._has_direct = true; + } + + /** + * Sets the value of field 'getMethod'. + * + * @param getMethod the value of field 'getMethod'. + */ + public void setGetMethod( + final java.lang.String getMethod) { + this._getMethod = getMethod; + } + + /** + * Sets the value of field 'handler'. + * + * @param handler the value of field 'handler'. + */ + public void setHandler( + final java.lang.String handler) { + this._handler = handler; + } + + /** + * Sets the value of field 'hasMethod'. + * + * @param hasMethod the value of field 'hasMethod'. + */ + public void setHasMethod( + final java.lang.String hasMethod) { + this._hasMethod = hasMethod; + } + + /** + * Sets the value of field 'identity'. + * + * @param identity the value of field 'identity'. + */ + public void setIdentity( + final boolean identity) { + this._identity = identity; + this._has_identity = true; + } + + /** + * Sets the value of field 'lazy'. + * + * @param lazy the value of field 'lazy'. + */ + public void setLazy( + final boolean lazy) { + this._lazy = lazy; + this._has_lazy = true; + } + + /** + * Sets the value of field 'ldap'. + * + * @param ldap the value of field 'ldap'. + */ + public void setLdap( + final org.exolab.castor.mapping.xml.Ldap ldap) { + this._ldap = ldap; + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: A required attribute used to identify + * the name of the property. + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'nillable'. + * + * @param nillable the value of field 'nillable'. + */ + public void setNillable( + final boolean nillable) { + this._nillable = nillable; + this._has_nillable = true; + } + + /** + * Sets the value of field 'required'. + * + * @param required the value of field 'required'. + */ + public void setRequired( + final boolean required) { + this._required = required; + this._has_required = true; + } + + /** + * Sets the value of field 'setMethod'. + * + * @param setMethod the value of field 'setMethod'. + */ + public void setSetMethod( + final java.lang.String setMethod) { + this._setMethod = setMethod; + } + + /** + * Sets the value of field 'sql'. The field 'sql' has the + * following description: The 'sql' element is used to store + * information about the database + * column to which a Java object is mapped to. + * + * + * @param sql the value of field 'sql'. + */ + public void setSql( + final org.exolab.castor.mapping.xml.Sql sql) { + this._sql = sql; + } + + /** + * Sets the value of field 'transient'. + * + * @param _transient + * @param transient the value of field 'transient'. + */ + public void setTransient( + final boolean _transient) { + this._transient = _transient; + this._has_transient = true; + } + + /** + * Sets the value of field 'type'. The field 'type' has the + * following description: An optional attribute used to + * identify the type of the property. + * + * + * @param type the value of field 'type'. + */ + public void setType( + final java.lang.String type) { + this._type = type; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.FieldMapping + */ + public static org.exolab.castor.mapping.xml.FieldMapping unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.FieldMapping) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.FieldMapping.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/Property.java @@ -0,0 +1,110 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class Property. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Property extends PropertyType +implements java.io.Serializable +{ + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Property() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.exolab.castor.mapping.xml.Propert + */ + public static org.exolab.castor.mapping.xml.Property unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.Property) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.Property.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/QueryHint.java @@ -0,0 +1,164 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class QueryHint. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class QueryHint implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _value. + */ + private java.lang.String _value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public QueryHint() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'value'. + * + * @return the value of field 'Value'. + */ + public java.lang.String getValue( + ) { + return this._value; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue( + final java.lang.String value) { + this._value = value; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.QueryHint + */ + public static org.exolab.castor.mapping.xml.QueryHint unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.QueryHint) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.QueryHint.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/Param.java @@ -0,0 +1,163 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class Param. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Param implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _value. + */ + private java.lang.String _value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Param() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'value'. + * + * @return the value of field 'Value'. + */ + public java.lang.String getValue( + ) { + return this._value; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue( + final java.lang.String value) { + this._value = value; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.exolab.castor.mapping.xml.Param + */ + public static org.exolab.castor.mapping.xml.Param unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.Param) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.Param.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/ClassMapping.java @@ -0,0 +1,1073 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * The 'class' element is used to store information about mapping + * of a class. + * + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class ClassMapping implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Specifies the fully qualified package name of the Java + * object needed to be mapped. + * + */ + private java.lang.String _name; + + /** + * An optional attribute to specify the extension relationship + * between objects. Used only if mapping of the another object + * + * is provided. + * + */ + private java.lang.Object _extends; + + /** + * An optional attribute to specify that one object depends on + * another object. + * + */ + private java.lang.Object _depends; + + /** + * An optional attribute for specifying the unique + * identificator + * of the object within the persistence storage. + * + */ + private java.util.List _identity; + + /** + * Field _access. + */ + private org.exolab.castor.mapping.xml.types.ClassMappingAccessType _access = org.exolab.castor.mapping.xml.types.ClassMappingAccessType.fromValue("shared"); + + /** + * Field _keyGenerator. + */ + private java.lang.String _keyGenerator; + + /** + * Specifies whether Castor should use reflection to establish + * XML data + * binding information at startup time for those fields that + * are not + * mapped explicitly. + * + */ + private boolean _autoComplete = false; + + /** + * keeps track of state for field: _autoComplete + */ + private boolean _has_autoComplete; + + /** + * Field _verifyConstructable. + */ + private boolean _verifyConstructable = true; + + /** + * keeps track of state for field: _verifyConstructable + */ + private boolean _has_verifyConstructable; + + /** + * If set to the name of a mapped field, this field will be + * used for check + * on object modifications during transactions (Castor JDO + * only). + * + */ + private java.lang.String _version; + + /** + * Field _description. + */ + private java.lang.String _description; + + /** + * Field _cacheTypeMapping. + */ + private org.exolab.castor.mapping.xml.CacheTypeMapping _cacheTypeMapping; + + /** + * The 'map-to' element is used for specifying the name of the + * item + * that should be associated with the given Java object. + * + */ + private org.exolab.castor.mapping.xml.MapTo _mapTo; + + /** + * Field _namedQueryList. + */ + private java.util.List _namedQueryList; + + /** + * Field _namedNativeQueryList. + */ + private java.util.List _namedNativeQueryList; + + /** + * Field _classChoice. + */ + private org.exolab.castor.mapping.xml.ClassChoice _classChoice; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassMapping() { + super(); + this._identity = new java.util.ArrayList(); + setAccess(org.exolab.castor.mapping.xml.types.ClassMappingAccessType.fromValue("shared")); + this._namedQueryList = new java.util.ArrayList(); + this._namedNativeQueryList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vIdentity + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addIdentity( + final java.lang.String vIdentity) + throws java.lang.IndexOutOfBoundsException { + this._identity.add(vIdentity); + } + + /** + * + * + * @param index + * @param vIdentity + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addIdentity( + final int index, + final java.lang.String vIdentity) + throws java.lang.IndexOutOfBoundsException { + this._identity.add(index, vIdentity); + } + + /** + * + * + * @param vNamedNativeQuery + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addNamedNativeQuery( + final org.exolab.castor.mapping.xml.NamedNativeQuery vNamedNativeQuery) + throws java.lang.IndexOutOfBoundsException { + this._namedNativeQueryList.add(vNamedNativeQuery); + } + + /** + * + * + * @param index + * @param vNamedNativeQuery + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addNamedNativeQuery( + final int index, + final org.exolab.castor.mapping.xml.NamedNativeQuery vNamedNativeQuery) + throws java.lang.IndexOutOfBoundsException { + this._namedNativeQueryList.add(index, vNamedNativeQuery); + } + + /** + * + * + * @param vNamedQuery + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addNamedQuery( + final org.exolab.castor.mapping.xml.NamedQuery vNamedQuery) + throws java.lang.IndexOutOfBoundsException { + this._namedQueryList.add(vNamedQuery); + } + + /** + * + * + * @param index + * @param vNamedQuery + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addNamedQuery( + final int index, + final org.exolab.castor.mapping.xml.NamedQuery vNamedQuery) + throws java.lang.IndexOutOfBoundsException { + this._namedQueryList.add(index, vNamedQuery); + } + + /** + */ + public void deleteAutoComplete( + ) { + this._has_autoComplete= false; + } + + /** + */ + public void deleteVerifyConstructable( + ) { + this._has_verifyConstructable= false; + } + + /** + * Method enumerateIdentity. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateIdentity( + ) { + return java.util.Collections.enumeration(this._identity); + } + + /** + * Method enumerateNamedNativeQuery. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateNamedNativeQuery( + ) { + return java.util.Collections.enumeration(this._namedNativeQueryList); + } + + /** + * Method enumerateNamedQuery. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateNamedQuery( + ) { + return java.util.Collections.enumeration(this._namedQueryList); + } + + /** + * Returns the value of field 'access'. + * + * @return the value of field 'Access'. + */ + public org.exolab.castor.mapping.xml.types.ClassMappingAccessType getAccess( + ) { + return this._access; + } + + /** + * Returns the value of field 'autoComplete'. The field + * 'autoComplete' has the following description: Specifies + * whether Castor should use reflection to establish XML data + * binding information at startup time for those fields that + * are not + * mapped explicitly. + * + * + * @return the value of field 'AutoComplete'. + */ + public boolean getAutoComplete( + ) { + return this._autoComplete; + } + + /** + * Returns the value of field 'cacheTypeMapping'. + * + * @return the value of field 'CacheTypeMapping'. + */ + public org.exolab.castor.mapping.xml.CacheTypeMapping getCacheTypeMapping( + ) { + return this._cacheTypeMapping; + } + + /** + * Returns the value of field 'classChoice'. + * + * @return the value of field 'ClassChoice'. + */ + public org.exolab.castor.mapping.xml.ClassChoice getClassChoice( + ) { + return this._classChoice; + } + + /** + * Returns the value of field 'depends'. The field 'depends' + * has the following description: An optional attribute to + * specify that one object depends on + * another object. + * + * + * @return the value of field 'Depends'. + */ + public java.lang.Object getDepends( + ) { + return this._depends; + } + + /** + * Returns the value of field 'description'. + * + * @return the value of field 'Description'. + */ + public java.lang.String getDescription( + ) { + return this._description; + } + + /** + * Returns the value of field 'extends'. The field 'extends' + * has the following description: An optional attribute to + * specify the extension relationship + * between objects. Used only if mapping of the another object + * + * is provided. + * + * + * @return the value of field 'Extends'. + */ + public java.lang.Object getExtends( + ) { + return this._extends; + } + + /** + * Method getIdentity. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the java.lang.String at the given index + */ + public java.lang.String getIdentity( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._identity.size()) { + throw new IndexOutOfBoundsException("getIdentity: Index value '" + index + "' not in range [0.." + (this._identity.size() - 1) + "]"); + } + + return (java.lang.String) _identity.get(index); + } + + /** + * Method getIdentity.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public java.lang.String[] getIdentity( + ) { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._identity.toArray(array); + } + + /** + * Method getIdentityCount. + * + * @return the size of this collection + */ + public int getIdentityCount( + ) { + return this._identity.size(); + } + + /** + * Returns the value of field 'keyGenerator'. + * + * @return the value of field 'KeyGenerator'. + */ + public java.lang.String getKeyGenerator( + ) { + return this._keyGenerator; + } + + /** + * Returns the value of field 'mapTo'. The field 'mapTo' has + * the following description: The 'map-to' element is used for + * specifying the name of the item + * that should be associated with the given Java object. + * + * + * @return the value of field 'MapTo'. + */ + public org.exolab.castor.mapping.xml.MapTo getMapTo( + ) { + return this._mapTo; + } + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: Specifies the fully qualified package + * name of the Java object needed to be mapped. + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method getNamedNativeQuery. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.NamedNativeQuery at the given + * index + */ + public org.exolab.castor.mapping.xml.NamedNativeQuery getNamedNativeQuery( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._namedNativeQueryList.size()) { + throw new IndexOutOfBoundsException("getNamedNativeQuery: Index value '" + index + "' not in range [0.." + (this._namedNativeQueryList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.NamedNativeQuery) _namedNativeQueryList.get(index); + } + + /** + * Method getNamedNativeQuery.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.NamedNativeQuery[] getNamedNativeQuery( + ) { + org.exolab.castor.mapping.xml.NamedNativeQuery[] array = new org.exolab.castor.mapping.xml.NamedNativeQuery[0]; + return (org.exolab.castor.mapping.xml.NamedNativeQuery[]) this._namedNativeQueryList.toArray(array); + } + + /** + * Method getNamedNativeQueryCount. + * + * @return the size of this collection + */ + public int getNamedNativeQueryCount( + ) { + return this._namedNativeQueryList.size(); + } + + /** + * Method getNamedQuery. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.NamedQuery at the given index + */ + public org.exolab.castor.mapping.xml.NamedQuery getNamedQuery( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._namedQueryList.size()) { + throw new IndexOutOfBoundsException("getNamedQuery: Index value '" + index + "' not in range [0.." + (this._namedQueryList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.NamedQuery) _namedQueryList.get(index); + } + + /** + * Method getNamedQuery.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.NamedQuery[] getNamedQuery( + ) { + org.exolab.castor.mapping.xml.NamedQuery[] array = new org.exolab.castor.mapping.xml.NamedQuery[0]; + return (org.exolab.castor.mapping.xml.NamedQuery[]) this._namedQueryList.toArray(array); + } + + /** + * Method getNamedQueryCount. + * + * @return the size of this collection + */ + public int getNamedQueryCount( + ) { + return this._namedQueryList.size(); + } + + /** + * Returns the value of field 'verifyConstructable'. + * + * @return the value of field 'VerifyConstructable'. + */ + public boolean getVerifyConstructable( + ) { + return this._verifyConstructable; + } + + /** + * Returns the value of field 'version'. The field 'version' + * has the following description: If set to the name of a + * mapped field, this field will be used for check + * on object modifications during transactions (Castor JDO + * only). + * + * + * @return the value of field 'Version'. + */ + public java.lang.String getVersion( + ) { + return this._version; + } + + /** + * Method hasAutoComplete. + * + * @return true if at least one AutoComplete has been added + */ + public boolean hasAutoComplete( + ) { + return this._has_autoComplete; + } + + /** + * Method hasVerifyConstructable. + * + * @return true if at least one VerifyConstructable has been + * added + */ + public boolean hasVerifyConstructable( + ) { + return this._has_verifyConstructable; + } + + /** + * Returns the value of field 'autoComplete'. The field + * 'autoComplete' has the following description: Specifies + * whether Castor should use reflection to establish XML data + * binding information at startup time for those fields that + * are not + * mapped explicitly. + * + * + * @return the value of field 'AutoComplete'. + */ + public boolean isAutoComplete( + ) { + return this._autoComplete; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Returns the value of field 'verifyConstructable'. + * + * @return the value of field 'VerifyConstructable'. + */ + public boolean isVerifyConstructable( + ) { + return this._verifyConstructable; + } + + /** + * Method iterateIdentity. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateIdentity( + ) { + return this._identity.iterator(); + } + + /** + * Method iterateNamedNativeQuery. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateNamedNativeQuery( + ) { + return this._namedNativeQueryList.iterator(); + } + + /** + * Method iterateNamedQuery. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateNamedQuery( + ) { + return this._namedQueryList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllIdentity( + ) { + this._identity.clear(); + } + + /** + */ + public void removeAllNamedNativeQuery( + ) { + this._namedNativeQueryList.clear(); + } + + /** + */ + public void removeAllNamedQuery( + ) { + this._namedQueryList.clear(); + } + + /** + * Method removeIdentity. + * + * @param vIdentity + * @return true if the object was removed from the collection. + */ + public boolean removeIdentity( + final java.lang.String vIdentity) { + boolean removed = _identity.remove(vIdentity); + return removed; + } + + /** + * Method removeIdentityAt. + * + * @param index + * @return the element removed from the collection + */ + public java.lang.String removeIdentityAt( + final int index) { + java.lang.Object obj = this._identity.remove(index); + return (java.lang.String) obj; + } + + /** + * Method removeNamedNativeQuery. + * + * @param vNamedNativeQuery + * @return true if the object was removed from the collection. + */ + public boolean removeNamedNativeQuery( + final org.exolab.castor.mapping.xml.NamedNativeQuery vNamedNativeQuery) { + boolean removed = _namedNativeQueryList.remove(vNamedNativeQuery); + return removed; + } + + /** + * Method removeNamedNativeQueryAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.NamedNativeQuery removeNamedNativeQueryAt( + final int index) { + java.lang.Object obj = this._namedNativeQueryList.remove(index); + return (org.exolab.castor.mapping.xml.NamedNativeQuery) obj; + } + + /** + * Method removeNamedQuery. + * + * @param vNamedQuery + * @return true if the object was removed from the collection. + */ + public boolean removeNamedQuery( + final org.exolab.castor.mapping.xml.NamedQuery vNamedQuery) { + boolean removed = _namedQueryList.remove(vNamedQuery); + return removed; + } + + /** + * Method removeNamedQueryAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.NamedQuery removeNamedQueryAt( + final int index) { + java.lang.Object obj = this._namedQueryList.remove(index); + return (org.exolab.castor.mapping.xml.NamedQuery) obj; + } + + /** + * Sets the value of field 'access'. + * + * @param access the value of field 'access'. + */ + public void setAccess( + final org.exolab.castor.mapping.xml.types.ClassMappingAccessType access) { + this._access = access; + } + + /** + * Sets the value of field 'autoComplete'. The field + * 'autoComplete' has the following description: Specifies + * whether Castor should use reflection to establish XML data + * binding information at startup time for those fields that + * are not + * mapped explicitly. + * + * + * @param autoComplete the value of field 'autoComplete'. + */ + public void setAutoComplete( + final boolean autoComplete) { + this._autoComplete = autoComplete; + this._has_autoComplete = true; + } + + /** + * Sets the value of field 'cacheTypeMapping'. + * + * @param cacheTypeMapping the value of field 'cacheTypeMapping' + */ + public void setCacheTypeMapping( + final org.exolab.castor.mapping.xml.CacheTypeMapping cacheTypeMapping) { + this._cacheTypeMapping = cacheTypeMapping; + } + + /** + * Sets the value of field 'classChoice'. + * + * @param classChoice the value of field 'classChoice'. + */ + public void setClassChoice( + final org.exolab.castor.mapping.xml.ClassChoice classChoice) { + this._classChoice = classChoice; + } + + /** + * Sets the value of field 'depends'. The field 'depends' has + * the following description: An optional attribute to specify + * that one object depends on + * another object. + * + * + * @param depends the value of field 'depends'. + */ + public void setDepends( + final java.lang.Object depends) { + this._depends = depends; + } + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription( + final java.lang.String description) { + this._description = description; + } + + /** + * Sets the value of field 'extends'. The field 'extends' has + * the following description: An optional attribute to specify + * the extension relationship + * between objects. Used only if mapping of the another object + * + * is provided. + * + * + * @param _extends + * @param extends the value of field 'extends'. + */ + public void setExtends( + final java.lang.Object _extends) { + this._extends = _extends; + } + + /** + * + * + * @param index + * @param vIdentity + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setIdentity( + final int index, + final java.lang.String vIdentity) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._identity.size()) { + throw new IndexOutOfBoundsException("setIdentity: Index value '" + index + "' not in range [0.." + (this._identity.size() - 1) + "]"); + } + + this._identity.set(index, vIdentity); + } + + /** + * + * + * @param vIdentityArray + */ + public void setIdentity( + final java.lang.String[] vIdentityArray) { + //-- copy array + _identity.clear(); + + for (int i = 0; i < vIdentityArray.length; i++) { + this._identity.add(vIdentityArray[i]); + } + } + + /** + * Sets the value of field 'keyGenerator'. + * + * @param keyGenerator the value of field 'keyGenerator'. + */ + public void setKeyGenerator( + final java.lang.String keyGenerator) { + this._keyGenerator = keyGenerator; + } + + /** + * Sets the value of field 'mapTo'. The field 'mapTo' has the + * following description: The 'map-to' element is used for + * specifying the name of the item + * that should be associated with the given Java object. + * + * + * @param mapTo the value of field 'mapTo'. + */ + public void setMapTo( + final org.exolab.castor.mapping.xml.MapTo mapTo) { + this._mapTo = mapTo; + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: Specifies the fully qualified package + * name of the Java object needed to be mapped. + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * + * + * @param index + * @param vNamedNativeQuery + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setNamedNativeQuery( + final int index, + final org.exolab.castor.mapping.xml.NamedNativeQuery vNamedNativeQuery) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._namedNativeQueryList.size()) { + throw new IndexOutOfBoundsException("setNamedNativeQuery: Index value '" + index + "' not in range [0.." + (this._namedNativeQueryList.size() - 1) + "]"); + } + + this._namedNativeQueryList.set(index, vNamedNativeQuery); + } + + /** + * + * + * @param vNamedNativeQueryArray + */ + public void setNamedNativeQuery( + final org.exolab.castor.mapping.xml.NamedNativeQuery[] vNamedNativeQueryArray) { + //-- copy array + _namedNativeQueryList.clear(); + + for (int i = 0; i < vNamedNativeQueryArray.length; i++) { + this._namedNativeQueryList.add(vNamedNativeQueryArray[i]); + } + } + + /** + * + * + * @param index + * @param vNamedQuery + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setNamedQuery( + final int index, + final org.exolab.castor.mapping.xml.NamedQuery vNamedQuery) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._namedQueryList.size()) { + throw new IndexOutOfBoundsException("setNamedQuery: Index value '" + index + "' not in range [0.." + (this._namedQueryList.size() - 1) + "]"); + } + + this._namedQueryList.set(index, vNamedQuery); + } + + /** + * + * + * @param vNamedQueryArray + */ + public void setNamedQuery( + final org.exolab.castor.mapping.xml.NamedQuery[] vNamedQueryArray) { + //-- copy array + _namedQueryList.clear(); + + for (int i = 0; i < vNamedQueryArray.length; i++) { + this._namedQueryList.add(vNamedQueryArray[i]); + } + } + + /** + * Sets the value of field 'verifyConstructable'. + * + * @param verifyConstructable the value of field + * 'verifyConstructable'. + */ + public void setVerifyConstructable( + final boolean verifyConstructable) { + this._verifyConstructable = verifyConstructable; + this._has_verifyConstructable = true; + } + + /** + * Sets the value of field 'version'. The field 'version' has + * the following description: If set to the name of a mapped + * field, this field will be used for check + * on object modifications during transactions (Castor JDO + * only). + * + * + * @param version the value of field 'version'. + */ + public void setVersion( + final java.lang.String version) { + this._version = version; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.ClassMapping + */ + public static org.exolab.castor.mapping.xml.ClassMapping unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.ClassMapping) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.ClassMapping.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/ClassChoice.java @@ -0,0 +1,451 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class ClassChoice. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class ClassChoice implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The 'field' element is used to describe the property of a + * Java object. + * + */ + private java.util.List _fieldMappingList; + + /** + * Field _containerList. + */ + private java.util.List _containerList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassChoice() { + super(); + this._fieldMappingList = new java.util.ArrayList(); + this._containerList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vContainer + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addContainer( + final org.exolab.castor.mapping.xml.Container vContainer) + throws java.lang.IndexOutOfBoundsException { + this._containerList.add(vContainer); + } + + /** + * + * + * @param index + * @param vContainer + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addContainer( + final int index, + final org.exolab.castor.mapping.xml.Container vContainer) + throws java.lang.IndexOutOfBoundsException { + this._containerList.add(index, vContainer); + } + + /** + * + * + * @param vFieldMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addFieldMapping( + final org.exolab.castor.mapping.xml.FieldMapping vFieldMapping) + throws java.lang.IndexOutOfBoundsException { + this._fieldMappingList.add(vFieldMapping); + } + + /** + * + * + * @param index + * @param vFieldMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addFieldMapping( + final int index, + final org.exolab.castor.mapping.xml.FieldMapping vFieldMapping) + throws java.lang.IndexOutOfBoundsException { + this._fieldMappingList.add(index, vFieldMapping); + } + + /** + * Method enumerateContainer. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateContainer( + ) { + return java.util.Collections.enumeration(this._containerList); + } + + /** + * Method enumerateFieldMapping. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateFieldMapping( + ) { + return java.util.Collections.enumeration(this._fieldMappingList); + } + + /** + * Method getContainer. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.Container at the given index + */ + public org.exolab.castor.mapping.xml.Container getContainer( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._containerList.size()) { + throw new IndexOutOfBoundsException("getContainer: Index value '" + index + "' not in range [0.." + (this._containerList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.Container) _containerList.get(index); + } + + /** + * Method getContainer.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.Container[] getContainer( + ) { + org.exolab.castor.mapping.xml.Container[] array = new org.exolab.castor.mapping.xml.Container[0]; + return (org.exolab.castor.mapping.xml.Container[]) this._containerList.toArray(array); + } + + /** + * Method getContainerCount. + * + * @return the size of this collection + */ + public int getContainerCount( + ) { + return this._containerList.size(); + } + + /** + * Method getFieldMapping. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.FieldMapping at the given index + */ + public org.exolab.castor.mapping.xml.FieldMapping getFieldMapping( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._fieldMappingList.size()) { + throw new IndexOutOfBoundsException("getFieldMapping: Index value '" + index + "' not in range [0.." + (this._fieldMappingList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.FieldMapping) _fieldMappingList.get(index); + } + + /** + * Method getFieldMapping.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.FieldMapping[] getFieldMapping( + ) { + org.exolab.castor.mapping.xml.FieldMapping[] array = new org.exolab.castor.mapping.xml.FieldMapping[0]; + return (org.exolab.castor.mapping.xml.FieldMapping[]) this._fieldMappingList.toArray(array); + } + + /** + * Method getFieldMappingCount. + * + * @return the size of this collection + */ + public int getFieldMappingCount( + ) { + return this._fieldMappingList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateContainer. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateContainer( + ) { + return this._containerList.iterator(); + } + + /** + * Method iterateFieldMapping. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateFieldMapping( + ) { + return this._fieldMappingList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllContainer( + ) { + this._containerList.clear(); + } + + /** + */ + public void removeAllFieldMapping( + ) { + this._fieldMappingList.clear(); + } + + /** + * Method removeContainer. + * + * @param vContainer + * @return true if the object was removed from the collection. + */ + public boolean removeContainer( + final org.exolab.castor.mapping.xml.Container vContainer) { + boolean removed = _containerList.remove(vContainer); + return removed; + } + + /** + * Method removeContainerAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.Container removeContainerAt( + final int index) { + java.lang.Object obj = this._containerList.remove(index); + return (org.exolab.castor.mapping.xml.Container) obj; + } + + /** + * Method removeFieldMapping. + * + * @param vFieldMapping + * @return true if the object was removed from the collection. + */ + public boolean removeFieldMapping( + final org.exolab.castor.mapping.xml.FieldMapping vFieldMapping) { + boolean removed = _fieldMappingList.remove(vFieldMapping); + return removed; + } + + /** + * Method removeFieldMappingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.FieldMapping removeFieldMappingAt( + final int index) { + java.lang.Object obj = this._fieldMappingList.remove(index); + return (org.exolab.castor.mapping.xml.FieldMapping) obj; + } + + /** + * + * + * @param index + * @param vContainer + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setContainer( + final int index, + final org.exolab.castor.mapping.xml.Container vContainer) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._containerList.size()) { + throw new IndexOutOfBoundsException("setContainer: Index value '" + index + "' not in range [0.." + (this._containerList.size() - 1) + "]"); + } + + this._containerList.set(index, vContainer); + } + + /** + * + * + * @param vContainerArray + */ + public void setContainer( + final org.exolab.castor.mapping.xml.Container[] vContainerArray) { + //-- copy array + _containerList.clear(); + + for (int i = 0; i < vContainerArray.length; i++) { + this._containerList.add(vContainerArray[i]); + } + } + + /** + * + * + * @param index + * @param vFieldMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setFieldMapping( + final int index, + final org.exolab.castor.mapping.xml.FieldMapping vFieldMapping) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._fieldMappingList.size()) { + throw new IndexOutOfBoundsException("setFieldMapping: Index value '" + index + "' not in range [0.." + (this._fieldMappingList.size() - 1) + "]"); + } + + this._fieldMappingList.set(index, vFieldMapping); + } + + /** + * + * + * @param vFieldMappingArray + */ + public void setFieldMapping( + final org.exolab.castor.mapping.xml.FieldMapping[] vFieldMappingArray) { + //-- copy array + _fieldMappingList.clear(); + + for (int i = 0; i < vFieldMappingArray.length; i++) { + this._fieldMappingList.add(vFieldMappingArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.ClassChoice + */ + public static org.exolab.castor.mapping.xml.ClassChoice unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.ClassChoice) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.ClassChoice.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/Sql.java @@ -0,0 +1,722 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * The 'sql' element is used to store information about the + * database + * column to which a Java object is mapped to. + * + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Sql implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * An optional attribute used to store the name of the column + * in + * the database table. + * + */ + private java.util.List _name; + + /** + * An optional attibute used to specify the DB-specific type of + * the column. + * + */ + private java.lang.String _type; + + /** + * An optional attribute to specify the name of the bridge + * table + * containing the primary keys of the object on each side of + * the + * many to many relationship. + * + */ + private java.lang.String _manyTable; + + /** + * An optional attribute to specidy name of the columns that + * holds + * the foreign key to this object. That column is in the + * database + * table that stores objects of the Java type of this field. + * + */ + private java.util.List _manyKey; + + /** + * An optional attribute to specify cascading support; possible + * values are + * 'none', 'all', 'create', 'delete' and 'update'; it is + * possible to use more than one + * of those values (when not using 'all' or 'none'), using + * whitespace as a + * delimiter (as in 'create delete'). + * + */ + private java.lang.String _cascading; + + /** + * Field _readOnly. + */ + private boolean _readOnly = false; + + /** + * keeps track of state for field: _readOnly + */ + private boolean _has_readOnly; + + /** + * Field _transient. + */ + private boolean _transient; + + /** + * keeps track of state for field: _transient + */ + private boolean _has_transient; + + /** + * Field _dirty. + */ + private org.exolab.castor.mapping.xml.types.SqlDirtyType _dirty = org.exolab.castor.mapping.xml.types.SqlDirtyType.fromValue("check"); + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Sql() { + super(); + this._name = new java.util.ArrayList(); + this._manyKey = new java.util.ArrayList(); + setDirty(org.exolab.castor.mapping.xml.types.SqlDirtyType.fromValue("check")); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vManyKey + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addManyKey( + final java.lang.String vManyKey) + throws java.lang.IndexOutOfBoundsException { + this._manyKey.add(vManyKey); + } + + /** + * + * + * @param index + * @param vManyKey + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addManyKey( + final int index, + final java.lang.String vManyKey) + throws java.lang.IndexOutOfBoundsException { + this._manyKey.add(index, vManyKey); + } + + /** + * + * + * @param vName + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addName( + final java.lang.String vName) + throws java.lang.IndexOutOfBoundsException { + this._name.add(vName); + } + + /** + * + * + * @param index + * @param vName + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addName( + final int index, + final java.lang.String vName) + throws java.lang.IndexOutOfBoundsException { + this._name.add(index, vName); + } + + /** + */ + public void deleteReadOnly( + ) { + this._has_readOnly= false; + } + + /** + */ + public void deleteTransient( + ) { + this._has_transient= false; + } + + /** + * Method enumerateManyKey. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateManyKey( + ) { + return java.util.Collections.enumeration(this._manyKey); + } + + /** + * Method enumerateName. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateName( + ) { + return java.util.Collections.enumeration(this._name); + } + + /** + * Returns the value of field 'cascading'. The field + * 'cascading' has the following description: An optional + * attribute to specify cascading support; possible values are + * 'none', 'all', 'create', 'delete' and 'update'; it is + * possible to use more than one + * of those values (when not using 'all' or 'none'), using + * whitespace as a + * delimiter (as in 'create delete'). + * + * + * @return the value of field 'Cascading'. + */ + public java.lang.String getCascading( + ) { + return this._cascading; + } + + /** + * Returns the value of field 'dirty'. + * + * @return the value of field 'Dirty'. + */ + public org.exolab.castor.mapping.xml.types.SqlDirtyType getDirty( + ) { + return this._dirty; + } + + /** + * Method getManyKey. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the java.lang.String at the given index + */ + public java.lang.String getManyKey( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._manyKey.size()) { + throw new IndexOutOfBoundsException("getManyKey: Index value '" + index + "' not in range [0.." + (this._manyKey.size() - 1) + "]"); + } + + return (java.lang.String) _manyKey.get(index); + } + + /** + * Method getManyKey.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public java.lang.String[] getManyKey( + ) { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._manyKey.toArray(array); + } + + /** + * Method getManyKeyCount. + * + * @return the size of this collection + */ + public int getManyKeyCount( + ) { + return this._manyKey.size(); + } + + /** + * Returns the value of field 'manyTable'. The field + * 'manyTable' has the following description: An optional + * attribute to specify the name of the bridge table + * containing the primary keys of the object on each side of + * the + * many to many relationship. + * + * + * @return the value of field 'ManyTable'. + */ + public java.lang.String getManyTable( + ) { + return this._manyTable; + } + + /** + * Method getName. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the java.lang.String at the given index + */ + public java.lang.String getName( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._name.size()) { + throw new IndexOutOfBoundsException("getName: Index value '" + index + "' not in range [0.." + (this._name.size() - 1) + "]"); + } + + return (java.lang.String) _name.get(index); + } + + /** + * Method getName.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public java.lang.String[] getName( + ) { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._name.toArray(array); + } + + /** + * Method getNameCount. + * + * @return the size of this collection + */ + public int getNameCount( + ) { + return this._name.size(); + } + + /** + * Returns the value of field 'readOnly'. + * + * @return the value of field 'ReadOnly'. + */ + public boolean getReadOnly( + ) { + return this._readOnly; + } + + /** + * Returns the value of field 'transient'. + * + * @return the value of field 'Transient'. + */ + public boolean getTransient( + ) { + return this._transient; + } + + /** + * Returns the value of field 'type'. The field 'type' has the + * following description: An optional attibute used to specify + * the DB-specific type of the column. + * + * + * @return the value of field 'Type'. + */ + public java.lang.String getType( + ) { + return this._type; + } + + /** + * Method hasReadOnly. + * + * @return true if at least one ReadOnly has been added + */ + public boolean hasReadOnly( + ) { + return this._has_readOnly; + } + + /** + * Method hasTransient. + * + * @return true if at least one Transient has been added + */ + public boolean hasTransient( + ) { + return this._has_transient; + } + + /** + * Returns the value of field 'readOnly'. + * + * @return the value of field 'ReadOnly'. + */ + public boolean isReadOnly( + ) { + return this._readOnly; + } + + /** + * Returns the value of field 'transient'. + * + * @return the value of field 'Transient'. + */ + public boolean isTransient( + ) { + return this._transient; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateManyKey. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateManyKey( + ) { + return this._manyKey.iterator(); + } + + /** + * Method iterateName. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateName( + ) { + return this._name.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllManyKey( + ) { + this._manyKey.clear(); + } + + /** + */ + public void removeAllName( + ) { + this._name.clear(); + } + + /** + * Method removeManyKey. + * + * @param vManyKey + * @return true if the object was removed from the collection. + */ + public boolean removeManyKey( + final java.lang.String vManyKey) { + boolean removed = _manyKey.remove(vManyKey); + return removed; + } + + /** + * Method removeManyKeyAt. + * + * @param index + * @return the element removed from the collection + */ + public java.lang.String removeManyKeyAt( + final int index) { + java.lang.Object obj = this._manyKey.remove(index); + return (java.lang.String) obj; + } + + /** + * Method removeName. + * + * @param vName + * @return true if the object was removed from the collection. + */ + public boolean removeName( + final java.lang.String vName) { + boolean removed = _name.remove(vName); + return removed; + } + + /** + * Method removeNameAt. + * + * @param index + * @return the element removed from the collection + */ + public java.lang.String removeNameAt( + final int index) { + java.lang.Object obj = this._name.remove(index); + return (java.lang.String) obj; + } + + /** + * Sets the value of field 'cascading'. The field 'cascading' + * has the following description: An optional attribute to + * specify cascading support; possible values are + * 'none', 'all', 'create', 'delete' and 'update'; it is + * possible to use more than one + * of those values (when not using 'all' or 'none'), using + * whitespace as a + * delimiter (as in 'create delete'). + * + * + * @param cascading the value of field 'cascading'. + */ + public void setCascading( + final java.lang.String cascading) { + this._cascading = cascading; + } + + /** + * Sets the value of field 'dirty'. + * + * @param dirty the value of field 'dirty'. + */ + public void setDirty( + final org.exolab.castor.mapping.xml.types.SqlDirtyType dirty) { + this._dirty = dirty; + } + + /** + * + * + * @param index + * @param vManyKey + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setManyKey( + final int index, + final java.lang.String vManyKey) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._manyKey.size()) { + throw new IndexOutOfBoundsException("setManyKey: Index value '" + index + "' not in range [0.." + (this._manyKey.size() - 1) + "]"); + } + + this._manyKey.set(index, vManyKey); + } + + /** + * + * + * @param vManyKeyArray + */ + public void setManyKey( + final java.lang.String[] vManyKeyArray) { + //-- copy array + _manyKey.clear(); + + for (int i = 0; i < vManyKeyArray.length; i++) { + this._manyKey.add(vManyKeyArray[i]); + } + } + + /** + * Sets the value of field 'manyTable'. The field 'manyTable' + * has the following description: An optional attribute to + * specify the name of the bridge table + * containing the primary keys of the object on each side of + * the + * many to many relationship. + * + * + * @param manyTable the value of field 'manyTable'. + */ + public void setManyTable( + final java.lang.String manyTable) { + this._manyTable = manyTable; + } + + /** + * + * + * @param index + * @param vName + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setName( + final int index, + final java.lang.String vName) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._name.size()) { + throw new IndexOutOfBoundsException("setName: Index value '" + index + "' not in range [0.." + (this._name.size() - 1) + "]"); + } + + this._name.set(index, vName); + } + + /** + * + * + * @param vNameArray + */ + public void setName( + final java.lang.String[] vNameArray) { + //-- copy array + _name.clear(); + + for (int i = 0; i < vNameArray.length; i++) { + this._name.add(vNameArray[i]); + } + } + + /** + * Sets the value of field 'readOnly'. + * + * @param readOnly the value of field 'readOnly'. + */ + public void setReadOnly( + final boolean readOnly) { + this._readOnly = readOnly; + this._has_readOnly = true; + } + + /** + * Sets the value of field 'transient'. + * + * @param _transient + * @param transient the value of field 'transient'. + */ + public void setTransient( + final boolean _transient) { + this._transient = _transient; + this._has_transient = true; + } + + /** + * Sets the value of field 'type'. The field 'type' has the + * following description: An optional attibute used to specify + * the DB-specific type of the column. + * + * + * @param type the value of field 'type'. + */ + public void setType( + final java.lang.String type) { + this._type = type; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.exolab.castor.mapping.xml.Sql + */ + public static org.exolab.castor.mapping.xml.Sql unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.Sql) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.Sql.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/KeyGeneratorDef.java @@ -0,0 +1,331 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class KeyGeneratorDef. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class KeyGeneratorDef implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _alias. + */ + private java.lang.String _alias; + + /** + * Field _paramList. + */ + private java.util.List _paramList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public KeyGeneratorDef() { + super(); + this._paramList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(vParam); + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final int index, + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(index, vParam); + } + + /** + * Method enumerateParam. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateParam( + ) { + return java.util.Collections.enumeration(this._paramList); + } + + /** + * Returns the value of field 'alias'. + * + * @return the value of field 'Alias'. + */ + public java.lang.String getAlias( + ) { + return this._alias; + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method getParam. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.exolab.castor.mapping.xml.Param + * at the given index + */ + public org.exolab.castor.mapping.xml.Param getParam( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("getParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.Param) _paramList.get(index); + } + + /** + * Method getParam.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.Param[] getParam( + ) { + org.exolab.castor.mapping.xml.Param[] array = new org.exolab.castor.mapping.xml.Param[0]; + return (org.exolab.castor.mapping.xml.Param[]) this._paramList.toArray(array); + } + + /** + * Method getParamCount. + * + * @return the size of this collection + */ + public int getParamCount( + ) { + return this._paramList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateParam. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateParam( + ) { + return this._paramList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllParam( + ) { + this._paramList.clear(); + } + + /** + * Method removeParam. + * + * @param vParam + * @return true if the object was removed from the collection. + */ + public boolean removeParam( + final org.exolab.castor.mapping.xml.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.exolab.castor.mapping.xml.Param) obj; + } + + /** + * Sets the value of field 'alias'. + * + * @param alias the value of field 'alias'. + */ + public void setAlias( + final java.lang.String alias) { + this._alias = alias; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setParam( + final int index, + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("setParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + this._paramList.set(index, vParam); + } + + /** + * + * + * @param vParamArray + */ + public void setParam( + final org.exolab.castor.mapping.xml.Param[] vParamArray) { + //-- copy array + _paramList.clear(); + + for (int i = 0; i < vParamArray.length; i++) { + this._paramList.add(vParamArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.KeyGeneratorDef + */ + public static org.exolab.castor.mapping.xml.KeyGeneratorDef unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.KeyGeneratorDef) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.KeyGeneratorDef.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/Container.java @@ -0,0 +1,413 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class Container. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Container implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _type. + */ + private java.lang.String _type; + + /** + * Field _required. + */ + private boolean _required = false; + + /** + * keeps track of state for field: _required + */ + private boolean _has_required; + + /** + * Field _direct. + */ + private boolean _direct = false; + + /** + * keeps track of state for field: _direct + */ + private boolean _has_direct; + + /** + * Field _getMethod. + */ + private java.lang.String _getMethod; + + /** + * Field _setMethod. + */ + private java.lang.String _setMethod; + + /** + * Field _createMethod. + */ + private java.lang.String _createMethod; + + /** + * Field _description. + */ + private java.lang.String _description; + + /** + * The 'field' element is used to describe the property of a + * Java object. + * + */ + private org.exolab.castor.mapping.xml.FieldMapping _fieldMapping; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Container() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteDirect( + ) { + this._has_direct= false; + } + + /** + */ + public void deleteRequired( + ) { + this._has_required= false; + } + + /** + * Returns the value of field 'createMethod'. + * + * @return the value of field 'CreateMethod'. + */ + public java.lang.String getCreateMethod( + ) { + return this._createMethod; + } + + /** + * Returns the value of field 'description'. + * + * @return the value of field 'Description'. + */ + public java.lang.String getDescription( + ) { + return this._description; + } + + /** + * Returns the value of field 'direct'. + * + * @return the value of field 'Direct'. + */ + public boolean getDirect( + ) { + return this._direct; + } + + /** + * Returns the value of field 'fieldMapping'. The field + * 'fieldMapping' has the following description: The 'field' + * element is used to describe the property of a Java object. + * + * + * @return the value of field 'FieldMapping'. + */ + public org.exolab.castor.mapping.xml.FieldMapping getFieldMapping( + ) { + return this._fieldMapping; + } + + /** + * Returns the value of field 'getMethod'. + * + * @return the value of field 'GetMethod'. + */ + public java.lang.String getGetMethod( + ) { + return this._getMethod; + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'required'. + * + * @return the value of field 'Required'. + */ + public boolean getRequired( + ) { + return this._required; + } + + /** + * Returns the value of field 'setMethod'. + * + * @return the value of field 'SetMethod'. + */ + public java.lang.String getSetMethod( + ) { + return this._setMethod; + } + + /** + * Returns the value of field 'type'. + * + * @return the value of field 'Type'. + */ + public java.lang.String getType( + ) { + return this._type; + } + + /** + * Method hasDirect. + * + * @return true if at least one Direct has been added + */ + public boolean hasDirect( + ) { + return this._has_direct; + } + + /** + * Method hasRequired. + * + * @return true if at least one Required has been added + */ + public boolean hasRequired( + ) { + return this._has_required; + } + + /** + * Returns the value of field 'direct'. + * + * @return the value of field 'Direct'. + */ + public boolean isDirect( + ) { + return this._direct; + } + + /** + * Returns the value of field 'required'. + * + * @return the value of field 'Required'. + */ + public boolean isRequired( + ) { + return this._required; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'createMethod'. + * + * @param createMethod the value of field 'createMethod'. + */ + public void setCreateMethod( + final java.lang.String createMethod) { + this._createMethod = createMethod; + } + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription( + final java.lang.String description) { + this._description = description; + } + + /** + * Sets the value of field 'direct'. + * + * @param direct the value of field 'direct'. + */ + public void setDirect( + final boolean direct) { + this._direct = direct; + this._has_direct = true; + } + + /** + * Sets the value of field 'fieldMapping'. The field + * 'fieldMapping' has the following description: The 'field' + * element is used to describe the property of a Java object. + * + * + * @param fieldMapping the value of field 'fieldMapping'. + */ + public void setFieldMapping( + final org.exolab.castor.mapping.xml.FieldMapping fieldMapping) { + this._fieldMapping = fieldMapping; + } + + /** + * Sets the value of field 'getMethod'. + * + * @param getMethod the value of field 'getMethod'. + */ + public void setGetMethod( + final java.lang.String getMethod) { + this._getMethod = getMethod; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'required'. + * + * @param required the value of field 'required'. + */ + public void setRequired( + final boolean required) { + this._required = required; + this._has_required = true; + } + + /** + * Sets the value of field 'setMethod'. + * + * @param setMethod the value of field 'setMethod'. + */ + public void setSetMethod( + final java.lang.String setMethod) { + this._setMethod = setMethod; + } + + /** + * Sets the value of field 'type'. + * + * @param type the value of field 'type'. + */ + public void setType( + final java.lang.String type) { + this._type = type; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.Container + */ + public static org.exolab.castor.mapping.xml.Container unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.Container) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.Container.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/NamedQuery.java @@ -0,0 +1,331 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class NamedQuery. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class NamedQuery implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _query. + */ + private java.lang.String _query; + + /** + * Field _queryHintList. + */ + private java.util.List _queryHintList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamedQuery() { + super(); + this._queryHintList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vQueryHint + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addQueryHint( + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) + throws java.lang.IndexOutOfBoundsException { + this._queryHintList.add(vQueryHint); + } + + /** + * + * + * @param index + * @param vQueryHint + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addQueryHint( + final int index, + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) + throws java.lang.IndexOutOfBoundsException { + this._queryHintList.add(index, vQueryHint); + } + + /** + * Method enumerateQueryHint. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateQueryHint( + ) { + return java.util.Collections.enumeration(this._queryHintList); + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'query'. + * + * @return the value of field 'Query'. + */ + public java.lang.String getQuery( + ) { + return this._query; + } + + /** + * Method getQueryHint. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.mapping.xml.QueryHint at the given index + */ + public org.exolab.castor.mapping.xml.QueryHint getQueryHint( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._queryHintList.size()) { + throw new IndexOutOfBoundsException("getQueryHint: Index value '" + index + "' not in range [0.." + (this._queryHintList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.QueryHint) _queryHintList.get(index); + } + + /** + * Method getQueryHint.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.QueryHint[] getQueryHint( + ) { + org.exolab.castor.mapping.xml.QueryHint[] array = new org.exolab.castor.mapping.xml.QueryHint[0]; + return (org.exolab.castor.mapping.xml.QueryHint[]) this._queryHintList.toArray(array); + } + + /** + * Method getQueryHintCount. + * + * @return the size of this collection + */ + public int getQueryHintCount( + ) { + return this._queryHintList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateQueryHint. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateQueryHint( + ) { + return this._queryHintList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllQueryHint( + ) { + this._queryHintList.clear(); + } + + /** + * Method removeQueryHint. + * + * @param vQueryHint + * @return true if the object was removed from the collection. + */ + public boolean removeQueryHint( + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) { + boolean removed = _queryHintList.remove(vQueryHint); + return removed; + } + + /** + * Method removeQueryHintAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.QueryHint removeQueryHintAt( + final int index) { + java.lang.Object obj = this._queryHintList.remove(index); + return (org.exolab.castor.mapping.xml.QueryHint) obj; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'query'. + * + * @param query the value of field 'query'. + */ + public void setQuery( + final java.lang.String query) { + this._query = query; + } + + /** + * + * + * @param index + * @param vQueryHint + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setQueryHint( + final int index, + final org.exolab.castor.mapping.xml.QueryHint vQueryHint) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._queryHintList.size()) { + throw new IndexOutOfBoundsException("setQueryHint: Index value '" + index + "' not in range [0.." + (this._queryHintList.size() - 1) + "]"); + } + + this._queryHintList.set(index, vQueryHint); + } + + /** + * + * + * @param vQueryHintArray + */ + public void setQueryHint( + final org.exolab.castor.mapping.xml.QueryHint[] vQueryHintArray) { + //-- copy array + _queryHintList.clear(); + + for (int i = 0; i < vQueryHintArray.length; i++) { + this._queryHintList.add(vQueryHintArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.NamedQuery + */ + public static org.exolab.castor.mapping.xml.NamedQuery unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.NamedQuery) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.NamedQuery.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/CacheTypeMapping.java @@ -0,0 +1,413 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml; + +/** + * Class CacheTypeMapping. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class CacheTypeMapping implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _type. + */ + private java.lang.String _type = "count-limited"; + + /** + * Field _debug. + */ + private boolean _debug = false; + + /** + * keeps track of state for field: _debug + */ + private boolean _has_debug; + + /** + * Field _capacity. + */ + private long _capacity; + + /** + * keeps track of state for field: _capacity + */ + private boolean _has_capacity; + + /** + * Field _paramList. + */ + private java.util.List _paramList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public CacheTypeMapping() { + super(); + setType("count-limited"); + this._paramList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(vParam); + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final int index, + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(index, vParam); + } + + /** + */ + public void deleteCapacity( + ) { + this._has_capacity= false; + } + + /** + */ + public void deleteDebug( + ) { + this._has_debug= false; + } + + /** + * Method enumerateParam. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateParam( + ) { + return java.util.Collections.enumeration(this._paramList); + } + + /** + * Returns the value of field 'capacity'. + * + * @return the value of field 'Capacity'. + */ + public long getCapacity( + ) { + return this._capacity; + } + + /** + * Returns the value of field 'debug'. + * + * @return the value of field 'Debug'. + */ + public boolean getDebug( + ) { + return this._debug; + } + + /** + * Method getParam. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.exolab.castor.mapping.xml.Param + * at the given index + */ + public org.exolab.castor.mapping.xml.Param getParam( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("getParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + return (org.exolab.castor.mapping.xml.Param) _paramList.get(index); + } + + /** + * Method getParam.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.mapping.xml.Param[] getParam( + ) { + org.exolab.castor.mapping.xml.Param[] array = new org.exolab.castor.mapping.xml.Param[0]; + return (org.exolab.castor.mapping.xml.Param[]) this._paramList.toArray(array); + } + + /** + * Method getParamCount. + * + * @return the size of this collection + */ + public int getParamCount( + ) { + return this._paramList.size(); + } + + /** + * Returns the value of field 'type'. + * + * @return the value of field 'Type'. + */ + public java.lang.String getType( + ) { + return this._type; + } + + /** + * Method hasCapacity. + * + * @return true if at least one Capacity has been added + */ + public boolean hasCapacity( + ) { + return this._has_capacity; + } + + /** + * Method hasDebug. + * + * @return true if at least one Debug has been added + */ + public boolean hasDebug( + ) { + return this._has_debug; + } + + /** + * Returns the value of field 'debug'. + * + * @return the value of field 'Debug'. + */ + public boolean isDebug( + ) { + return this._debug; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateParam. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateParam( + ) { + return this._paramList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllParam( + ) { + this._paramList.clear(); + } + + /** + * Method removeParam. + * + * @param vParam + * @return true if the object was removed from the collection. + */ + public boolean removeParam( + final org.exolab.castor.mapping.xml.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.mapping.xml.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.exolab.castor.mapping.xml.Param) obj; + } + + /** + * Sets the value of field 'capacity'. + * + * @param capacity the value of field 'capacity'. + */ + public void setCapacity( + final long capacity) { + this._capacity = capacity; + this._has_capacity = true; + } + + /** + * Sets the value of field 'debug'. + * + * @param debug the value of field 'debug'. + */ + public void setDebug( + final boolean debug) { + this._debug = debug; + this._has_debug = true; + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setParam( + final int index, + final org.exolab.castor.mapping.xml.Param vParam) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("setParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + this._paramList.set(index, vParam); + } + + /** + * + * + * @param vParamArray + */ + public void setParam( + final org.exolab.castor.mapping.xml.Param[] vParamArray) { + //-- copy array + _paramList.clear(); + + for (int i = 0; i < vParamArray.length; i++) { + this._paramList.add(vParamArray[i]); + } + } + + /** + * Sets the value of field 'type'. + * + * @param type the value of field 'type'. + */ + public void setType( + final java.lang.String type) { + this._type = type; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.mapping.xml.CacheTypeMapping + */ + public static org.exolab.castor.mapping.xml.CacheTypeMapping unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.mapping.xml.CacheTypeMapping) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.CacheTypeMapping.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/IncludeDescriptor.java @@ -0,0 +1,213 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.Include; + +/** + * Class IncludeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class IncludeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public IncludeDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "include"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _href + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_href", "href", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Include target = (Include) object; + return target.getHref(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Include target = (Include) object; + target.setHref( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _href + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.Include.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/FieldMappingDescriptor.java @@ -0,0 +1,1031 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.FieldMapping; + +/** + * Class FieldMappingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FieldMappingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldMappingDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "field"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getType(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _required + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_required", "required", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + if (!target.hasRequired()) { return null; } + return (target.getRequired() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteRequired(); + return; + } + target.setRequired( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _required + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _transient + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_transient", "transient", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + if (!target.hasTransient()) { return null; } + return (target.getTransient() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTransient(); + return; + } + target.setTransient( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _transient + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _nillable + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_nillable", "nillable", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + if (!target.hasNillable()) { return null; } + return (target.getNillable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteNillable(); + return; + } + target.setNillable( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _nillable + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _direct + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_direct", "direct", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + if (!target.hasDirect()) { return null; } + return (target.getDirect() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDirect(); + return; + } + target.setDirect( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _direct + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _lazy + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_lazy", "lazy", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + if (!target.hasLazy()) { return null; } + return (target.getLazy() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteLazy(); + return; + } + target.setLazy( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _lazy + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _container + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_container", "container", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + if (!target.hasContainer()) { return null; } + return (target.getContainer() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteContainer(); + return; + } + target.setContainer( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _container + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _getMethod + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_getMethod", "get-method", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getGetMethod(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setGetMethod( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _getMethod + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _hasMethod + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_hasMethod", "has-method", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getHasMethod(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setHasMethod( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _hasMethod + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _setMethod + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_setMethod", "set-method", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getSetMethod(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setSetMethod( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _setMethod + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _createMethod + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_createMethod", "create-method", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getCreateMethod(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setCreateMethod( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _createMethod + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _handler + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_handler", "handler", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getHandler(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setHandler( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _handler + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _collection + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.types.FieldMappingCollectionType.class, "_collection", "collection", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getCollection(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setCollection( (org.exolab.castor.mapping.xml.types.FieldMappingCollectionType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.mapping.xml.types.FieldMappingCollectionType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("FieldMappingCollectionType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _collection + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _comparator + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_comparator", "comparator", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getComparator(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setComparator( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _comparator + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _identity + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_identity", "identity", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + if (!target.hasIdentity()) { return null; } + return (target.getIdentity() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteIdentity(); + return; + } + target.setIdentity( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _identity + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getDescription(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _sql + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Sql.class, "_sql", "sql", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getSql(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setSql( (org.exolab.castor.mapping.xml.Sql) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.Sql"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _sql + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _bindXml + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.BindXml.class, "_bindXml", "bind-xml", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getBindXml(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setBindXml( (org.exolab.castor.mapping.xml.BindXml) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.BindXml"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _bindXml + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _ldap + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Ldap.class, "_ldap", "ldap", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldMapping target = (FieldMapping) object; + return target.getLdap(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldMapping target = (FieldMapping) object; + target.setLdap( (org.exolab.castor.mapping.xml.Ldap) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.Ldap"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _ldap + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.FieldMapping.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/MappingRootDescriptor.java @@ -0,0 +1,411 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.MappingRoot; + +/** + * Class MappingRootDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MappingRootDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MappingRootDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "mapping"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MappingRoot target = (MappingRoot) object; + return target.getDescription(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MappingRoot target = (MappingRoot) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _includeList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Include.class, "_includeList", "include", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MappingRoot target = (MappingRoot) object; + return target.getInclude(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MappingRoot target = (MappingRoot) object; + target.addInclude( (org.exolab.castor.mapping.xml.Include) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + MappingRoot target = (MappingRoot) object; + target.removeAllInclude(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.Include"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _includeList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _fieldHandlerDefList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.FieldHandlerDef.class, "_fieldHandlerDefList", "field-handler", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MappingRoot target = (MappingRoot) object; + return target.getFieldHandlerDef(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MappingRoot target = (MappingRoot) object; + target.addFieldHandlerDef( (org.exolab.castor.mapping.xml.FieldHandlerDef) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + MappingRoot target = (MappingRoot) object; + target.removeAllFieldHandlerDef(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.FieldHandlerDef"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _fieldHandlerDefList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _classMappingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.ClassMapping.class, "_classMappingList", "class", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MappingRoot target = (MappingRoot) object; + return target.getClassMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MappingRoot target = (MappingRoot) object; + target.addClassMapping( (org.exolab.castor.mapping.xml.ClassMapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + MappingRoot target = (MappingRoot) object; + target.removeAllClassMapping(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.ClassMapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _classMappingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _keyGeneratorDefList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.KeyGeneratorDef.class, "_keyGeneratorDefList", "key-generator", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MappingRoot target = (MappingRoot) object; + return target.getKeyGeneratorDef(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MappingRoot target = (MappingRoot) object; + target.addKeyGeneratorDef( (org.exolab.castor.mapping.xml.KeyGeneratorDef) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + MappingRoot target = (MappingRoot) object; + target.removeAllKeyGeneratorDef(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.KeyGeneratorDef"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _keyGeneratorDefList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.MappingRoot.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/NamedQueryDescriptor.java @@ -0,0 +1,310 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.NamedQuery; + +/** + * Class NamedQueryDescriptor. + * + * @version $Revision$ $Date$ + */ +public class NamedQueryDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamedQueryDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "named-query"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedQuery target = (NamedQuery) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedQuery target = (NamedQuery) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _query + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_query", "query", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedQuery target = (NamedQuery) object; + return target.getQuery(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedQuery target = (NamedQuery) object; + target.setQuery( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _query + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _queryHintList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.QueryHint.class, "_queryHintList", "query-hint", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedQuery target = (NamedQuery) object; + return target.getQueryHint(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedQuery target = (NamedQuery) object; + target.addQueryHint( (org.exolab.castor.mapping.xml.QueryHint) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + NamedQuery target = (NamedQuery) object; + target.removeAllQueryHint(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.QueryHint"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _queryHintList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.NamedQuery.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/ContainerDescriptor.java @@ -0,0 +1,560 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.Container; + +/** + * Class ContainerDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ContainerDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ContainerDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "container"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + return target.getType(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _required + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_required", "required", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + if (!target.hasRequired()) { return null; } + return (target.getRequired() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteRequired(); + return; + } + target.setRequired( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _required + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _direct + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_direct", "direct", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + if (!target.hasDirect()) { return null; } + return (target.getDirect() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDirect(); + return; + } + target.setDirect( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _direct + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _getMethod + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_getMethod", "get-method", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + return target.getGetMethod(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + target.setGetMethod( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _getMethod + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _setMethod + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_setMethod", "set-method", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + return target.getSetMethod(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + target.setSetMethod( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _setMethod + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _createMethod + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_createMethod", "create-method", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + return target.getCreateMethod(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + target.setCreateMethod( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _createMethod + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + return target.getDescription(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _fieldMapping + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.FieldMapping.class, "_fieldMapping", "field", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Container target = (Container) object; + return target.getFieldMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Container target = (Container) object; + target.setFieldMapping( (org.exolab.castor.mapping.xml.FieldMapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.FieldMapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _fieldMapping + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.Container.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/PropertyTypeDescriptor.java @@ -0,0 +1,262 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.PropertyType; + +/** + * Class PropertyTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PropertyTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PropertyTypeDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "propertyType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PropertyType target = (PropertyType) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PropertyType target = (PropertyType) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PropertyType target = (PropertyType) object; + return target.getValue(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PropertyType target = (PropertyType) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.PropertyType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/NamedNativeQueryDescriptor.java @@ -0,0 +1,394 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.NamedNativeQuery; + +/** + * Class NamedNativeQueryDescriptor. + * + * @version $Revision$ $Date$ + */ +public class NamedNativeQueryDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamedNativeQueryDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "named-native-query"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedNativeQuery target = (NamedNativeQuery) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedNativeQuery target = (NamedNativeQuery) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _resultClass + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_resultClass", "result-class", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedNativeQuery target = (NamedNativeQuery) object; + return target.getResultClass(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedNativeQuery target = (NamedNativeQuery) object; + target.setResultClass( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _resultClass + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _resultSetMapping + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_resultSetMapping", "result-set-mapping", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedNativeQuery target = (NamedNativeQuery) object; + return target.getResultSetMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedNativeQuery target = (NamedNativeQuery) object; + target.setResultSetMapping( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _resultSetMapping + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _query + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_query", "query", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedNativeQuery target = (NamedNativeQuery) object; + return target.getQuery(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedNativeQuery target = (NamedNativeQuery) object; + target.setQuery( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _query + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _queryHintList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.QueryHint.class, "_queryHintList", "query-hint", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamedNativeQuery target = (NamedNativeQuery) object; + return target.getQueryHint(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamedNativeQuery target = (NamedNativeQuery) object; + target.addQueryHint( (org.exolab.castor.mapping.xml.QueryHint) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + NamedNativeQuery target = (NamedNativeQuery) object; + target.removeAllQueryHint(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.QueryHint"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _queryHintList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.NamedNativeQuery.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/ParamDescriptor.java @@ -0,0 +1,257 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.Param; + +/** + * Class ParamDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ParamDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ParamDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "param"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Param target = (Param) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Param target = (Param) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Param target = (Param) object; + return target.getValue(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Param target = (Param) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.Param.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/ClassMappingDescriptor.java @@ -0,0 +1,820 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.ClassMapping; + +/** + * Class ClassMappingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ClassMappingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassMappingDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "class"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + this._identity = desc; + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("ID"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IdValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _extends + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_extends", "extends", org.exolab.castor.xml.NodeType.Attribute); + desc.setReference(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getExtends(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setExtends( (java.lang.Object) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.Object(); + } + }; + desc.setSchemaType("IDREF"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _extends + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.IdRefValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdRefValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _depends + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_depends", "depends", org.exolab.castor.xml.NodeType.Attribute); + desc.setReference(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getDepends(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setDepends( (java.lang.Object) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.Object(); + } + }; + desc.setSchemaType("IDREF"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _depends + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.IdRefValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdRefValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _identity + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_identity", "identity", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getIdentity(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.addIdentity( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ClassMapping target = (ClassMapping) object; + target.removeAllIdentity(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + handler = new org.exolab.castor.xml.handlers.CollectionFieldHandler(handler, new org.exolab.castor.xml.validators.NameValidator(org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN)); + desc.setSchemaType("list"); + desc.setComponentType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _identity + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _access + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.types.ClassMappingAccessType.class, "_access", "access", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getAccess(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setAccess( (org.exolab.castor.mapping.xml.types.ClassMappingAccessType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.mapping.xml.types.ClassMappingAccessType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("ClassMappingAccessType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _access + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _keyGenerator + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_keyGenerator", "key-generator", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getKeyGenerator(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setKeyGenerator( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _keyGenerator + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _autoComplete + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_autoComplete", "auto-complete", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + if (!target.hasAutoComplete()) { return null; } + return (target.getAutoComplete() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteAutoComplete(); + return; + } + target.setAutoComplete( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _autoComplete + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _verifyConstructable + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_verifyConstructable", "verify-constructable", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + if (!target.hasVerifyConstructable()) { return null; } + return (target.getVerifyConstructable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteVerifyConstructable(); + return; + } + target.setVerifyConstructable( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _verifyConstructable + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _version + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getVersion(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setVersion( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _version + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getDescription(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _cacheTypeMapping + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.CacheTypeMapping.class, "_cacheTypeMapping", "cache-type", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getCacheTypeMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setCacheTypeMapping( (org.exolab.castor.mapping.xml.CacheTypeMapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.CacheTypeMapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _cacheTypeMapping + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _mapTo + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.MapTo.class, "_mapTo", "map-to", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getMapTo(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setMapTo( (org.exolab.castor.mapping.xml.MapTo) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.MapTo"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _mapTo + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _namedQueryList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.NamedQuery.class, "_namedQueryList", "named-query", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getNamedQuery(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.addNamedQuery( (org.exolab.castor.mapping.xml.NamedQuery) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ClassMapping target = (ClassMapping) object; + target.removeAllNamedQuery(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.NamedQuery"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _namedQueryList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _namedNativeQueryList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.NamedNativeQuery.class, "_namedNativeQueryList", "named-native-query", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getNamedNativeQuery(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.addNamedNativeQuery( (org.exolab.castor.mapping.xml.NamedNativeQuery) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ClassMapping target = (ClassMapping) object; + target.removeAllNamedNativeQuery(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.NamedNativeQuery"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _namedNativeQueryList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _classChoice + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.ClassChoice.class, "_classChoice", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getClassChoice(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setClassChoice( (org.exolab.castor.mapping.xml.ClassChoice) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.mapping.xml.ClassChoice(); + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.ClassChoice"); + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new org.exolab.castor.mapping.xml.descriptors.ClassChoiceDescriptor()); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _classChoice + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.ClassMapping.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/SqlDescriptor.java @@ -0,0 +1,522 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.Sql; + +/** + * Class SqlDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SqlDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SqlDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "sql"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + target.addName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Sql target = (Sql) object; + target.removeAllName(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + handler = new org.exolab.castor.xml.handlers.CollectionFieldHandler(handler, new org.exolab.castor.xml.validators.NameValidator(org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN)); + desc.setSchemaType("list"); + desc.setComponentType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + return target.getType(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _manyTable + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_manyTable", "many-table", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + return target.getManyTable(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + target.setManyTable( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _manyTable + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _manyKey + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_manyKey", "many-key", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + return target.getManyKey(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + target.addManyKey( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Sql target = (Sql) object; + target.removeAllManyKey(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + handler = new org.exolab.castor.xml.handlers.CollectionFieldHandler(handler, new org.exolab.castor.xml.validators.NameValidator(org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN)); + desc.setSchemaType("list"); + desc.setComponentType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _manyKey + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _cascading + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_cascading", "cascading", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + return target.getCascading(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + target.setCascading( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _cascading + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _readOnly + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_readOnly", "read-only", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + if (!target.hasReadOnly()) { return null; } + return (target.getReadOnly() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteReadOnly(); + return; + } + target.setReadOnly( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _readOnly + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _transient + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_transient", "transient", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + if (!target.hasTransient()) { return null; } + return (target.getTransient() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTransient(); + return; + } + target.setTransient( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _transient + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _dirty + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.types.SqlDirtyType.class, "_dirty", "dirty", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sql target = (Sql) object; + return target.getDirty(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sql target = (Sql) object; + target.setDirty( (org.exolab.castor.mapping.xml.types.SqlDirtyType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.mapping.xml.types.SqlDirtyType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("SqlDirtyType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _dirty + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.Sql.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/FieldHandlerDefDescriptor.java @@ -0,0 +1,308 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.FieldHandlerDef; + +/** + * Class FieldHandlerDefDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FieldHandlerDefDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldHandlerDefDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "field-handler"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + this._identity = desc; + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldHandlerDef target = (FieldHandlerDef) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldHandlerDef target = (FieldHandlerDef) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("ID"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IdValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _clazz + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_clazz", "class", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldHandlerDef target = (FieldHandlerDef) object; + return target.getClazz(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldHandlerDef target = (FieldHandlerDef) object; + target.setClazz( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _clazz + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _paramList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldHandlerDef target = (FieldHandlerDef) object; + return target.getParam(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldHandlerDef target = (FieldHandlerDef) object; + target.addParam( (org.exolab.castor.mapping.xml.Param) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + FieldHandlerDef target = (FieldHandlerDef) object; + target.removeAllParam(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.Param"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _paramList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.FieldHandlerDef.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/CacheTypeMappingDescriptor.java @@ -0,0 +1,355 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.CacheTypeMapping; + +/** + * Class CacheTypeMappingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class CacheTypeMappingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public CacheTypeMappingDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "cache-type"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + CacheTypeMapping target = (CacheTypeMapping) object; + return target.getType(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CacheTypeMapping target = (CacheTypeMapping) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _debug + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_debug", "debug", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + CacheTypeMapping target = (CacheTypeMapping) object; + if (!target.hasDebug()) { return null; } + return (target.getDebug() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CacheTypeMapping target = (CacheTypeMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDebug(); + return; + } + target.setDebug( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _debug + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _capacity + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_capacity", "capacity", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + CacheTypeMapping target = (CacheTypeMapping) object; + if (!target.hasCapacity()) { return null; } + return new java.lang.Long(target.getCapacity()); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CacheTypeMapping target = (CacheTypeMapping) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteCapacity(); + return; + } + target.setCapacity( ((java.lang.Long) value).longValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("integer"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _capacity + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.LongValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.LongValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _paramList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + CacheTypeMapping target = (CacheTypeMapping) object; + return target.getParam(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CacheTypeMapping target = (CacheTypeMapping) object; + target.addParam( (org.exolab.castor.mapping.xml.Param) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + CacheTypeMapping target = (CacheTypeMapping) object; + target.removeAllParam(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.Param"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _paramList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.CacheTypeMapping.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/MapToDescriptor.java @@ -0,0 +1,467 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.MapTo; + +/** + * Class MapToDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MapToDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MapToDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "map-to"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _table + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_table", "table", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapTo target = (MapTo) object; + return target.getTable(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapTo target = (MapTo) object; + target.setTable( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _table + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _xml + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_xml", "xml", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapTo target = (MapTo) object; + return target.getXml(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapTo target = (MapTo) object; + target.setXml( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _xml + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _nsUri + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_nsUri", "ns-uri", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapTo target = (MapTo) object; + return target.getNsUri(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapTo target = (MapTo) object; + target.setNsUri( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _nsUri + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _nsPrefix + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_nsPrefix", "ns-prefix", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapTo target = (MapTo) object; + return target.getNsPrefix(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapTo target = (MapTo) object; + target.setNsPrefix( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _nsPrefix + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _elementDefinition + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_elementDefinition", "element-definition", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapTo target = (MapTo) object; + if (!target.hasElementDefinition()) { return null; } + return (target.getElementDefinition() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapTo target = (MapTo) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteElementDefinition(); + return; + } + target.setElementDefinition( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _elementDefinition + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _ldapDn + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_ldapDn", "ldap-dn", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapTo target = (MapTo) object; + return target.getLdapDn(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapTo target = (MapTo) object; + target.setLdapDn( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _ldapDn + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _ldapOc + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_ldapOc", "ldap-oc", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapTo target = (MapTo) object; + return target.getLdapOc(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapTo target = (MapTo) object; + target.setLdapOc( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _ldapOc + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.MapTo.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/PropertyDescriptor.java @@ -0,0 +1,165 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.Property; + +/** + * Class PropertyDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PropertyDescriptor extends org.exolab.castor.mapping.xml.descriptors.PropertyTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PropertyDescriptor() { + super(); + setExtendsWithoutFlatten(new org.exolab.castor.mapping.xml.descriptors.PropertyTypeDescriptor()); + _xmlName = "property"; + _elementDefinition = true; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.Property.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/KeyGeneratorDefDescriptor.java @@ -0,0 +1,306 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.KeyGeneratorDef; + +/** + * Class KeyGeneratorDefDescriptor. + * + * @version $Revision$ $Date$ + */ +public class KeyGeneratorDefDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public KeyGeneratorDefDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "key-generator"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + this._identity = desc; + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + KeyGeneratorDef target = (KeyGeneratorDef) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + KeyGeneratorDef target = (KeyGeneratorDef) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("ID"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IdValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _alias + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_alias", "alias", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + KeyGeneratorDef target = (KeyGeneratorDef) object; + return target.getAlias(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + KeyGeneratorDef target = (KeyGeneratorDef) object; + target.setAlias( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _alias + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _paramList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + KeyGeneratorDef target = (KeyGeneratorDef) object; + return target.getParam(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + KeyGeneratorDef target = (KeyGeneratorDef) object; + target.addParam( (org.exolab.castor.mapping.xml.Param) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + KeyGeneratorDef target = (KeyGeneratorDef) object; + target.removeAllParam(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.Param"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _paramList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.KeyGeneratorDef.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/ClassChoiceDescriptor.java @@ -0,0 +1,269 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.ClassChoice; + +/** + * Class ClassChoiceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ClassChoiceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassChoiceDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _fieldMappingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.FieldMapping.class, "_fieldMappingList", "field", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassChoice target = (ClassChoice) object; + return target.getFieldMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassChoice target = (ClassChoice) object; + target.addFieldMapping( (org.exolab.castor.mapping.xml.FieldMapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ClassChoice target = (ClassChoice) object; + target.removeAllFieldMapping(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.FieldMapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _fieldMappingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _containerList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Container.class, "_containerList", "container", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassChoice target = (ClassChoice) object; + return target.getContainer(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassChoice target = (ClassChoice) object; + target.addContainer( (org.exolab.castor.mapping.xml.Container) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ClassChoice target = (ClassChoice) object; + target.removeAllContainer(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.Container"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _containerList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.ClassChoice.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/BindXmlDescriptor.java @@ -0,0 +1,639 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.BindXml; + +/** + * Class BindXmlDescriptor. + * + * @version $Revision$ $Date$ + */ +public class BindXmlDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public BindXmlDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "bind-xml"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setSchemaType("QName"); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("QName"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_QNAME); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getType(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _autoNaming + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType.class, "_autoNaming", "auto-naming", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getAutoNaming(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setAutoNaming( (org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("BindXmlAutoNamingType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _autoNaming + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _location + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_location", "location", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getLocation(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setLocation( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _location + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _matches + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_matches", "matches", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getMatches(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setMatches( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _matches + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _reference + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_reference", "reference", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + if (!target.hasReference()) { return null; } + return (target.getReference() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteReference(); + return; + } + target.setReference( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _reference + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _node + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.types.BindXmlNodeType.class, "_node", "node", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getNode(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setNode( (org.exolab.castor.mapping.xml.types.BindXmlNodeType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.mapping.xml.types.BindXmlNodeType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("BindXmlNodeType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _node + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _QNamePrefix + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_QNamePrefix", "QName-prefix", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getQNamePrefix(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setQNamePrefix( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _QNamePrefix + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- _transient + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_transient", "transient", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + if (!target.hasTransient()) { return null; } + return (target.getTransient() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTransient(); + return; + } + target.setTransient( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _transient + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _classMapping + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.ClassMapping.class, "_classMapping", "class", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getClassMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.setClassMapping( (org.exolab.castor.mapping.xml.ClassMapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.exolab.castor.mapping.xml.ClassMapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.exolab.org/"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _classMapping + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _propertyList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.mapping.xml.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + BindXml target = (BindXml) object; + return target.getProperty(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + BindXml target = (BindXml) object; + target.addProperty( (org.exolab.castor.mapping.xml.Property) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + BindXml target = (BindXml) object; + target.removeAllProperty(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.mapping.xml.Property"); + desc.setHandler(handler); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _propertyList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.BindXml.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/QueryHintDescriptor.java @@ -0,0 +1,257 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.QueryHint; + +/** + * Class QueryHintDescriptor. + * + * @version $Revision$ $Date$ + */ +public class QueryHintDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public QueryHintDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "query-hint"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + QueryHint target = (QueryHint) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + QueryHint target = (QueryHint) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + QueryHint target = (QueryHint) object; + return target.getValue(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + QueryHint target = (QueryHint) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.QueryHint.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/descriptors/LdapDescriptor.java @@ -0,0 +1,211 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.Ldap; + +/** + * Class LdapDescriptor. + * + * @version $Revision$ $Date$ + */ +public class LdapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public LdapDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "ldap"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Ldap target = (Ldap) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Ldap target = (Ldap) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("NMTOKEN"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.NameValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.NameValidator( + org.exolab.castor.xml.XMLConstants.NAME_TYPE_NMTOKEN); + fieldValidator.setValidator(typeValidator); + typeValidator.addPattern("[\\w-._:]+"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.Ldap.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/.castor.cdr @@ -0,0 +1,6 @@ +#Sun Jan 22 02:11:58 UTC 2012 +org.exolab.castor.mapping.xml.types.SqlDirtyType=org.exolab.castor.mapping.xml.types.descriptors.SqlDirtyTypeDescriptor +org.exolab.castor.mapping.xml.types.FieldMappingCollectionType=org.exolab.castor.mapping.xml.types.descriptors.FieldMappingCollectionTypeDescriptor +org.exolab.castor.mapping.xml.types.ClassMappingAccessType=org.exolab.castor.mapping.xml.types.descriptors.ClassMappingAccessTypeDescriptor +org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType=org.exolab.castor.mapping.xml.types.descriptors.BindXmlAutoNamingTypeDescriptor +org.exolab.castor.mapping.xml.types.BindXmlNodeType=org.exolab.castor.mapping.xml.types.descriptors.BindXmlNodeTypeDescriptor --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/SqlDirtyType.java @@ -0,0 +1,111 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types; + +/** + * Enumeration SqlDirtyType. + * + * @version $Revision$ $Date$ + */ +public enum SqlDirtyType { + + + //------------------/ + //- Enum Constants -/ + //------------------/ + + /** + * Constant CHECK + */ + CHECK("check"), + /** + * Constant IGNORE + */ + IGNORE("ignore"); + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field value. + */ + private final java.lang.String value; + + /** + * Field enumConstants. + */ + private static final java.util.Map enumConstants = new java.util.HashMap(); + + + static { + for (SqlDirtyType c: SqlDirtyType.values()) { + SqlDirtyType.enumConstants.put(c.value, c); + } + + }; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private SqlDirtyType(final java.lang.String value) { + this.value = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method fromValue. + * + * @param value + * @return the constant for this value + */ + public static org.exolab.castor.mapping.xml.types.SqlDirtyType fromValue( + final java.lang.String value) { + SqlDirtyType c = SqlDirtyType.enumConstants.get(value); + if (c != null) { + return c; + } + throw new IllegalArgumentException(value); + } + + /** + * + * + * @param value + */ + public void setValue( + final java.lang.String value) { + } + + /** + * Method toString. + * + * @return the value of this constant + */ + public java.lang.String toString( + ) { + return this.value; + } + + /** + * Method value. + * + * @return the value of this constant + */ + public java.lang.String value( + ) { + return this.value; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/FieldMappingCollectionType.java @@ -0,0 +1,147 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types; + +/** + * Enumeration FieldMappingCollectionType. + * + * @version $Revision$ $Date$ + */ +public enum FieldMappingCollectionType { + + + //------------------/ + //- Enum Constants -/ + //------------------/ + + /** + * Constant ARRAY + */ + ARRAY("array"), + /** + * Constant VECTOR + */ + VECTOR("vector"), + /** + * Constant ARRAYLIST + */ + ARRAYLIST("arraylist"), + /** + * Constant HASHTABLE + */ + HASHTABLE("hashtable"), + /** + * Constant COLLECTION + */ + COLLECTION("collection"), + /** + * Constant SET + */ + SET("set"), + /** + * Constant MAP + */ + MAP("map"), + /** + * Constant ENUMERATE + */ + ENUMERATE("enumerate"), + /** + * Constant SORTEDSET + */ + SORTEDSET("sortedset"), + /** + * Constant ITERATOR + */ + ITERATOR("iterator"), + /** + * Constant SORTEDMAP + */ + SORTEDMAP("sortedmap"); + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field value. + */ + private final java.lang.String value; + + /** + * Field enumConstants. + */ + private static final java.util.Map enumConstants = new java.util.HashMap(); + + + static { + for (FieldMappingCollectionType c: FieldMappingCollectionType.values()) { + FieldMappingCollectionType.enumConstants.put(c.value, c); + } + + }; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private FieldMappingCollectionType(final java.lang.String value) { + this.value = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method fromValue. + * + * @param value + * @return the constant for this value + */ + public static org.exolab.castor.mapping.xml.types.FieldMappingCollectionType fromValue( + final java.lang.String value) { + FieldMappingCollectionType c = FieldMappingCollectionType.enumConstants.get(value); + if (c != null) { + return c; + } + throw new IllegalArgumentException(value); + } + + /** + * + * + * @param value + */ + public void setValue( + final java.lang.String value) { + } + + /** + * Method toString. + * + * @return the value of this constant + */ + public java.lang.String toString( + ) { + return this.value; + } + + /** + * Method value. + * + * @return the value of this constant + */ + public java.lang.String value( + ) { + return this.value; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/ClassMappingAccessType.java @@ -0,0 +1,119 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types; + +/** + * Enumeration ClassMappingAccessType. + * + * @version $Revision$ $Date$ + */ +public enum ClassMappingAccessType { + + + //------------------/ + //- Enum Constants -/ + //------------------/ + + /** + * Constant READ_ONLY + */ + READ_ONLY("read-only"), + /** + * Constant SHARED + */ + SHARED("shared"), + /** + * Constant EXCLUSIVE + */ + EXCLUSIVE("exclusive"), + /** + * Constant DB_LOCKED + */ + DB_LOCKED("db-locked"); + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field value. + */ + private final java.lang.String value; + + /** + * Field enumConstants. + */ + private static final java.util.Map enumConstants = new java.util.HashMap(); + + + static { + for (ClassMappingAccessType c: ClassMappingAccessType.values()) { + ClassMappingAccessType.enumConstants.put(c.value, c); + } + + }; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private ClassMappingAccessType(final java.lang.String value) { + this.value = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method fromValue. + * + * @param value + * @return the constant for this value + */ + public static org.exolab.castor.mapping.xml.types.ClassMappingAccessType fromValue( + final java.lang.String value) { + ClassMappingAccessType c = ClassMappingAccessType.enumConstants.get(value); + if (c != null) { + return c; + } + throw new IllegalArgumentException(value); + } + + /** + * + * + * @param value + */ + public void setValue( + final java.lang.String value) { + } + + /** + * Method toString. + * + * @return the value of this constant + */ + public java.lang.String toString( + ) { + return this.value; + } + + /** + * Method value. + * + * @return the value of this constant + */ + public java.lang.String value( + ) { + return this.value; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/BindXmlAutoNamingType.java @@ -0,0 +1,111 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types; + +/** + * Enumeration BindXmlAutoNamingType. + * + * @version $Revision$ $Date$ + */ +public enum BindXmlAutoNamingType { + + + //------------------/ + //- Enum Constants -/ + //------------------/ + + /** + * Constant DERIVEBYCLASS + */ + DERIVEBYCLASS("deriveByClass"), + /** + * Constant DERIVEBYFIELD + */ + DERIVEBYFIELD("deriveByField"); + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field value. + */ + private final java.lang.String value; + + /** + * Field enumConstants. + */ + private static final java.util.Map enumConstants = new java.util.HashMap(); + + + static { + for (BindXmlAutoNamingType c: BindXmlAutoNamingType.values()) { + BindXmlAutoNamingType.enumConstants.put(c.value, c); + } + + }; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private BindXmlAutoNamingType(final java.lang.String value) { + this.value = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method fromValue. + * + * @param value + * @return the constant for this value + */ + public static org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType fromValue( + final java.lang.String value) { + BindXmlAutoNamingType c = BindXmlAutoNamingType.enumConstants.get(value); + if (c != null) { + return c; + } + throw new IllegalArgumentException(value); + } + + /** + * + * + * @param value + */ + public void setValue( + final java.lang.String value) { + } + + /** + * Method toString. + * + * @return the value of this constant + */ + public java.lang.String toString( + ) { + return this.value; + } + + /** + * Method value. + * + * @return the value of this constant + */ + public java.lang.String value( + ) { + return this.value; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/BindXmlNodeType.java @@ -0,0 +1,119 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types; + +/** + * Enumeration BindXmlNodeType. + * + * @version $Revision$ $Date$ + */ +public enum BindXmlNodeType { + + + //------------------/ + //- Enum Constants -/ + //------------------/ + + /** + * Constant ATTRIBUTE + */ + ATTRIBUTE("attribute"), + /** + * Constant ELEMENT + */ + ELEMENT("element"), + /** + * Constant NAMESPACE + */ + NAMESPACE("namespace"), + /** + * Constant TEXT + */ + TEXT("text"); + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field value. + */ + private final java.lang.String value; + + /** + * Field enumConstants. + */ + private static final java.util.Map enumConstants = new java.util.HashMap(); + + + static { + for (BindXmlNodeType c: BindXmlNodeType.values()) { + BindXmlNodeType.enumConstants.put(c.value, c); + } + + }; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private BindXmlNodeType(final java.lang.String value) { + this.value = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method fromValue. + * + * @param value + * @return the constant for this value + */ + public static org.exolab.castor.mapping.xml.types.BindXmlNodeType fromValue( + final java.lang.String value) { + BindXmlNodeType c = BindXmlNodeType.enumConstants.get(value); + if (c != null) { + return c; + } + throw new IllegalArgumentException(value); + } + + /** + * + * + * @param value + */ + public void setValue( + final java.lang.String value) { + } + + /** + * Method toString. + * + * @return the value of this constant + */ + public java.lang.String toString( + ) { + return this.value; + } + + /** + * Method value. + * + * @return the value of this constant + */ + public java.lang.String value( + ) { + return this.value; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/descriptors/BindXmlAutoNamingTypeDescriptor.java @@ -0,0 +1,162 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType; + +/** + * Class BindXmlAutoNamingTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class BindXmlAutoNamingTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public BindXmlAutoNamingTypeDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "BindXmlAutoNamingType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.types.BindXmlAutoNamingType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/descriptors/SqlDirtyTypeDescriptor.java @@ -0,0 +1,162 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.types.SqlDirtyType; + +/** + * Class SqlDirtyTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SqlDirtyTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SqlDirtyTypeDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "SqlDirtyType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.types.SqlDirtyType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/descriptors/ClassMappingAccessTypeDescriptor.java @@ -0,0 +1,162 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.types.ClassMappingAccessType; + +/** + * Class ClassMappingAccessTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ClassMappingAccessTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassMappingAccessTypeDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "ClassMappingAccessType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.types.ClassMappingAccessType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/descriptors/FieldMappingCollectionTypeDescriptor.java @@ -0,0 +1,162 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.types.FieldMappingCollectionType; + +/** + * Class FieldMappingCollectionTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FieldMappingCollectionTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldMappingCollectionTypeDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "FieldMappingCollectionType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.types.FieldMappingCollectionType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/xml/src/main/java/org/exolab/castor/mapping/xml/types/descriptors/BindXmlNodeTypeDescriptor.java @@ -0,0 +1,162 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.mapping.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.xml.types.BindXmlNodeType; + +/** + * Class BindXmlNodeTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class BindXmlNodeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public BindXmlNodeTypeDescriptor() { + super(); + _nsURI = "http://castor.exolab.org/"; + _xmlName = "BindXmlNodeType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.mapping.xml.types.BindXmlNodeType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} debian/patches/fix_debian_build.diff0000644000000000000000000006206611712417334014733 0ustar Description: Allow ant based upstream build system to work in Debian Author: Miguel Landaeta Forwarded: no Last-Update: 2012-01-21 diff --git a/anttask/build.xml b/anttask/build.xml index d3300aa..2f2263d 100644 --- a/anttask/build.xml +++ b/anttask/build.xml @@ -1,5 +1,4 @@ - + @@ -7,11 +6,13 @@ - + + @@ -19,14 +20,17 @@ + + diff --git a/codegen/build.xml b/codegen/build.xml index 3cc1442..71652f4 100644 --- a/codegen/build.xml +++ b/codegen/build.xml @@ -1,5 +1,4 @@ - + @@ -11,12 +10,14 @@ - + + @@ -24,6 +25,7 @@ + diff --git a/core/build.xml b/core/build.xml index e189839..414e770 100644 --- a/core/build.xml +++ b/core/build.xml @@ -1,5 +1,4 @@ - + @@ -10,15 +9,18 @@ - + + + diff --git a/cpa/build.xml b/cpa/build.xml index 2b32ea2..d481e01 100644 --- a/cpa/build.xml +++ b/cpa/build.xml @@ -1,5 +1,4 @@ - + @@ -9,16 +8,18 @@ - + - + + @@ -28,6 +29,7 @@ + @@ -97,6 +101,17 @@ + + + + + + + + + + diff --git a/ddlgen/build.xml b/ddlgen/build.xml index 4876ce4..2963db7 100644 --- a/ddlgen/build.xml +++ b/ddlgen/build.xml @@ -1,5 +1,4 @@ - + @@ -9,14 +8,17 @@ - + + + diff --git a/diff/build.xml b/diff/build.xml index 5e4a098..1f9bea1 100644 --- a/diff/build.xml +++ b/diff/build.xml @@ -1,5 +1,4 @@ - + @@ -10,16 +9,19 @@ - + + + diff --git a/examples/build.xml b/examples/build.xml index adfb65d..ea4535d 100644 --- a/examples/build.xml +++ b/examples/build.xml @@ -1,5 +1,4 @@ - + @@ -11,14 +10,16 @@ - - + + + diff --git a/schema/build.xml b/schema/build.xml index 7aa2944..dfc379f 100644 --- a/schema/build.xml +++ b/schema/build.xml @@ -1,5 +1,4 @@ - + @@ -11,18 +10,21 @@ - + + + diff --git a/src/build.xml b/src/build.xml index 6316674..a7babdf 100644 --- a/src/build.xml +++ b/src/build.xml @@ -2,8 +2,7 @@ - + @@ -60,9 +59,12 @@ + + @@ -84,12 +86,17 @@ + + + @@ -135,16 +142,20 @@ org/castor/jdo/**/*.java, org/castor/persist/**/*.java" /> + + @@ -305,7 +316,7 @@ includes="${castor.commons.files}"> - + @@ -318,11 +329,13 @@ + @@ -332,9 +345,11 @@ + @@ -344,6 +359,7 @@ + @@ -365,6 +382,7 @@ debug="on" encoding="ISO-8859-1" deprecation="${deprecation}" includes="${castor.jdo.files}"> + @@ -416,12 +434,10 @@ - @@ -639,7 +657,8 @@ - + - @@ -917,9 +934,11 @@ + @@ -1098,9 +1117,11 @@ + @@ -62,18 +63,22 @@ + + debian/patches/add_codegen_generated_sources.diff0000644000000000000000000157777211712417334017501 0ustar Description: add autogenerated sources to codegen module These classes were generated with castor-maven-plugin. The reason why they are not generated at build time is because castor-maven-plugin is not available in Debian since it depends on this package. When castor gets accepted in the archive, castor-maven-plugin will be packaged and when it gets accepted in the archive, this package will re rebuilt with that plugin and this patch will be removed. Author: Miguel Landaeta Forwarded: not-needed Last-Update: 2010-06-27 --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/Binding.java @@ -0,0 +1,1714 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * The root element that contains the different binding elements. + * The binding file is written from a schema point of view and + * follows the + * structure of an XML Schema. + * The root element can also be used to configure the default + * binding type. + * + * + * @version $Revision$ $Date$ + */ +public class Binding implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _defaultBindingType. + */ + private org.exolab.castor.builder.binding.xml.types.BindingType _defaultBindingType = org.exolab.castor.builder.binding.xml.types.BindingType.valueOf("element"); + + /** + * Field _includeList. + */ + private java.util.List _includeList; + + /** + * Field _packageList. + */ + private java.util.List _packageList; + + /** + * Field _namingXML. + */ + private org.exolab.castor.builder.binding.xml.NamingXMLType _namingXML; + + /** + * Field _automaticNaming. + */ + private org.exolab.castor.builder.binding.xml.AutomaticNamingType _automaticNaming; + + /** + * Field _componentBindingList. + */ + private java.util.List _componentBindingList; + + /** + * Field _elementBindingList. + */ + private java.util.List _elementBindingList; + + /** + * Field _attributeBindingList. + */ + private java.util.List _attributeBindingList; + + /** + * Field _complexTypeBindingList. + */ + private java.util.List _complexTypeBindingList; + + /** + * Field _groupBindingList. + */ + private java.util.List _groupBindingList; + + /** + * Field _enumBindingList. + */ + private java.util.List _enumBindingList; + + /** + * Field _simpleTypeBindingList. + */ + private java.util.List _simpleTypeBindingList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Binding() { + super(); + setDefaultBindingType(org.exolab.castor.builder.binding.xml.types.BindingType.valueOf("element")); + this._includeList = new java.util.ArrayList(); + this._packageList = new java.util.ArrayList(); + this._componentBindingList = new java.util.ArrayList(); + this._elementBindingList = new java.util.ArrayList(); + this._attributeBindingList = new java.util.ArrayList(); + this._complexTypeBindingList = new java.util.ArrayList(); + this._groupBindingList = new java.util.ArrayList(); + this._enumBindingList = new java.util.ArrayList(); + this._simpleTypeBindingList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vAttributeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAttributeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) + throws java.lang.IndexOutOfBoundsException { + this._attributeBindingList.add(vAttributeBinding); + } + + /** + * + * + * @param index + * @param vAttributeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAttributeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) + throws java.lang.IndexOutOfBoundsException { + this._attributeBindingList.add(index, vAttributeBinding); + } + + /** + * + * + * @param vComplexTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComplexTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._complexTypeBindingList.add(vComplexTypeBinding); + } + + /** + * + * + * @param index + * @param vComplexTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComplexTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._complexTypeBindingList.add(index, vComplexTypeBinding); + } + + /** + * + * + * @param vComponentBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComponentBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) + throws java.lang.IndexOutOfBoundsException { + this._componentBindingList.add(vComponentBinding); + } + + /** + * + * + * @param index + * @param vComponentBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComponentBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) + throws java.lang.IndexOutOfBoundsException { + this._componentBindingList.add(index, vComponentBinding); + } + + /** + * + * + * @param vElementBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addElementBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) + throws java.lang.IndexOutOfBoundsException { + this._elementBindingList.add(vElementBinding); + } + + /** + * + * + * @param index + * @param vElementBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addElementBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) + throws java.lang.IndexOutOfBoundsException { + this._elementBindingList.add(index, vElementBinding); + } + + /** + * + * + * @param vEnumBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addEnumBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) + throws java.lang.IndexOutOfBoundsException { + this._enumBindingList.add(vEnumBinding); + } + + /** + * + * + * @param index + * @param vEnumBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addEnumBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) + throws java.lang.IndexOutOfBoundsException { + this._enumBindingList.add(index, vEnumBinding); + } + + /** + * + * + * @param vGroupBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addGroupBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) + throws java.lang.IndexOutOfBoundsException { + this._groupBindingList.add(vGroupBinding); + } + + /** + * + * + * @param index + * @param vGroupBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addGroupBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) + throws java.lang.IndexOutOfBoundsException { + this._groupBindingList.add(index, vGroupBinding); + } + + /** + * + * + * @param vInclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addInclude( + final org.exolab.castor.builder.binding.xml.IncludeType vInclude) + throws java.lang.IndexOutOfBoundsException { + this._includeList.add(vInclude); + } + + /** + * + * + * @param index + * @param vInclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addInclude( + final int index, + final org.exolab.castor.builder.binding.xml.IncludeType vInclude) + throws java.lang.IndexOutOfBoundsException { + this._includeList.add(index, vInclude); + } + + /** + * + * + * @param vPackage + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addPackage( + final org.exolab.castor.builder.binding.xml.PackageType vPackage) + throws java.lang.IndexOutOfBoundsException { + this._packageList.add(vPackage); + } + + /** + * + * + * @param index + * @param vPackage + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addPackage( + final int index, + final org.exolab.castor.builder.binding.xml.PackageType vPackage) + throws java.lang.IndexOutOfBoundsException { + this._packageList.add(index, vPackage); + } + + /** + * + * + * @param vSimpleTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addSimpleTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._simpleTypeBindingList.add(vSimpleTypeBinding); + } + + /** + * + * + * @param index + * @param vSimpleTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addSimpleTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._simpleTypeBindingList.add(index, vSimpleTypeBinding); + } + + /** + * Method enumerateAttributeBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateAttributeBinding( + ) { + return java.util.Collections.enumeration(this._attributeBindingList); + } + + /** + * Method enumerateComplexTypeBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateComplexTypeBinding( + ) { + return java.util.Collections.enumeration(this._complexTypeBindingList); + } + + /** + * Method enumerateComponentBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateComponentBinding( + ) { + return java.util.Collections.enumeration(this._componentBindingList); + } + + /** + * Method enumerateElementBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateElementBinding( + ) { + return java.util.Collections.enumeration(this._elementBindingList); + } + + /** + * Method enumerateEnumBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateEnumBinding( + ) { + return java.util.Collections.enumeration(this._enumBindingList); + } + + /** + * Method enumerateGroupBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateGroupBinding( + ) { + return java.util.Collections.enumeration(this._groupBindingList); + } + + /** + * Method enumerateInclude. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateInclude( + ) { + return java.util.Collections.enumeration(this._includeList); + } + + /** + * Method enumeratePackage. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumeratePackage( + ) { + return java.util.Collections.enumeration(this._packageList); + } + + /** + * Method enumerateSimpleTypeBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateSimpleTypeBinding( + ) { + return java.util.Collections.enumeration(this._simpleTypeBindingList); + } + + /** + * Method getAttributeBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getAttributeBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._attributeBindingList.size()) { + throw new IndexOutOfBoundsException("getAttributeBinding: Index value '" + index + "' not in range [0.." + (this._attributeBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _attributeBindingList.get(index); + } + + /** + * Method getAttributeBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getAttributeBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._attributeBindingList.toArray(array); + } + + /** + * Method getAttributeBindingCount. + * + * @return the size of this collection + */ + public int getAttributeBindingCount( + ) { + return this._attributeBindingList.size(); + } + + /** + * Returns the value of field 'automaticNaming'. + * + * @return the value of field 'AutomaticNaming'. + */ + public org.exolab.castor.builder.binding.xml.AutomaticNamingType getAutomaticNaming( + ) { + return this._automaticNaming; + } + + /** + * Method getComplexTypeBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getComplexTypeBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._complexTypeBindingList.size()) { + throw new IndexOutOfBoundsException("getComplexTypeBinding: Index value '" + index + "' not in range [0.." + (this._complexTypeBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _complexTypeBindingList.get(index); + } + + /** + * Method getComplexTypeBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getComplexTypeBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._complexTypeBindingList.toArray(array); + } + + /** + * Method getComplexTypeBindingCount. + * + * @return the size of this collection + */ + public int getComplexTypeBindingCount( + ) { + return this._complexTypeBindingList.size(); + } + + /** + * Method getComponentBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getComponentBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._componentBindingList.size()) { + throw new IndexOutOfBoundsException("getComponentBinding: Index value '" + index + "' not in range [0.." + (this._componentBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _componentBindingList.get(index); + } + + /** + * Method getComponentBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getComponentBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._componentBindingList.toArray(array); + } + + /** + * Method getComponentBindingCount. + * + * @return the size of this collection + */ + public int getComponentBindingCount( + ) { + return this._componentBindingList.size(); + } + + /** + * Returns the value of field 'defaultBindingType'. + * + * @return the value of field 'DefaultBindingType'. + */ + public org.exolab.castor.builder.binding.xml.types.BindingType getDefaultBindingType( + ) { + return this._defaultBindingType; + } + + /** + * Method getElementBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getElementBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._elementBindingList.size()) { + throw new IndexOutOfBoundsException("getElementBinding: Index value '" + index + "' not in range [0.." + (this._elementBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _elementBindingList.get(index); + } + + /** + * Method getElementBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getElementBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._elementBindingList.toArray(array); + } + + /** + * Method getElementBindingCount. + * + * @return the size of this collection + */ + public int getElementBindingCount( + ) { + return this._elementBindingList.size(); + } + + /** + * Method getEnumBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getEnumBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._enumBindingList.size()) { + throw new IndexOutOfBoundsException("getEnumBinding: Index value '" + index + "' not in range [0.." + (this._enumBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _enumBindingList.get(index); + } + + /** + * Method getEnumBinding.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getEnumBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._enumBindingList.toArray(array); + } + + /** + * Method getEnumBindingCount. + * + * @return the size of this collection + */ + public int getEnumBindingCount( + ) { + return this._enumBindingList.size(); + } + + /** + * Method getGroupBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getGroupBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._groupBindingList.size()) { + throw new IndexOutOfBoundsException("getGroupBinding: Index value '" + index + "' not in range [0.." + (this._groupBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _groupBindingList.get(index); + } + + /** + * Method getGroupBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getGroupBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._groupBindingList.toArray(array); + } + + /** + * Method getGroupBindingCount. + * + * @return the size of this collection + */ + public int getGroupBindingCount( + ) { + return this._groupBindingList.size(); + } + + /** + * Method getInclude. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.IncludeType at the + * given index + */ + public org.exolab.castor.builder.binding.xml.IncludeType getInclude( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._includeList.size()) { + throw new IndexOutOfBoundsException("getInclude: Index value '" + index + "' not in range [0.." + (this._includeList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.IncludeType) _includeList.get(index); + } + + /** + * Method getInclude.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.IncludeType[] getInclude( + ) { + org.exolab.castor.builder.binding.xml.IncludeType[] array = new org.exolab.castor.builder.binding.xml.IncludeType[0]; + return (org.exolab.castor.builder.binding.xml.IncludeType[]) this._includeList.toArray(array); + } + + /** + * Method getIncludeCount. + * + * @return the size of this collection + */ + public int getIncludeCount( + ) { + return this._includeList.size(); + } + + /** + * Returns the value of field 'namingXML'. + * + * @return the value of field 'NamingXML'. + */ + public org.exolab.castor.builder.binding.xml.NamingXMLType getNamingXML( + ) { + return this._namingXML; + } + + /** + * Method getPackage. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.PackageType at the + * given index + */ + public org.exolab.castor.builder.binding.xml.PackageType getPackage( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._packageList.size()) { + throw new IndexOutOfBoundsException("getPackage: Index value '" + index + "' not in range [0.." + (this._packageList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.PackageType) _packageList.get(index); + } + + /** + * Method getPackage.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.PackageType[] getPackage( + ) { + org.exolab.castor.builder.binding.xml.PackageType[] array = new org.exolab.castor.builder.binding.xml.PackageType[0]; + return (org.exolab.castor.builder.binding.xml.PackageType[]) this._packageList.toArray(array); + } + + /** + * Method getPackageCount. + * + * @return the size of this collection + */ + public int getPackageCount( + ) { + return this._packageList.size(); + } + + /** + * Method getSimpleTypeBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getSimpleTypeBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._simpleTypeBindingList.size()) { + throw new IndexOutOfBoundsException("getSimpleTypeBinding: Index value '" + index + "' not in range [0.." + (this._simpleTypeBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _simpleTypeBindingList.get(index); + } + + /** + * Method getSimpleTypeBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getSimpleTypeBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._simpleTypeBindingList.toArray(array); + } + + /** + * Method getSimpleTypeBindingCount. + * + * @return the size of this collection + */ + public int getSimpleTypeBindingCount( + ) { + return this._simpleTypeBindingList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateAttributeBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateAttributeBinding( + ) { + return this._attributeBindingList.iterator(); + } + + /** + * Method iterateComplexTypeBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateComplexTypeBinding( + ) { + return this._complexTypeBindingList.iterator(); + } + + /** + * Method iterateComponentBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateComponentBinding( + ) { + return this._componentBindingList.iterator(); + } + + /** + * Method iterateElementBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateElementBinding( + ) { + return this._elementBindingList.iterator(); + } + + /** + * Method iterateEnumBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateEnumBinding( + ) { + return this._enumBindingList.iterator(); + } + + /** + * Method iterateGroupBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateGroupBinding( + ) { + return this._groupBindingList.iterator(); + } + + /** + * Method iterateInclude. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateInclude( + ) { + return this._includeList.iterator(); + } + + /** + * Method iteratePackage. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iteratePackage( + ) { + return this._packageList.iterator(); + } + + /** + * Method iterateSimpleTypeBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateSimpleTypeBinding( + ) { + return this._simpleTypeBindingList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllAttributeBinding( + ) { + this._attributeBindingList.clear(); + } + + /** + */ + public void removeAllComplexTypeBinding( + ) { + this._complexTypeBindingList.clear(); + } + + /** + */ + public void removeAllComponentBinding( + ) { + this._componentBindingList.clear(); + } + + /** + */ + public void removeAllElementBinding( + ) { + this._elementBindingList.clear(); + } + + /** + */ + public void removeAllEnumBinding( + ) { + this._enumBindingList.clear(); + } + + /** + */ + public void removeAllGroupBinding( + ) { + this._groupBindingList.clear(); + } + + /** + */ + public void removeAllInclude( + ) { + this._includeList.clear(); + } + + /** + */ + public void removeAllPackage( + ) { + this._packageList.clear(); + } + + /** + */ + public void removeAllSimpleTypeBinding( + ) { + this._simpleTypeBindingList.clear(); + } + + /** + * Method removeAttributeBinding. + * + * @param vAttributeBinding + * @return true if the object was removed from the collection. + */ + public boolean removeAttributeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) { + boolean removed = _attributeBindingList.remove(vAttributeBinding); + return removed; + } + + /** + * Method removeAttributeBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeAttributeBindingAt( + final int index) { + java.lang.Object obj = this._attributeBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeComplexTypeBinding. + * + * @param vComplexTypeBinding + * @return true if the object was removed from the collection. + */ + public boolean removeComplexTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) { + boolean removed = _complexTypeBindingList.remove(vComplexTypeBinding); + return removed; + } + + /** + * Method removeComplexTypeBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeComplexTypeBindingAt( + final int index) { + java.lang.Object obj = this._complexTypeBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeComponentBinding. + * + * @param vComponentBinding + * @return true if the object was removed from the collection. + */ + public boolean removeComponentBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) { + boolean removed = _componentBindingList.remove(vComponentBinding); + return removed; + } + + /** + * Method removeComponentBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeComponentBindingAt( + final int index) { + java.lang.Object obj = this._componentBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeElementBinding. + * + * @param vElementBinding + * @return true if the object was removed from the collection. + */ + public boolean removeElementBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) { + boolean removed = _elementBindingList.remove(vElementBinding); + return removed; + } + + /** + * Method removeElementBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeElementBindingAt( + final int index) { + java.lang.Object obj = this._elementBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeEnumBinding. + * + * @param vEnumBinding + * @return true if the object was removed from the collection. + */ + public boolean removeEnumBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) { + boolean removed = _enumBindingList.remove(vEnumBinding); + return removed; + } + + /** + * Method removeEnumBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeEnumBindingAt( + final int index) { + java.lang.Object obj = this._enumBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeGroupBinding. + * + * @param vGroupBinding + * @return true if the object was removed from the collection. + */ + public boolean removeGroupBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) { + boolean removed = _groupBindingList.remove(vGroupBinding); + return removed; + } + + /** + * Method removeGroupBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeGroupBindingAt( + final int index) { + java.lang.Object obj = this._groupBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeInclude. + * + * @param vInclude + * @return true if the object was removed from the collection. + */ + public boolean removeInclude( + final org.exolab.castor.builder.binding.xml.IncludeType vInclude) { + boolean removed = _includeList.remove(vInclude); + return removed; + } + + /** + * Method removeIncludeAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.IncludeType removeIncludeAt( + final int index) { + java.lang.Object obj = this._includeList.remove(index); + return (org.exolab.castor.builder.binding.xml.IncludeType) obj; + } + + /** + * Method removePackage. + * + * @param vPackage + * @return true if the object was removed from the collection. + */ + public boolean removePackage( + final org.exolab.castor.builder.binding.xml.PackageType vPackage) { + boolean removed = _packageList.remove(vPackage); + return removed; + } + + /** + * Method removePackageAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.PackageType removePackageAt( + final int index) { + java.lang.Object obj = this._packageList.remove(index); + return (org.exolab.castor.builder.binding.xml.PackageType) obj; + } + + /** + * Method removeSimpleTypeBinding. + * + * @param vSimpleTypeBinding + * @return true if the object was removed from the collection. + */ + public boolean removeSimpleTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) { + boolean removed = _simpleTypeBindingList.remove(vSimpleTypeBinding); + return removed; + } + + /** + * Method removeSimpleTypeBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeSimpleTypeBindingAt( + final int index) { + java.lang.Object obj = this._simpleTypeBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * + * + * @param index + * @param vAttributeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAttributeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._attributeBindingList.size()) { + throw new IndexOutOfBoundsException("setAttributeBinding: Index value '" + index + "' not in range [0.." + (this._attributeBindingList.size() - 1) + "]"); + } + + this._attributeBindingList.set(index, vAttributeBinding); + } + + /** + * + * + * @param vAttributeBindingArray + */ + public void setAttributeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vAttributeBindingArray) { + //-- copy array + _attributeBindingList.clear(); + + for (int i = 0; i < vAttributeBindingArray.length; i++) { + this._attributeBindingList.add(vAttributeBindingArray[i]); + } + } + + /** + * Sets the value of field 'automaticNaming'. + * + * @param automaticNaming the value of field 'automaticNaming'. + */ + public void setAutomaticNaming( + final org.exolab.castor.builder.binding.xml.AutomaticNamingType automaticNaming) { + this._automaticNaming = automaticNaming; + } + + /** + * + * + * @param index + * @param vComplexTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setComplexTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._complexTypeBindingList.size()) { + throw new IndexOutOfBoundsException("setComplexTypeBinding: Index value '" + index + "' not in range [0.." + (this._complexTypeBindingList.size() - 1) + "]"); + } + + this._complexTypeBindingList.set(index, vComplexTypeBinding); + } + + /** + * + * + * @param vComplexTypeBindingArray + */ + public void setComplexTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vComplexTypeBindingArray) { + //-- copy array + _complexTypeBindingList.clear(); + + for (int i = 0; i < vComplexTypeBindingArray.length; i++) { + this._complexTypeBindingList.add(vComplexTypeBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vComponentBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setComponentBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._componentBindingList.size()) { + throw new IndexOutOfBoundsException("setComponentBinding: Index value '" + index + "' not in range [0.." + (this._componentBindingList.size() - 1) + "]"); + } + + this._componentBindingList.set(index, vComponentBinding); + } + + /** + * + * + * @param vComponentBindingArray + */ + public void setComponentBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vComponentBindingArray) { + //-- copy array + _componentBindingList.clear(); + + for (int i = 0; i < vComponentBindingArray.length; i++) { + this._componentBindingList.add(vComponentBindingArray[i]); + } + } + + /** + * Sets the value of field 'defaultBindingType'. + * + * @param defaultBindingType the value of field + * 'defaultBindingType'. + */ + public void setDefaultBindingType( + final org.exolab.castor.builder.binding.xml.types.BindingType defaultBindingType) { + this._defaultBindingType = defaultBindingType; + } + + /** + * + * + * @param index + * @param vElementBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setElementBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._elementBindingList.size()) { + throw new IndexOutOfBoundsException("setElementBinding: Index value '" + index + "' not in range [0.." + (this._elementBindingList.size() - 1) + "]"); + } + + this._elementBindingList.set(index, vElementBinding); + } + + /** + * + * + * @param vElementBindingArray + */ + public void setElementBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vElementBindingArray) { + //-- copy array + _elementBindingList.clear(); + + for (int i = 0; i < vElementBindingArray.length; i++) { + this._elementBindingList.add(vElementBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vEnumBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setEnumBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._enumBindingList.size()) { + throw new IndexOutOfBoundsException("setEnumBinding: Index value '" + index + "' not in range [0.." + (this._enumBindingList.size() - 1) + "]"); + } + + this._enumBindingList.set(index, vEnumBinding); + } + + /** + * + * + * @param vEnumBindingArray + */ + public void setEnumBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vEnumBindingArray) { + //-- copy array + _enumBindingList.clear(); + + for (int i = 0; i < vEnumBindingArray.length; i++) { + this._enumBindingList.add(vEnumBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vGroupBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setGroupBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._groupBindingList.size()) { + throw new IndexOutOfBoundsException("setGroupBinding: Index value '" + index + "' not in range [0.." + (this._groupBindingList.size() - 1) + "]"); + } + + this._groupBindingList.set(index, vGroupBinding); + } + + /** + * + * + * @param vGroupBindingArray + */ + public void setGroupBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vGroupBindingArray) { + //-- copy array + _groupBindingList.clear(); + + for (int i = 0; i < vGroupBindingArray.length; i++) { + this._groupBindingList.add(vGroupBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vInclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setInclude( + final int index, + final org.exolab.castor.builder.binding.xml.IncludeType vInclude) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._includeList.size()) { + throw new IndexOutOfBoundsException("setInclude: Index value '" + index + "' not in range [0.." + (this._includeList.size() - 1) + "]"); + } + + this._includeList.set(index, vInclude); + } + + /** + * + * + * @param vIncludeArray + */ + public void setInclude( + final org.exolab.castor.builder.binding.xml.IncludeType[] vIncludeArray) { + //-- copy array + _includeList.clear(); + + for (int i = 0; i < vIncludeArray.length; i++) { + this._includeList.add(vIncludeArray[i]); + } + } + + /** + * Sets the value of field 'namingXML'. + * + * @param namingXML the value of field 'namingXML'. + */ + public void setNamingXML( + final org.exolab.castor.builder.binding.xml.NamingXMLType namingXML) { + this._namingXML = namingXML; + } + + /** + * + * + * @param index + * @param vPackage + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setPackage( + final int index, + final org.exolab.castor.builder.binding.xml.PackageType vPackage) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._packageList.size()) { + throw new IndexOutOfBoundsException("setPackage: Index value '" + index + "' not in range [0.." + (this._packageList.size() - 1) + "]"); + } + + this._packageList.set(index, vPackage); + } + + /** + * + * + * @param vPackageArray + */ + public void setPackage( + final org.exolab.castor.builder.binding.xml.PackageType[] vPackageArray) { + //-- copy array + _packageList.clear(); + + for (int i = 0; i < vPackageArray.length; i++) { + this._packageList.add(vPackageArray[i]); + } + } + + /** + * + * + * @param index + * @param vSimpleTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setSimpleTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._simpleTypeBindingList.size()) { + throw new IndexOutOfBoundsException("setSimpleTypeBinding: Index value '" + index + "' not in range [0.." + (this._simpleTypeBindingList.size() - 1) + "]"); + } + + this._simpleTypeBindingList.set(index, vSimpleTypeBinding); + } + + /** + * + * + * @param vSimpleTypeBindingArray + */ + public void setSimpleTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vSimpleTypeBindingArray) { + //-- copy array + _simpleTypeBindingList.clear(); + + for (int i = 0; i < vSimpleTypeBindingArray.length; i++) { + this._simpleTypeBindingList.add(vSimpleTypeBindingArray[i]); + } + } + + /** + * Method unmarshalBinding. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.Binding + */ + public static org.exolab.castor.builder.binding.xml.Binding unmarshalBinding( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.Binding) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.Binding.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/Excludes.java @@ -0,0 +1,281 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class Excludes. + * + * @version $Revision$ $Date$ + */ +public class Excludes implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _excludeList. + */ + private java.util.List _excludeList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Excludes() { + super(); + this._excludeList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vExclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addExclude( + final org.exolab.castor.builder.binding.xml.Exclude vExclude) + throws java.lang.IndexOutOfBoundsException { + this._excludeList.add(vExclude); + } + + /** + * + * + * @param index + * @param vExclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addExclude( + final int index, + final org.exolab.castor.builder.binding.xml.Exclude vExclude) + throws java.lang.IndexOutOfBoundsException { + this._excludeList.add(index, vExclude); + } + + /** + * Method enumerateExclude. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateExclude( + ) { + return java.util.Collections.enumeration(this._excludeList); + } + + /** + * Method getExclude. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.Exclude at the given + * index + */ + public org.exolab.castor.builder.binding.xml.Exclude getExclude( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._excludeList.size()) { + throw new IndexOutOfBoundsException("getExclude: Index value '" + index + "' not in range [0.." + (this._excludeList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.Exclude) _excludeList.get(index); + } + + /** + * Method getExclude.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.Exclude[] getExclude( + ) { + org.exolab.castor.builder.binding.xml.Exclude[] array = new org.exolab.castor.builder.binding.xml.Exclude[0]; + return (org.exolab.castor.builder.binding.xml.Exclude[]) this._excludeList.toArray(array); + } + + /** + * Method getExcludeCount. + * + * @return the size of this collection + */ + public int getExcludeCount( + ) { + return this._excludeList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateExclude. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateExclude( + ) { + return this._excludeList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllExclude( + ) { + this._excludeList.clear(); + } + + /** + * Method removeExclude. + * + * @param vExclude + * @return true if the object was removed from the collection. + */ + public boolean removeExclude( + final org.exolab.castor.builder.binding.xml.Exclude vExclude) { + boolean removed = _excludeList.remove(vExclude); + return removed; + } + + /** + * Method removeExcludeAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.Exclude removeExcludeAt( + final int index) { + java.lang.Object obj = this._excludeList.remove(index); + return (org.exolab.castor.builder.binding.xml.Exclude) obj; + } + + /** + * + * + * @param index + * @param vExclude + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setExclude( + final int index, + final org.exolab.castor.builder.binding.xml.Exclude vExclude) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._excludeList.size()) { + throw new IndexOutOfBoundsException("setExclude: Index value '" + index + "' not in range [0.." + (this._excludeList.size() - 1) + "]"); + } + + this._excludeList.set(index, vExclude); + } + + /** + * + * + * @param vExcludeArray + */ + public void setExclude( + final org.exolab.castor.builder.binding.xml.Exclude[] vExcludeArray) { + //-- copy array + _excludeList.clear(); + + for (int i = 0; i < vExcludeArray.length; i++) { + this._excludeList.add(vExcludeArray[i]); + } + } + + /** + * Method unmarshalExcludes. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.Excludes + */ + public static org.exolab.castor.builder.binding.xml.Excludes unmarshalExcludes( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.Excludes) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.Excludes.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/EnumClassName.java @@ -0,0 +1,175 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class EnumClassName. + * + * @version $Revision$ $Date$ + */ +public class EnumClassName implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private java.lang.String _content = ""; + + /** + * Field _package. + */ + private java.lang.String _package; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public EnumClassName() { + super(); + setContent(""); + } + + public EnumClassName(final java.lang.String defaultValue) { + try { + setContent( new java.lang.String(defaultValue)); + } catch(Exception e) { + throw new RuntimeException("Unable to cast default value for simple content!"); + } + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return the value of field 'Content'. + */ + public java.lang.String getContent( + ) { + return this._content; + } + + /** + * Returns the value of field 'package'. + * + * @return the value of field 'Package'. + */ + public java.lang.String getPackage( + ) { + return this._package; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent( + final java.lang.String content) { + this._content = content; + } + + /** + * Sets the value of field 'package'. + * + * @param _package + * @param package the value of field 'package'. + */ + public void setPackage( + final java.lang.String _package) { + this._package = _package; + } + + /** + * Method unmarshalEnumClassName. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.EnumClassName + */ + public static org.exolab.castor.builder.binding.xml.EnumClassName unmarshalEnumClassName( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.EnumClassName) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.EnumClassName.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/AutomaticNamingType.java @@ -0,0 +1,163 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class AutomaticNamingType. + * + * @version $Revision$ $Date$ + */ +public class AutomaticNamingType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _forces. + */ + private org.exolab.castor.builder.binding.xml.Forces _forces; + + /** + * Field _excludes. + */ + private org.exolab.castor.builder.binding.xml.Excludes _excludes; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AutomaticNamingType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'excludes'. + * + * @return the value of field 'Excludes'. + */ + public org.exolab.castor.builder.binding.xml.Excludes getExcludes( + ) { + return this._excludes; + } + + /** + * Returns the value of field 'forces'. + * + * @return the value of field 'Forces'. + */ + public org.exolab.castor.builder.binding.xml.Forces getForces( + ) { + return this._forces; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'excludes'. + * + * @param excludes the value of field 'excludes'. + */ + public void setExcludes( + final org.exolab.castor.builder.binding.xml.Excludes excludes) { + this._excludes = excludes; + } + + /** + * Sets the value of field 'forces'. + * + * @param forces the value of field 'forces'. + */ + public void setForces( + final org.exolab.castor.builder.binding.xml.Forces forces) { + this._forces = forces; + } + + /** + * Method unmarshalAutomaticNamingType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.AutomaticNamingType + */ + public static org.exolab.castor.builder.binding.xml.AutomaticNamingType unmarshalAutomaticNamingType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.AutomaticNamingType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.AutomaticNamingType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/.castor.cdr @@ -0,0 +1,20 @@ +#Sat Jun 12 20:25:04 VET 2010 +org.exolab.castor.builder.binding.xml.Excludes=org.exolab.castor.builder.binding.xml.descriptors.ExcludesDescriptor +org.exolab.castor.builder.binding.xml.NamingType=org.exolab.castor.builder.binding.xml.descriptors.NamingTypeDescriptor +org.exolab.castor.builder.binding.xml.FieldType=org.exolab.castor.builder.binding.xml.descriptors.FieldTypeDescriptor +org.exolab.castor.builder.binding.xml.EnumClassName=org.exolab.castor.builder.binding.xml.descriptors.EnumClassNameDescriptor +org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice=org.exolab.castor.builder.binding.xml.descriptors.ComponentBindingTypeChoiceDescriptor +org.exolab.castor.builder.binding.xml.EnumBindingType=org.exolab.castor.builder.binding.xml.descriptors.EnumBindingTypeDescriptor +org.exolab.castor.builder.binding.xml.ClassType=org.exolab.castor.builder.binding.xml.descriptors.ClassTypeDescriptor +org.exolab.castor.builder.binding.xml.ComponentBindingType=org.exolab.castor.builder.binding.xml.descriptors.ComponentBindingTypeDescriptor +org.exolab.castor.builder.binding.xml.Exclude=org.exolab.castor.builder.binding.xml.descriptors.ExcludeDescriptor +org.exolab.castor.builder.binding.xml.NamingXMLType=org.exolab.castor.builder.binding.xml.descriptors.NamingXMLTypeDescriptor +org.exolab.castor.builder.binding.xml.Binding=org.exolab.castor.builder.binding.xml.descriptors.BindingDescriptor +org.exolab.castor.builder.binding.xml.ContentMemberType=org.exolab.castor.builder.binding.xml.descriptors.ContentMemberTypeDescriptor +org.exolab.castor.builder.binding.xml.PackageTypeChoice=org.exolab.castor.builder.binding.xml.descriptors.PackageTypeChoiceDescriptor +org.exolab.castor.builder.binding.xml.Interface=org.exolab.castor.builder.binding.xml.descriptors.InterfaceDescriptor +org.exolab.castor.builder.binding.xml.IncludeType=org.exolab.castor.builder.binding.xml.descriptors.IncludeTypeDescriptor +org.exolab.castor.builder.binding.xml.Forces=org.exolab.castor.builder.binding.xml.descriptors.ForcesDescriptor +org.exolab.castor.builder.binding.xml.AutomaticNamingType=org.exolab.castor.builder.binding.xml.descriptors.AutomaticNamingTypeDescriptor +org.exolab.castor.builder.binding.xml.PackageType=org.exolab.castor.builder.binding.xml.descriptors.PackageTypeDescriptor +org.exolab.castor.builder.binding.xml.EnumMember=org.exolab.castor.builder.binding.xml.descriptors.EnumMemberDescriptor --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/EnumMember.java @@ -0,0 +1,163 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class EnumMember. + * + * @version $Revision$ $Date$ + */ +public class EnumMember implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _value. + */ + private java.lang.String _value; + + /** + * Field _javaName. + */ + private java.lang.String _javaName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public EnumMember() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'javaName'. + * + * @return the value of field 'JavaName'. + */ + public java.lang.String getJavaName( + ) { + return this._javaName; + } + + /** + * Returns the value of field 'value'. + * + * @return the value of field 'Value'. + */ + public java.lang.String getValue( + ) { + return this._value; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'javaName'. + * + * @param javaName the value of field 'javaName'. + */ + public void setJavaName( + final java.lang.String javaName) { + this._javaName = javaName; + } + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue( + final java.lang.String value) { + this._value = value; + } + + /** + * Method unmarshalEnumMember. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.EnumMember + */ + public static org.exolab.castor.builder.binding.xml.EnumMember unmarshalEnumMember( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.EnumMember) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.EnumMember.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/ComponentBindingTypeChoice.java @@ -0,0 +1,239 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class ComponentBindingTypeChoice. + * + * @version $Revision$ $Date$ + */ +public class ComponentBindingTypeChoice implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _javaClass. + */ + private org.exolab.castor.builder.binding.xml.ClassType _javaClass; + + /** + * Field _interface. + */ + private org.exolab.castor.builder.binding.xml.Interface _interface; + + /** + * Field _member. + */ + private org.exolab.castor.builder.binding.xml.FieldType _member; + + /** + * Field _enumDef. + */ + private org.exolab.castor.builder.binding.xml.EnumBindingType _enumDef; + + /** + * Field _contentMember. + */ + private org.exolab.castor.builder.binding.xml.ContentMemberType _contentMember; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ComponentBindingTypeChoice() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'contentMember'. + * + * @return the value of field 'ContentMember'. + */ + public org.exolab.castor.builder.binding.xml.ContentMemberType getContentMember( + ) { + return this._contentMember; + } + + /** + * Returns the value of field 'enumDef'. + * + * @return the value of field 'EnumDef'. + */ + public org.exolab.castor.builder.binding.xml.EnumBindingType getEnumDef( + ) { + return this._enumDef; + } + + /** + * Returns the value of field 'interface'. + * + * @return the value of field 'Interface'. + */ + public org.exolab.castor.builder.binding.xml.Interface getInterface( + ) { + return this._interface; + } + + /** + * Returns the value of field 'javaClass'. + * + * @return the value of field 'JavaClass'. + */ + public org.exolab.castor.builder.binding.xml.ClassType getJavaClass( + ) { + return this._javaClass; + } + + /** + * Returns the value of field 'member'. + * + * @return the value of field 'Member'. + */ + public org.exolab.castor.builder.binding.xml.FieldType getMember( + ) { + return this._member; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'contentMember'. + * + * @param contentMember the value of field 'contentMember'. + */ + public void setContentMember( + final org.exolab.castor.builder.binding.xml.ContentMemberType contentMember) { + this._contentMember = contentMember; + } + + /** + * Sets the value of field 'enumDef'. + * + * @param enumDef the value of field 'enumDef'. + */ + public void setEnumDef( + final org.exolab.castor.builder.binding.xml.EnumBindingType enumDef) { + this._enumDef = enumDef; + } + + /** + * Sets the value of field 'interface'. + * + * @param _interface + * @param interface the value of field 'interface'. + */ + public void setInterface( + final org.exolab.castor.builder.binding.xml.Interface _interface) { + this._interface = _interface; + } + + /** + * Sets the value of field 'javaClass'. + * + * @param javaClass the value of field 'javaClass'. + */ + public void setJavaClass( + final org.exolab.castor.builder.binding.xml.ClassType javaClass) { + this._javaClass = javaClass; + } + + /** + * Sets the value of field 'member'. + * + * @param member the value of field 'member'. + */ + public void setMember( + final org.exolab.castor.builder.binding.xml.FieldType member) { + this._member = member; + } + + /** + * Method unmarshalComponentBindingTypeChoice. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice + */ + public static org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice unmarshalComponentBindingTypeChoice( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/Exclude.java @@ -0,0 +1,163 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class Exclude. + * + * @version $Revision$ $Date$ + */ +public class Exclude implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _className. + */ + private java.lang.String _className; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Exclude() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'className'. + * + * @return the value of field 'ClassName'. + */ + public java.lang.String getClassName( + ) { + return this._className; + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'className'. + * + * @param className the value of field 'className'. + */ + public void setClassName( + final java.lang.String className) { + this._className = className; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshalExclude. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.Exclude + */ + public static org.exolab.castor.builder.binding.xml.Exclude unmarshalExclude( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.Exclude) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.Exclude.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/Interface.java @@ -0,0 +1,138 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class Interface. + * + * @version $Revision$ $Date$ + */ +public class Interface implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Interface() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshalInterface. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.Interface + */ + public static org.exolab.castor.builder.binding.xml.Interface unmarshalInterface( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.Interface) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.Interface.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/ContentMemberType.java @@ -0,0 +1,168 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * This type represents the binding for the 'content' member + * generated + * as part of a 'mixed' complex type definition. It allows the + * definition + * of its name. + * + * + * @version $Revision$ $Date$ + */ +public class ContentMemberType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _visibility. + */ + private org.exolab.castor.builder.binding.xml.types.VisibilityType _visibility; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ContentMemberType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'visibility'. + * + * @return the value of field 'Visibility'. + */ + public org.exolab.castor.builder.binding.xml.types.VisibilityType getVisibility( + ) { + return this._visibility; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'visibility'. + * + * @param visibility the value of field 'visibility'. + */ + public void setVisibility( + final org.exolab.castor.builder.binding.xml.types.VisibilityType visibility) { + this._visibility = visibility; + } + + /** + * Method unmarshalContentMemberType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.ContentMemberType + */ + public static org.exolab.castor.builder.binding.xml.ContentMemberType unmarshalContentMemberType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.ContentMemberType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.ContentMemberType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/NamingXMLType.java @@ -0,0 +1,195 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * This element allows to define naming convention when naming a + * complexType, element or + * modelGroup. Indeed the user can decide of a prefix to add to + * each class name as well + * as a suffix. This naming style won't affect the names entered + * in the binding file but only + * the XML Names. + * + * + * @version $Revision$ $Date$ + */ +public class NamingXMLType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementName. + */ + private org.exolab.castor.builder.binding.xml.NamingType _elementName; + + /** + * Field _complexTypeName. + */ + private org.exolab.castor.builder.binding.xml.NamingType _complexTypeName; + + /** + * Field _modelGroupName. + */ + private org.exolab.castor.builder.binding.xml.NamingType _modelGroupName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamingXMLType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'complexTypeName'. + * + * @return the value of field 'ComplexTypeName'. + */ + public org.exolab.castor.builder.binding.xml.NamingType getComplexTypeName( + ) { + return this._complexTypeName; + } + + /** + * Returns the value of field 'elementName'. + * + * @return the value of field 'ElementName'. + */ + public org.exolab.castor.builder.binding.xml.NamingType getElementName( + ) { + return this._elementName; + } + + /** + * Returns the value of field 'modelGroupName'. + * + * @return the value of field 'ModelGroupName'. + */ + public org.exolab.castor.builder.binding.xml.NamingType getModelGroupName( + ) { + return this._modelGroupName; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'complexTypeName'. + * + * @param complexTypeName the value of field 'complexTypeName'. + */ + public void setComplexTypeName( + final org.exolab.castor.builder.binding.xml.NamingType complexTypeName) { + this._complexTypeName = complexTypeName; + } + + /** + * Sets the value of field 'elementName'. + * + * @param elementName the value of field 'elementName'. + */ + public void setElementName( + final org.exolab.castor.builder.binding.xml.NamingType elementName) { + this._elementName = elementName; + } + + /** + * Sets the value of field 'modelGroupName'. + * + * @param modelGroupName the value of field 'modelGroupName'. + */ + public void setModelGroupName( + final org.exolab.castor.builder.binding.xml.NamingType modelGroupName) { + this._modelGroupName = modelGroupName; + } + + /** + * Method unmarshalNamingXMLType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.NamingXMLType + */ + public static org.exolab.castor.builder.binding.xml.NamingXMLType unmarshalNamingXMLType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.NamingXMLType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.NamingXMLType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/FieldType.java @@ -0,0 +1,329 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * This type represents the binding for class member. It allows the + * definition + * of its name and java type as well as an implementation of + * FieldHandler + * to help the Marshalling framework in handling that member. + * Defining a validator is also + * possible. The names given for the validator and the + * fieldHandler must be fully qualified + * + * + * @version $Revision$ $Date$ + */ +public class FieldType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _javaType. + */ + private java.lang.String _javaType; + + /** + * Field _wrapper. + */ + private boolean _wrapper; + + /** + * keeps track of state for field: _wrapper + */ + private boolean _has_wrapper; + + /** + * Field _handler. + */ + private java.lang.String _handler; + + /** + * Field _collection. + */ + private org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType _collection; + + /** + * Field _visibility. + */ + private org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType _visibility; + + /** + * Field _validator. + */ + private java.lang.String _validator; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteWrapper( + ) { + this._has_wrapper= false; + } + + /** + * Returns the value of field 'collection'. + * + * @return the value of field 'Collection'. + */ + public org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType getCollection( + ) { + return this._collection; + } + + /** + * Returns the value of field 'handler'. + * + * @return the value of field 'Handler'. + */ + public java.lang.String getHandler( + ) { + return this._handler; + } + + /** + * Returns the value of field 'javaType'. + * + * @return the value of field 'JavaType'. + */ + public java.lang.String getJavaType( + ) { + return this._javaType; + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'validator'. + * + * @return the value of field 'Validator'. + */ + public java.lang.String getValidator( + ) { + return this._validator; + } + + /** + * Returns the value of field 'visibility'. + * + * @return the value of field 'Visibility'. + */ + public org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType getVisibility( + ) { + return this._visibility; + } + + /** + * Returns the value of field 'wrapper'. + * + * @return the value of field 'Wrapper'. + */ + public boolean getWrapper( + ) { + return this._wrapper; + } + + /** + * Method hasWrapper. + * + * @return true if at least one Wrapper has been added + */ + public boolean hasWrapper( + ) { + return this._has_wrapper; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Returns the value of field 'wrapper'. + * + * @return the value of field 'Wrapper'. + */ + public boolean isWrapper( + ) { + return this._wrapper; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'collection'. + * + * @param collection the value of field 'collection'. + */ + public void setCollection( + final org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType collection) { + this._collection = collection; + } + + /** + * Sets the value of field 'handler'. + * + * @param handler the value of field 'handler'. + */ + public void setHandler( + final java.lang.String handler) { + this._handler = handler; + } + + /** + * Sets the value of field 'javaType'. + * + * @param javaType the value of field 'javaType'. + */ + public void setJavaType( + final java.lang.String javaType) { + this._javaType = javaType; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'validator'. + * + * @param validator the value of field 'validator'. + */ + public void setValidator( + final java.lang.String validator) { + this._validator = validator; + } + + /** + * Sets the value of field 'visibility'. + * + * @param visibility the value of field 'visibility'. + */ + public void setVisibility( + final org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType visibility) { + this._visibility = visibility; + } + + /** + * Sets the value of field 'wrapper'. + * + * @param wrapper the value of field 'wrapper'. + */ + public void setWrapper( + final boolean wrapper) { + this._wrapper = wrapper; + this._has_wrapper = true; + } + + /** + * Method unmarshalFieldType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.FieldType + */ + public static org.exolab.castor.builder.binding.xml.FieldType unmarshalFieldType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.FieldType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.FieldType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/PackageType.java @@ -0,0 +1,168 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Mappings between a namespace and a java package can directly + * be defined in the binding file. This element allows also the + * mapping + * between a package and a schemaLocation. + * + * + * @version $Revision$ $Date$ + */ +public class PackageType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _packageTypeChoice. + */ + private org.exolab.castor.builder.binding.xml.PackageTypeChoice _packageTypeChoice; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PackageType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'packageTypeChoice'. + * + * @return the value of field 'PackageTypeChoice'. + */ + public org.exolab.castor.builder.binding.xml.PackageTypeChoice getPackageTypeChoice( + ) { + return this._packageTypeChoice; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'packageTypeChoice'. + * + * @param packageTypeChoice the value of field + * 'packageTypeChoice'. + */ + public void setPackageTypeChoice( + final org.exolab.castor.builder.binding.xml.PackageTypeChoice packageTypeChoice) { + this._packageTypeChoice = packageTypeChoice; + } + + /** + * Method unmarshalPackageType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.PackageType + */ + public static org.exolab.castor.builder.binding.xml.PackageType unmarshalPackageType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.PackageType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.PackageType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/Forces.java @@ -0,0 +1,279 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class Forces. + * + * @version $Revision$ $Date$ + */ +public class Forces implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _forceList. + */ + private java.util.List _forceList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Forces() { + super(); + this._forceList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vForce + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addForce( + final java.lang.String vForce) + throws java.lang.IndexOutOfBoundsException { + this._forceList.add(vForce); + } + + /** + * + * + * @param index + * @param vForce + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addForce( + final int index, + final java.lang.String vForce) + throws java.lang.IndexOutOfBoundsException { + this._forceList.add(index, vForce); + } + + /** + * Method enumerateForce. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateForce( + ) { + return java.util.Collections.enumeration(this._forceList); + } + + /** + * Method getForce. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the java.lang.String at the given index + */ + public java.lang.String getForce( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._forceList.size()) { + throw new IndexOutOfBoundsException("getForce: Index value '" + index + "' not in range [0.." + (this._forceList.size() - 1) + "]"); + } + + return (java.lang.String) _forceList.get(index); + } + + /** + * Method getForce.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public java.lang.String[] getForce( + ) { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._forceList.toArray(array); + } + + /** + * Method getForceCount. + * + * @return the size of this collection + */ + public int getForceCount( + ) { + return this._forceList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateForce. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateForce( + ) { + return this._forceList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllForce( + ) { + this._forceList.clear(); + } + + /** + * Method removeForce. + * + * @param vForce + * @return true if the object was removed from the collection. + */ + public boolean removeForce( + final java.lang.String vForce) { + boolean removed = _forceList.remove(vForce); + return removed; + } + + /** + * Method removeForceAt. + * + * @param index + * @return the element removed from the collection + */ + public java.lang.String removeForceAt( + final int index) { + java.lang.Object obj = this._forceList.remove(index); + return (java.lang.String) obj; + } + + /** + * + * + * @param index + * @param vForce + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setForce( + final int index, + final java.lang.String vForce) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._forceList.size()) { + throw new IndexOutOfBoundsException("setForce: Index value '" + index + "' not in range [0.." + (this._forceList.size() - 1) + "]"); + } + + this._forceList.set(index, vForce); + } + + /** + * + * + * @param vForceArray + */ + public void setForce( + final java.lang.String[] vForceArray) { + //-- copy array + _forceList.clear(); + + for (int i = 0; i < vForceArray.length; i++) { + this._forceList.add(vForceArray[i]); + } + } + + /** + * Method unmarshalForces. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.Forces + */ + public static org.exolab.castor.builder.binding.xml.Forces unmarshalForces( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.Forces) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.Forces.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/EnumBindingType.java @@ -0,0 +1,312 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * This type allows the mapping between an XML schema enumeration + * and a java class that follows the type-safe enumeration + * paradigm. + * Additionally, it allows the specify the name of the Java + * constant + * definition for a given enumeraton value. + * + * + * @version $Revision$ $Date$ + */ +public class EnumBindingType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _enumClassName. + */ + private org.exolab.castor.builder.binding.xml.EnumClassName _enumClassName; + + /** + * Field _enumMemberList. + */ + private java.util.List _enumMemberList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public EnumBindingType() { + super(); + this._enumMemberList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vEnumMember + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addEnumMember( + final org.exolab.castor.builder.binding.xml.EnumMember vEnumMember) + throws java.lang.IndexOutOfBoundsException { + this._enumMemberList.add(vEnumMember); + } + + /** + * + * + * @param index + * @param vEnumMember + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addEnumMember( + final int index, + final org.exolab.castor.builder.binding.xml.EnumMember vEnumMember) + throws java.lang.IndexOutOfBoundsException { + this._enumMemberList.add(index, vEnumMember); + } + + /** + * Method enumerateEnumMember. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateEnumMember( + ) { + return java.util.Collections.enumeration(this._enumMemberList); + } + + /** + * Returns the value of field 'enumClassName'. + * + * @return the value of field 'EnumClassName'. + */ + public org.exolab.castor.builder.binding.xml.EnumClassName getEnumClassName( + ) { + return this._enumClassName; + } + + /** + * Method getEnumMember. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.EnumMember at the + * given index + */ + public org.exolab.castor.builder.binding.xml.EnumMember getEnumMember( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._enumMemberList.size()) { + throw new IndexOutOfBoundsException("getEnumMember: Index value '" + index + "' not in range [0.." + (this._enumMemberList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.EnumMember) _enumMemberList.get(index); + } + + /** + * Method getEnumMember.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.EnumMember[] getEnumMember( + ) { + org.exolab.castor.builder.binding.xml.EnumMember[] array = new org.exolab.castor.builder.binding.xml.EnumMember[0]; + return (org.exolab.castor.builder.binding.xml.EnumMember[]) this._enumMemberList.toArray(array); + } + + /** + * Method getEnumMemberCount. + * + * @return the size of this collection + */ + public int getEnumMemberCount( + ) { + return this._enumMemberList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateEnumMember. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateEnumMember( + ) { + return this._enumMemberList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllEnumMember( + ) { + this._enumMemberList.clear(); + } + + /** + * Method removeEnumMember. + * + * @param vEnumMember + * @return true if the object was removed from the collection. + */ + public boolean removeEnumMember( + final org.exolab.castor.builder.binding.xml.EnumMember vEnumMember) { + boolean removed = _enumMemberList.remove(vEnumMember); + return removed; + } + + /** + * Method removeEnumMemberAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.EnumMember removeEnumMemberAt( + final int index) { + java.lang.Object obj = this._enumMemberList.remove(index); + return (org.exolab.castor.builder.binding.xml.EnumMember) obj; + } + + /** + * Sets the value of field 'enumClassName'. + * + * @param enumClassName the value of field 'enumClassName'. + */ + public void setEnumClassName( + final org.exolab.castor.builder.binding.xml.EnumClassName enumClassName) { + this._enumClassName = enumClassName; + } + + /** + * + * + * @param index + * @param vEnumMember + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setEnumMember( + final int index, + final org.exolab.castor.builder.binding.xml.EnumMember vEnumMember) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._enumMemberList.size()) { + throw new IndexOutOfBoundsException("setEnumMember: Index value '" + index + "' not in range [0.." + (this._enumMemberList.size() - 1) + "]"); + } + + this._enumMemberList.set(index, vEnumMember); + } + + /** + * + * + * @param vEnumMemberArray + */ + public void setEnumMember( + final org.exolab.castor.builder.binding.xml.EnumMember[] vEnumMemberArray) { + //-- copy array + _enumMemberList.clear(); + + for (int i = 0; i < vEnumMemberArray.length; i++) { + this._enumMemberList.add(vEnumMemberArray[i]); + } + } + + /** + * Method unmarshalEnumBindingType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.EnumBindingType + */ + public static org.exolab.castor.builder.binding.xml.EnumBindingType unmarshalEnumBindingType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.EnumBindingType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.EnumBindingType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/ComponentBindingType.java @@ -0,0 +1,1355 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * A binding element is defined to express the binding between an + * XML Schema Component + * and Java class OR a java interface or a java member class. The + * XML Schema component can + * be an element, an attribute, a complexType or a group. + * Attribute cannot be mapped to + * class, the reader of a binding file will take care that class + * or interface are not + * used for component whose xml-type is attribute. + * + * + * @version $Revision$ $Date$ + */ +public class ComponentBindingType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _componentBindingTypeChoice. + */ + private org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice _componentBindingTypeChoice; + + /** + * Field _componentBindingList. + */ + private java.util.List _componentBindingList; + + /** + * Field _elementBindingList. + */ + private java.util.List _elementBindingList; + + /** + * Field _attributeBindingList. + */ + private java.util.List _attributeBindingList; + + /** + * Field _complexTypeBindingList. + */ + private java.util.List _complexTypeBindingList; + + /** + * Field _groupBindingList. + */ + private java.util.List _groupBindingList; + + /** + * Field _enumBindingList. + */ + private java.util.List _enumBindingList; + + /** + * Field _simpleTypeBindingList. + */ + private java.util.List _simpleTypeBindingList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ComponentBindingType() { + super(); + this._componentBindingList = new java.util.ArrayList(); + this._elementBindingList = new java.util.ArrayList(); + this._attributeBindingList = new java.util.ArrayList(); + this._complexTypeBindingList = new java.util.ArrayList(); + this._groupBindingList = new java.util.ArrayList(); + this._enumBindingList = new java.util.ArrayList(); + this._simpleTypeBindingList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vAttributeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAttributeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) + throws java.lang.IndexOutOfBoundsException { + this._attributeBindingList.add(vAttributeBinding); + } + + /** + * + * + * @param index + * @param vAttributeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAttributeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) + throws java.lang.IndexOutOfBoundsException { + this._attributeBindingList.add(index, vAttributeBinding); + } + + /** + * + * + * @param vComplexTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComplexTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._complexTypeBindingList.add(vComplexTypeBinding); + } + + /** + * + * + * @param index + * @param vComplexTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComplexTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._complexTypeBindingList.add(index, vComplexTypeBinding); + } + + /** + * + * + * @param vComponentBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComponentBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) + throws java.lang.IndexOutOfBoundsException { + this._componentBindingList.add(vComponentBinding); + } + + /** + * + * + * @param index + * @param vComponentBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addComponentBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) + throws java.lang.IndexOutOfBoundsException { + this._componentBindingList.add(index, vComponentBinding); + } + + /** + * + * + * @param vElementBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addElementBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) + throws java.lang.IndexOutOfBoundsException { + this._elementBindingList.add(vElementBinding); + } + + /** + * + * + * @param index + * @param vElementBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addElementBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) + throws java.lang.IndexOutOfBoundsException { + this._elementBindingList.add(index, vElementBinding); + } + + /** + * + * + * @param vEnumBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addEnumBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) + throws java.lang.IndexOutOfBoundsException { + this._enumBindingList.add(vEnumBinding); + } + + /** + * + * + * @param index + * @param vEnumBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addEnumBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) + throws java.lang.IndexOutOfBoundsException { + this._enumBindingList.add(index, vEnumBinding); + } + + /** + * + * + * @param vGroupBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addGroupBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) + throws java.lang.IndexOutOfBoundsException { + this._groupBindingList.add(vGroupBinding); + } + + /** + * + * + * @param index + * @param vGroupBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addGroupBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) + throws java.lang.IndexOutOfBoundsException { + this._groupBindingList.add(index, vGroupBinding); + } + + /** + * + * + * @param vSimpleTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addSimpleTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._simpleTypeBindingList.add(vSimpleTypeBinding); + } + + /** + * + * + * @param index + * @param vSimpleTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addSimpleTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) + throws java.lang.IndexOutOfBoundsException { + this._simpleTypeBindingList.add(index, vSimpleTypeBinding); + } + + /** + * Method enumerateAttributeBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateAttributeBinding( + ) { + return java.util.Collections.enumeration(this._attributeBindingList); + } + + /** + * Method enumerateComplexTypeBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateComplexTypeBinding( + ) { + return java.util.Collections.enumeration(this._complexTypeBindingList); + } + + /** + * Method enumerateComponentBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateComponentBinding( + ) { + return java.util.Collections.enumeration(this._componentBindingList); + } + + /** + * Method enumerateElementBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateElementBinding( + ) { + return java.util.Collections.enumeration(this._elementBindingList); + } + + /** + * Method enumerateEnumBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateEnumBinding( + ) { + return java.util.Collections.enumeration(this._enumBindingList); + } + + /** + * Method enumerateGroupBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateGroupBinding( + ) { + return java.util.Collections.enumeration(this._groupBindingList); + } + + /** + * Method enumerateSimpleTypeBinding. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateSimpleTypeBinding( + ) { + return java.util.Collections.enumeration(this._simpleTypeBindingList); + } + + /** + * Method getAttributeBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getAttributeBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._attributeBindingList.size()) { + throw new IndexOutOfBoundsException("getAttributeBinding: Index value '" + index + "' not in range [0.." + (this._attributeBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _attributeBindingList.get(index); + } + + /** + * Method getAttributeBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getAttributeBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._attributeBindingList.toArray(array); + } + + /** + * Method getAttributeBindingCount. + * + * @return the size of this collection + */ + public int getAttributeBindingCount( + ) { + return this._attributeBindingList.size(); + } + + /** + * Method getComplexTypeBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getComplexTypeBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._complexTypeBindingList.size()) { + throw new IndexOutOfBoundsException("getComplexTypeBinding: Index value '" + index + "' not in range [0.." + (this._complexTypeBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _complexTypeBindingList.get(index); + } + + /** + * Method getComplexTypeBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getComplexTypeBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._complexTypeBindingList.toArray(array); + } + + /** + * Method getComplexTypeBindingCount. + * + * @return the size of this collection + */ + public int getComplexTypeBindingCount( + ) { + return this._complexTypeBindingList.size(); + } + + /** + * Method getComponentBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getComponentBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._componentBindingList.size()) { + throw new IndexOutOfBoundsException("getComponentBinding: Index value '" + index + "' not in range [0.." + (this._componentBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _componentBindingList.get(index); + } + + /** + * Method getComponentBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getComponentBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._componentBindingList.toArray(array); + } + + /** + * Method getComponentBindingCount. + * + * @return the size of this collection + */ + public int getComponentBindingCount( + ) { + return this._componentBindingList.size(); + } + + /** + * Returns the value of field 'componentBindingTypeChoice'. + * + * @return the value of field 'ComponentBindingTypeChoice'. + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice getComponentBindingTypeChoice( + ) { + return this._componentBindingTypeChoice; + } + + /** + * Method getElementBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getElementBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._elementBindingList.size()) { + throw new IndexOutOfBoundsException("getElementBinding: Index value '" + index + "' not in range [0.." + (this._elementBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _elementBindingList.get(index); + } + + /** + * Method getElementBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getElementBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._elementBindingList.toArray(array); + } + + /** + * Method getElementBindingCount. + * + * @return the size of this collection + */ + public int getElementBindingCount( + ) { + return this._elementBindingList.size(); + } + + /** + * Method getEnumBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getEnumBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._enumBindingList.size()) { + throw new IndexOutOfBoundsException("getEnumBinding: Index value '" + index + "' not in range [0.." + (this._enumBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _enumBindingList.get(index); + } + + /** + * Method getEnumBinding.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getEnumBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._enumBindingList.toArray(array); + } + + /** + * Method getEnumBindingCount. + * + * @return the size of this collection + */ + public int getEnumBindingCount( + ) { + return this._enumBindingList.size(); + } + + /** + * Method getGroupBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getGroupBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._groupBindingList.size()) { + throw new IndexOutOfBoundsException("getGroupBinding: Index value '" + index + "' not in range [0.." + (this._groupBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _groupBindingList.get(index); + } + + /** + * Method getGroupBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getGroupBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._groupBindingList.toArray(array); + } + + /** + * Method getGroupBindingCount. + * + * @return the size of this collection + */ + public int getGroupBindingCount( + ) { + return this._groupBindingList.size(); + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method getSimpleTypeBinding. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.exolab.castor.builder.binding.xml.ComponentBindingType + * at the given index + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType getSimpleTypeBinding( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._simpleTypeBindingList.size()) { + throw new IndexOutOfBoundsException("getSimpleTypeBinding: Index value '" + index + "' not in range [0.." + (this._simpleTypeBindingList.size() - 1) + "]"); + } + + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) _simpleTypeBindingList.get(index); + } + + /** + * Method getSimpleTypeBinding.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType[] getSimpleTypeBinding( + ) { + org.exolab.castor.builder.binding.xml.ComponentBindingType[] array = new org.exolab.castor.builder.binding.xml.ComponentBindingType[0]; + return (org.exolab.castor.builder.binding.xml.ComponentBindingType[]) this._simpleTypeBindingList.toArray(array); + } + + /** + * Method getSimpleTypeBindingCount. + * + * @return the size of this collection + */ + public int getSimpleTypeBindingCount( + ) { + return this._simpleTypeBindingList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateAttributeBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateAttributeBinding( + ) { + return this._attributeBindingList.iterator(); + } + + /** + * Method iterateComplexTypeBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateComplexTypeBinding( + ) { + return this._complexTypeBindingList.iterator(); + } + + /** + * Method iterateComponentBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateComponentBinding( + ) { + return this._componentBindingList.iterator(); + } + + /** + * Method iterateElementBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateElementBinding( + ) { + return this._elementBindingList.iterator(); + } + + /** + * Method iterateEnumBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateEnumBinding( + ) { + return this._enumBindingList.iterator(); + } + + /** + * Method iterateGroupBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateGroupBinding( + ) { + return this._groupBindingList.iterator(); + } + + /** + * Method iterateSimpleTypeBinding. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateSimpleTypeBinding( + ) { + return this._simpleTypeBindingList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllAttributeBinding( + ) { + this._attributeBindingList.clear(); + } + + /** + */ + public void removeAllComplexTypeBinding( + ) { + this._complexTypeBindingList.clear(); + } + + /** + */ + public void removeAllComponentBinding( + ) { + this._componentBindingList.clear(); + } + + /** + */ + public void removeAllElementBinding( + ) { + this._elementBindingList.clear(); + } + + /** + */ + public void removeAllEnumBinding( + ) { + this._enumBindingList.clear(); + } + + /** + */ + public void removeAllGroupBinding( + ) { + this._groupBindingList.clear(); + } + + /** + */ + public void removeAllSimpleTypeBinding( + ) { + this._simpleTypeBindingList.clear(); + } + + /** + * Method removeAttributeBinding. + * + * @param vAttributeBinding + * @return true if the object was removed from the collection. + */ + public boolean removeAttributeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) { + boolean removed = _attributeBindingList.remove(vAttributeBinding); + return removed; + } + + /** + * Method removeAttributeBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeAttributeBindingAt( + final int index) { + java.lang.Object obj = this._attributeBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeComplexTypeBinding. + * + * @param vComplexTypeBinding + * @return true if the object was removed from the collection. + */ + public boolean removeComplexTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) { + boolean removed = _complexTypeBindingList.remove(vComplexTypeBinding); + return removed; + } + + /** + * Method removeComplexTypeBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeComplexTypeBindingAt( + final int index) { + java.lang.Object obj = this._complexTypeBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeComponentBinding. + * + * @param vComponentBinding + * @return true if the object was removed from the collection. + */ + public boolean removeComponentBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) { + boolean removed = _componentBindingList.remove(vComponentBinding); + return removed; + } + + /** + * Method removeComponentBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeComponentBindingAt( + final int index) { + java.lang.Object obj = this._componentBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeElementBinding. + * + * @param vElementBinding + * @return true if the object was removed from the collection. + */ + public boolean removeElementBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) { + boolean removed = _elementBindingList.remove(vElementBinding); + return removed; + } + + /** + * Method removeElementBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeElementBindingAt( + final int index) { + java.lang.Object obj = this._elementBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeEnumBinding. + * + * @param vEnumBinding + * @return true if the object was removed from the collection. + */ + public boolean removeEnumBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) { + boolean removed = _enumBindingList.remove(vEnumBinding); + return removed; + } + + /** + * Method removeEnumBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeEnumBindingAt( + final int index) { + java.lang.Object obj = this._enumBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeGroupBinding. + * + * @param vGroupBinding + * @return true if the object was removed from the collection. + */ + public boolean removeGroupBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) { + boolean removed = _groupBindingList.remove(vGroupBinding); + return removed; + } + + /** + * Method removeGroupBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeGroupBindingAt( + final int index) { + java.lang.Object obj = this._groupBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * Method removeSimpleTypeBinding. + * + * @param vSimpleTypeBinding + * @return true if the object was removed from the collection. + */ + public boolean removeSimpleTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) { + boolean removed = _simpleTypeBindingList.remove(vSimpleTypeBinding); + return removed; + } + + /** + * Method removeSimpleTypeBindingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.exolab.castor.builder.binding.xml.ComponentBindingType removeSimpleTypeBindingAt( + final int index) { + java.lang.Object obj = this._simpleTypeBindingList.remove(index); + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) obj; + } + + /** + * + * + * @param index + * @param vAttributeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAttributeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vAttributeBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._attributeBindingList.size()) { + throw new IndexOutOfBoundsException("setAttributeBinding: Index value '" + index + "' not in range [0.." + (this._attributeBindingList.size() - 1) + "]"); + } + + this._attributeBindingList.set(index, vAttributeBinding); + } + + /** + * + * + * @param vAttributeBindingArray + */ + public void setAttributeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vAttributeBindingArray) { + //-- copy array + _attributeBindingList.clear(); + + for (int i = 0; i < vAttributeBindingArray.length; i++) { + this._attributeBindingList.add(vAttributeBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vComplexTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setComplexTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComplexTypeBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._complexTypeBindingList.size()) { + throw new IndexOutOfBoundsException("setComplexTypeBinding: Index value '" + index + "' not in range [0.." + (this._complexTypeBindingList.size() - 1) + "]"); + } + + this._complexTypeBindingList.set(index, vComplexTypeBinding); + } + + /** + * + * + * @param vComplexTypeBindingArray + */ + public void setComplexTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vComplexTypeBindingArray) { + //-- copy array + _complexTypeBindingList.clear(); + + for (int i = 0; i < vComplexTypeBindingArray.length; i++) { + this._complexTypeBindingList.add(vComplexTypeBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vComponentBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setComponentBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vComponentBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._componentBindingList.size()) { + throw new IndexOutOfBoundsException("setComponentBinding: Index value '" + index + "' not in range [0.." + (this._componentBindingList.size() - 1) + "]"); + } + + this._componentBindingList.set(index, vComponentBinding); + } + + /** + * + * + * @param vComponentBindingArray + */ + public void setComponentBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vComponentBindingArray) { + //-- copy array + _componentBindingList.clear(); + + for (int i = 0; i < vComponentBindingArray.length; i++) { + this._componentBindingList.add(vComponentBindingArray[i]); + } + } + + /** + * Sets the value of field 'componentBindingTypeChoice'. + * + * @param componentBindingTypeChoice the value of field + * 'componentBindingTypeChoice'. + */ + public void setComponentBindingTypeChoice( + final org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice componentBindingTypeChoice) { + this._componentBindingTypeChoice = componentBindingTypeChoice; + } + + /** + * + * + * @param index + * @param vElementBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setElementBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vElementBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._elementBindingList.size()) { + throw new IndexOutOfBoundsException("setElementBinding: Index value '" + index + "' not in range [0.." + (this._elementBindingList.size() - 1) + "]"); + } + + this._elementBindingList.set(index, vElementBinding); + } + + /** + * + * + * @param vElementBindingArray + */ + public void setElementBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vElementBindingArray) { + //-- copy array + _elementBindingList.clear(); + + for (int i = 0; i < vElementBindingArray.length; i++) { + this._elementBindingList.add(vElementBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vEnumBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setEnumBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vEnumBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._enumBindingList.size()) { + throw new IndexOutOfBoundsException("setEnumBinding: Index value '" + index + "' not in range [0.." + (this._enumBindingList.size() - 1) + "]"); + } + + this._enumBindingList.set(index, vEnumBinding); + } + + /** + * + * + * @param vEnumBindingArray + */ + public void setEnumBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vEnumBindingArray) { + //-- copy array + _enumBindingList.clear(); + + for (int i = 0; i < vEnumBindingArray.length; i++) { + this._enumBindingList.add(vEnumBindingArray[i]); + } + } + + /** + * + * + * @param index + * @param vGroupBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setGroupBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vGroupBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._groupBindingList.size()) { + throw new IndexOutOfBoundsException("setGroupBinding: Index value '" + index + "' not in range [0.." + (this._groupBindingList.size() - 1) + "]"); + } + + this._groupBindingList.set(index, vGroupBinding); + } + + /** + * + * + * @param vGroupBindingArray + */ + public void setGroupBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vGroupBindingArray) { + //-- copy array + _groupBindingList.clear(); + + for (int i = 0; i < vGroupBindingArray.length; i++) { + this._groupBindingList.add(vGroupBindingArray[i]); + } + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * + * + * @param index + * @param vSimpleTypeBinding + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setSimpleTypeBinding( + final int index, + final org.exolab.castor.builder.binding.xml.ComponentBindingType vSimpleTypeBinding) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._simpleTypeBindingList.size()) { + throw new IndexOutOfBoundsException("setSimpleTypeBinding: Index value '" + index + "' not in range [0.." + (this._simpleTypeBindingList.size() - 1) + "]"); + } + + this._simpleTypeBindingList.set(index, vSimpleTypeBinding); + } + + /** + * + * + * @param vSimpleTypeBindingArray + */ + public void setSimpleTypeBinding( + final org.exolab.castor.builder.binding.xml.ComponentBindingType[] vSimpleTypeBindingArray) { + //-- copy array + _simpleTypeBindingList.clear(); + + for (int i = 0; i < vSimpleTypeBindingArray.length; i++) { + this._simpleTypeBindingList.add(vSimpleTypeBindingArray[i]); + } + } + + /** + * Method unmarshalComponentBindingType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.ComponentBindingType + */ + public static org.exolab.castor.builder.binding.xml.ComponentBindingType unmarshalComponentBindingType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.ComponentBindingType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/ClassType.java @@ -0,0 +1,599 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * This type gathers the needed information to generate a Java + * Class + * from a binding file. Options such as generating the equals + * method, + * using wrapper classes for primitives or using bound properties + * can + * be defined via that element. When defined locally the options + * override + * the values defined in the castor.properties file. + * + * + * @version $Revision$ $Date$ + */ +public class ClassType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _package. + */ + private java.lang.String _package; + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _final. + */ + private boolean _final; + + /** + * keeps track of state for field: _final + */ + private boolean _has_final; + + /** + * Field _abstract. + */ + private boolean _abstract; + + /** + * keeps track of state for field: _abstract + */ + private boolean _has_abstract; + + /** + * Field _equals. + */ + private boolean _equals; + + /** + * keeps track of state for field: _equals + */ + private boolean _has_equals; + + /** + * Field _bound. + */ + private boolean _bound; + + /** + * keeps track of state for field: _bound + */ + private boolean _has_bound; + + /** + * Field _implementsList. + */ + private java.util.List _implementsList; + + /** + * Field _extends. + */ + private java.lang.String _extends; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassType() { + super(); + this._implementsList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vImplements + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addImplements( + final java.lang.String vImplements) + throws java.lang.IndexOutOfBoundsException { + this._implementsList.add(vImplements); + } + + /** + * + * + * @param index + * @param vImplements + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addImplements( + final int index, + final java.lang.String vImplements) + throws java.lang.IndexOutOfBoundsException { + this._implementsList.add(index, vImplements); + } + + /** + */ + public void deleteAbstract( + ) { + this._has_abstract= false; + } + + /** + */ + public void deleteBound( + ) { + this._has_bound= false; + } + + /** + */ + public void deleteEquals( + ) { + this._has_equals= false; + } + + /** + */ + public void deleteFinal( + ) { + this._has_final= false; + } + + /** + * Method enumerateImplements. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateImplements( + ) { + return java.util.Collections.enumeration(this._implementsList); + } + + /** + * Returns the value of field 'abstract'. + * + * @return the value of field 'Abstract'. + */ + public boolean getAbstract( + ) { + return this._abstract; + } + + /** + * Returns the value of field 'bound'. + * + * @return the value of field 'Bound'. + */ + public boolean getBound( + ) { + return this._bound; + } + + /** + * Returns the value of field 'equals'. + * + * @return the value of field 'Equals'. + */ + public boolean getEquals( + ) { + return this._equals; + } + + /** + * Returns the value of field 'extends'. + * + * @return the value of field 'Extends'. + */ + public java.lang.String getExtends( + ) { + return this._extends; + } + + /** + * Returns the value of field 'final'. + * + * @return the value of field 'Final'. + */ + public boolean getFinal( + ) { + return this._final; + } + + /** + * Method getImplements. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the java.lang.String at the given index + */ + public java.lang.String getImplements( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._implementsList.size()) { + throw new IndexOutOfBoundsException("getImplements: Index value '" + index + "' not in range [0.." + (this._implementsList.size() - 1) + "]"); + } + + return (java.lang.String) _implementsList.get(index); + } + + /** + * Method getImplements.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public java.lang.String[] getImplements( + ) { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._implementsList.toArray(array); + } + + /** + * Method getImplementsCount. + * + * @return the size of this collection + */ + public int getImplementsCount( + ) { + return this._implementsList.size(); + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'package'. + * + * @return the value of field 'Package'. + */ + public java.lang.String getPackage( + ) { + return this._package; + } + + /** + * Method hasAbstract. + * + * @return true if at least one Abstract has been added + */ + public boolean hasAbstract( + ) { + return this._has_abstract; + } + + /** + * Method hasBound. + * + * @return true if at least one Bound has been added + */ + public boolean hasBound( + ) { + return this._has_bound; + } + + /** + * Method hasEquals. + * + * @return true if at least one Equals has been added + */ + public boolean hasEquals( + ) { + return this._has_equals; + } + + /** + * Method hasFinal. + * + * @return true if at least one Final has been added + */ + public boolean hasFinal( + ) { + return this._has_final; + } + + /** + * Returns the value of field 'abstract'. + * + * @return the value of field 'Abstract'. + */ + public boolean isAbstract( + ) { + return this._abstract; + } + + /** + * Returns the value of field 'bound'. + * + * @return the value of field 'Bound'. + */ + public boolean isBound( + ) { + return this._bound; + } + + /** + * Returns the value of field 'equals'. + * + * @return the value of field 'Equals'. + */ + public boolean isEquals( + ) { + return this._equals; + } + + /** + * Returns the value of field 'final'. + * + * @return the value of field 'Final'. + */ + public boolean isFinal( + ) { + return this._final; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateImplements. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateImplements( + ) { + return this._implementsList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllImplements( + ) { + this._implementsList.clear(); + } + + /** + * Method removeImplements. + * + * @param vImplements + * @return true if the object was removed from the collection. + */ + public boolean removeImplements( + final java.lang.String vImplements) { + boolean removed = _implementsList.remove(vImplements); + return removed; + } + + /** + * Method removeImplementsAt. + * + * @param index + * @return the element removed from the collection + */ + public java.lang.String removeImplementsAt( + final int index) { + java.lang.Object obj = this._implementsList.remove(index); + return (java.lang.String) obj; + } + + /** + * Sets the value of field 'abstract'. + * + * @param _abstract + * @param abstract the value of field 'abstract'. + */ + public void setAbstract( + final boolean _abstract) { + this._abstract = _abstract; + this._has_abstract = true; + } + + /** + * Sets the value of field 'bound'. + * + * @param bound the value of field 'bound'. + */ + public void setBound( + final boolean bound) { + this._bound = bound; + this._has_bound = true; + } + + /** + * Sets the value of field 'equals'. + * + * @param equals the value of field 'equals'. + */ + public void setEquals( + final boolean equals) { + this._equals = equals; + this._has_equals = true; + } + + /** + * Sets the value of field 'extends'. + * + * @param _extends + * @param extends the value of field 'extends'. + */ + public void setExtends( + final java.lang.String _extends) { + this._extends = _extends; + } + + /** + * Sets the value of field 'final'. + * + * @param _final + * @param final the value of field 'final'. + */ + public void setFinal( + final boolean _final) { + this._final = _final; + this._has_final = true; + } + + /** + * + * + * @param index + * @param vImplements + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setImplements( + final int index, + final java.lang.String vImplements) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._implementsList.size()) { + throw new IndexOutOfBoundsException("setImplements: Index value '" + index + "' not in range [0.." + (this._implementsList.size() - 1) + "]"); + } + + this._implementsList.set(index, vImplements); + } + + /** + * + * + * @param vImplementsArray + */ + public void setImplements( + final java.lang.String[] vImplementsArray) { + //-- copy array + _implementsList.clear(); + + for (int i = 0; i < vImplementsArray.length; i++) { + this._implementsList.add(vImplementsArray[i]); + } + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'package'. + * + * @param _package + * @param package the value of field 'package'. + */ + public void setPackage( + final java.lang.String _package) { + this._package = _package; + } + + /** + * Method unmarshalClassType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.ClassType + */ + public static org.exolab.castor.builder.binding.xml.ClassType unmarshalClassType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.ClassType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.ClassType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/PackageTypeChoice.java @@ -0,0 +1,163 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class PackageTypeChoice. + * + * @version $Revision$ $Date$ + */ +public class PackageTypeChoice implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _namespace. + */ + private java.lang.String _namespace; + + /** + * Field _schemaLocation. + */ + private java.lang.String _schemaLocation; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PackageTypeChoice() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'namespace'. + * + * @return the value of field 'Namespace'. + */ + public java.lang.String getNamespace( + ) { + return this._namespace; + } + + /** + * Returns the value of field 'schemaLocation'. + * + * @return the value of field 'SchemaLocation'. + */ + public java.lang.String getSchemaLocation( + ) { + return this._schemaLocation; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'namespace'. + * + * @param namespace the value of field 'namespace'. + */ + public void setNamespace( + final java.lang.String namespace) { + this._namespace = namespace; + } + + /** + * Sets the value of field 'schemaLocation'. + * + * @param schemaLocation the value of field 'schemaLocation'. + */ + public void setSchemaLocation( + final java.lang.String schemaLocation) { + this._schemaLocation = schemaLocation; + } + + /** + * Method unmarshalPackageTypeChoice. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.PackageTypeChoice + */ + public static org.exolab.castor.builder.binding.xml.PackageTypeChoice unmarshalPackageTypeChoice( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.PackageTypeChoice) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.PackageTypeChoice.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/NamingType.java @@ -0,0 +1,163 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * Class NamingType. + * + * @version $Revision$ $Date$ + */ +public class NamingType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _prefix. + */ + private java.lang.String _prefix; + + /** + * Field _suffix. + */ + private java.lang.String _suffix; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamingType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'prefix'. + * + * @return the value of field 'Prefix'. + */ + public java.lang.String getPrefix( + ) { + return this._prefix; + } + + /** + * Returns the value of field 'suffix'. + * + * @return the value of field 'Suffix'. + */ + public java.lang.String getSuffix( + ) { + return this._suffix; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'prefix'. + * + * @param prefix the value of field 'prefix'. + */ + public void setPrefix( + final java.lang.String prefix) { + this._prefix = prefix; + } + + /** + * Sets the value of field 'suffix'. + * + * @param suffix the value of field 'suffix'. + */ + public void setSuffix( + final java.lang.String suffix) { + this._suffix = suffix; + } + + /** + * Method unmarshalNamingType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.NamingType + */ + public static org.exolab.castor.builder.binding.xml.NamingType unmarshalNamingType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.NamingType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.NamingType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/IncludeType.java @@ -0,0 +1,141 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml; + +/** + * A binding file can include other binding files by specifying the + * location + * (URI) of the binding files to include. + * + * + * @version $Revision$ $Date$ + */ +public class IncludeType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _URI. + */ + private java.lang.String _URI; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public IncludeType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'URI'. + * + * @return the value of field 'URI'. + */ + public java.lang.String getURI( + ) { + return this._URI; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'URI'. + * + * @param URI the value of field 'URI'. + */ + public void setURI( + final java.lang.String URI) { + this._URI = URI; + } + + /** + * Method unmarshalIncludeType. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.builder.binding.xml.IncludeType + */ + public static org.exolab.castor.builder.binding.xml.IncludeType unmarshalIncludeType( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.builder.binding.xml.IncludeType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.IncludeType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/BindingType.java @@ -0,0 +1,155 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types; + +/** + * List of the allowed values for the binding type from an XML + * schema + * to a java class. The type can either be 'element' or + * 'complexType'. + * + * + * @version $Revision$ $Date$ + */ +public class BindingType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The element type + */ + public static final int ELEMENT_TYPE = 0; + + /** + * The instance of the element type + */ + public static final BindingType ELEMENT = new BindingType(ELEMENT_TYPE, "element"); + + /** + * The type type + */ + public static final int TYPE_TYPE = 1; + + /** + * The instance of the type type + */ + public static final BindingType TYPE = new BindingType(TYPE_TYPE, "type"); + + /** + * Field _memberTable. + */ + private static java.util.Hashtable _memberTable = init(); + + /** + * Field type. + */ + private final int type; + + /** + * Field stringValue. + */ + private java.lang.String stringValue = null; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private BindingType(final int type, final java.lang.String value) { + super(); + this.type = type; + this.stringValue = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method enumerate.Returns an enumeration of all possible + * instances of BindingType + * + * @return an Enumeration over all possible instances of + * BindingType + */ + public static java.util.Enumeration enumerate( + ) { + return _memberTable.elements(); + } + + /** + * Method getType.Returns the type of this BindingType + * + * @return the type of this BindingType + */ + public int getType( + ) { + return this.type; + } + + /** + * Method init. + * + * @return the initialized Hashtable for the member table + */ + private static java.util.Hashtable init( + ) { + java.util.Hashtable members = new java.util.Hashtable(); + members.put("element", ELEMENT); + members.put("type", TYPE); + return members; + } + + /** + * Method readResolve. will be called during deserialization to + * replace the deserialized object with the correct constant + * instance. + * + * @return this deserialized object + */ + private java.lang.Object readResolve( + ) { + return valueOf(this.stringValue); + } + + /** + * Method toString.Returns the String representation of this + * BindingType + * + * @return the String representation of this BindingType + */ + public java.lang.String toString( + ) { + return this.stringValue; + } + + /** + * Method valueOf.Returns a new BindingType based on the given + * String value. + * + * @param string + * @return the BindingType value of parameter 'string' + */ + public static org.exolab.castor.builder.binding.xml.types.BindingType valueOf( + final java.lang.String string) { + java.lang.Object obj = null; + if (string != null) { + obj = _memberTable.get(string); + } + if (obj == null) { + String err = "" + string + " is not a valid BindingType"; + throw new IllegalArgumentException(err); + } + return (BindingType) obj; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/VisibilityType.java @@ -0,0 +1,162 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types; + +/** + * Class VisibilityType. + * + * @version $Revision$ $Date$ + */ +public class VisibilityType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The public type + */ + public static final int PUBLIC_TYPE = 0; + + /** + * The instance of the public type + */ + public static final VisibilityType PUBLIC = new VisibilityType(PUBLIC_TYPE, "public"); + + /** + * The protected type + */ + public static final int PROTECTED_TYPE = 1; + + /** + * The instance of the protected type + */ + public static final VisibilityType PROTECTED = new VisibilityType(PROTECTED_TYPE, "protected"); + + /** + * The private type + */ + public static final int PRIVATE_TYPE = 2; + + /** + * The instance of the private type + */ + public static final VisibilityType PRIVATE = new VisibilityType(PRIVATE_TYPE, "private"); + + /** + * Field _memberTable. + */ + private static java.util.Hashtable _memberTable = init(); + + /** + * Field type. + */ + private final int type; + + /** + * Field stringValue. + */ + private java.lang.String stringValue = null; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private VisibilityType(final int type, final java.lang.String value) { + super(); + this.type = type; + this.stringValue = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method enumerate.Returns an enumeration of all possible + * instances of VisibilityType + * + * @return an Enumeration over all possible instances of + * VisibilityType + */ + public static java.util.Enumeration enumerate( + ) { + return _memberTable.elements(); + } + + /** + * Method getType.Returns the type of this VisibilityType + * + * @return the type of this VisibilityType + */ + public int getType( + ) { + return this.type; + } + + /** + * Method init. + * + * @return the initialized Hashtable for the member table + */ + private static java.util.Hashtable init( + ) { + java.util.Hashtable members = new java.util.Hashtable(); + members.put("public", PUBLIC); + members.put("protected", PROTECTED); + members.put("private", PRIVATE); + return members; + } + + /** + * Method readResolve. will be called during deserialization to + * replace the deserialized object with the correct constant + * instance. + * + * @return this deserialized object + */ + private java.lang.Object readResolve( + ) { + return valueOf(this.stringValue); + } + + /** + * Method toString.Returns the String representation of this + * VisibilityType + * + * @return the String representation of this VisibilityType + */ + public java.lang.String toString( + ) { + return this.stringValue; + } + + /** + * Method valueOf.Returns a new VisibilityType based on the + * given String value. + * + * @param string + * @return the VisibilityType value of parameter 'string' + */ + public static org.exolab.castor.builder.binding.xml.types.VisibilityType valueOf( + final java.lang.String string) { + java.lang.Object obj = null; + if (string != null) { + obj = _memberTable.get(string); + } + if (obj == null) { + String err = "" + string + " is not a valid VisibilityType"; + throw new IllegalArgumentException(err); + } + return (VisibilityType) obj; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/.castor.cdr @@ -0,0 +1,5 @@ +#Sat Jun 12 20:25:04 VET 2010 +org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType=org.exolab.castor.builder.binding.xml.types.descriptors.FieldTypeVisibilityTypeDescriptor +org.exolab.castor.builder.binding.xml.types.VisibilityType=org.exolab.castor.builder.binding.xml.types.descriptors.VisibilityTypeDescriptor +org.exolab.castor.builder.binding.xml.types.BindingType=org.exolab.castor.builder.binding.xml.types.descriptors.BindingTypeDescriptor +org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType=org.exolab.castor.builder.binding.xml.types.descriptors.FieldTypeCollectionTypeDescriptor --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/FieldTypeCollectionType.java @@ -0,0 +1,231 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types; + +/** + * Class FieldTypeCollectionType. + * + * @version $Revision$ $Date$ + */ +public class FieldTypeCollectionType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The array type + */ + public static final int ARRAY_TYPE = 0; + + /** + * The instance of the array type + */ + public static final FieldTypeCollectionType ARRAY = new FieldTypeCollectionType(ARRAY_TYPE, "array"); + + /** + * The vector type + */ + public static final int VECTOR_TYPE = 1; + + /** + * The instance of the vector type + */ + public static final FieldTypeCollectionType VECTOR = new FieldTypeCollectionType(VECTOR_TYPE, "vector"); + + /** + * The arraylist type + */ + public static final int ARRAYLIST_TYPE = 2; + + /** + * The instance of the arraylist type + */ + public static final FieldTypeCollectionType ARRAYLIST = new FieldTypeCollectionType(ARRAYLIST_TYPE, "arraylist"); + + /** + * The hashtable type + */ + public static final int HASHTABLE_TYPE = 3; + + /** + * The instance of the hashtable type + */ + public static final FieldTypeCollectionType HASHTABLE = new FieldTypeCollectionType(HASHTABLE_TYPE, "hashtable"); + + /** + * The collection type + */ + public static final int COLLECTION_TYPE = 4; + + /** + * The instance of the collection type + */ + public static final FieldTypeCollectionType COLLECTION = new FieldTypeCollectionType(COLLECTION_TYPE, "collection"); + + /** + * The odmg type + */ + public static final int ODMG_TYPE = 5; + + /** + * The instance of the odmg type + */ + public static final FieldTypeCollectionType ODMG = new FieldTypeCollectionType(ODMG_TYPE, "odmg"); + + /** + * The set type + */ + public static final int SET_TYPE = 6; + + /** + * The instance of the set type + */ + public static final FieldTypeCollectionType SET = new FieldTypeCollectionType(SET_TYPE, "set"); + + /** + * The map type + */ + public static final int MAP_TYPE = 7; + + /** + * The instance of the map type + */ + public static final FieldTypeCollectionType MAP = new FieldTypeCollectionType(MAP_TYPE, "map"); + + /** + * The sortedset type + */ + public static final int SORTEDSET_TYPE = 8; + + /** + * The instance of the sortedset type + */ + public static final FieldTypeCollectionType SORTEDSET = new FieldTypeCollectionType(SORTEDSET_TYPE, "sortedset"); + + /** + * Field _memberTable. + */ + private static java.util.Hashtable _memberTable = init(); + + /** + * Field type. + */ + private final int type; + + /** + * Field stringValue. + */ + private java.lang.String stringValue = null; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private FieldTypeCollectionType(final int type, final java.lang.String value) { + super(); + this.type = type; + this.stringValue = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method enumerate.Returns an enumeration of all possible + * instances of FieldTypeCollectionType + * + * @return an Enumeration over all possible instances of + * FieldTypeCollectionType + */ + public static java.util.Enumeration enumerate( + ) { + return _memberTable.elements(); + } + + /** + * Method getType.Returns the type of this + * FieldTypeCollectionType + * + * @return the type of this FieldTypeCollectionType + */ + public int getType( + ) { + return this.type; + } + + /** + * Method init. + * + * @return the initialized Hashtable for the member table + */ + private static java.util.Hashtable init( + ) { + java.util.Hashtable members = new java.util.Hashtable(); + members.put("array", ARRAY); + members.put("vector", VECTOR); + members.put("arraylist", ARRAYLIST); + members.put("hashtable", HASHTABLE); + members.put("collection", COLLECTION); + members.put("odmg", ODMG); + members.put("set", SET); + members.put("map", MAP); + members.put("sortedset", SORTEDSET); + return members; + } + + /** + * Method readResolve. will be called during deserialization to + * replace the deserialized object with the correct constant + * instance. + * + * @return this deserialized object + */ + private java.lang.Object readResolve( + ) { + return valueOf(this.stringValue); + } + + /** + * Method toString.Returns the String representation of this + * FieldTypeCollectionType + * + * @return the String representation of this + * FieldTypeCollectionType + */ + public java.lang.String toString( + ) { + return this.stringValue; + } + + /** + * Method valueOf.Returns a new FieldTypeCollectionType based + * on the given String value. + * + * @param string + * @return the FieldTypeCollectionType value of parameter + * 'string' + */ + public static org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType valueOf( + final java.lang.String string) { + java.lang.Object obj = null; + if (string != null) { + obj = _memberTable.get(string); + } + if (obj == null) { + String err = "" + string + " is not a valid FieldTypeCollectionType"; + throw new IllegalArgumentException(err); + } + return (FieldTypeCollectionType) obj; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/FieldTypeVisibilityType.java @@ -0,0 +1,165 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types; + +/** + * Class FieldTypeVisibilityType. + * + * @version $Revision$ $Date$ + */ +public class FieldTypeVisibilityType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The public type + */ + public static final int PUBLIC_TYPE = 0; + + /** + * The instance of the public type + */ + public static final FieldTypeVisibilityType PUBLIC = new FieldTypeVisibilityType(PUBLIC_TYPE, "public"); + + /** + * The protected type + */ + public static final int PROTECTED_TYPE = 1; + + /** + * The instance of the protected type + */ + public static final FieldTypeVisibilityType PROTECTED = new FieldTypeVisibilityType(PROTECTED_TYPE, "protected"); + + /** + * The private type + */ + public static final int PRIVATE_TYPE = 2; + + /** + * The instance of the private type + */ + public static final FieldTypeVisibilityType PRIVATE = new FieldTypeVisibilityType(PRIVATE_TYPE, "private"); + + /** + * Field _memberTable. + */ + private static java.util.Hashtable _memberTable = init(); + + /** + * Field type. + */ + private final int type; + + /** + * Field stringValue. + */ + private java.lang.String stringValue = null; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private FieldTypeVisibilityType(final int type, final java.lang.String value) { + super(); + this.type = type; + this.stringValue = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method enumerate.Returns an enumeration of all possible + * instances of FieldTypeVisibilityType + * + * @return an Enumeration over all possible instances of + * FieldTypeVisibilityType + */ + public static java.util.Enumeration enumerate( + ) { + return _memberTable.elements(); + } + + /** + * Method getType.Returns the type of this + * FieldTypeVisibilityType + * + * @return the type of this FieldTypeVisibilityType + */ + public int getType( + ) { + return this.type; + } + + /** + * Method init. + * + * @return the initialized Hashtable for the member table + */ + private static java.util.Hashtable init( + ) { + java.util.Hashtable members = new java.util.Hashtable(); + members.put("public", PUBLIC); + members.put("protected", PROTECTED); + members.put("private", PRIVATE); + return members; + } + + /** + * Method readResolve. will be called during deserialization to + * replace the deserialized object with the correct constant + * instance. + * + * @return this deserialized object + */ + private java.lang.Object readResolve( + ) { + return valueOf(this.stringValue); + } + + /** + * Method toString.Returns the String representation of this + * FieldTypeVisibilityType + * + * @return the String representation of this + * FieldTypeVisibilityType + */ + public java.lang.String toString( + ) { + return this.stringValue; + } + + /** + * Method valueOf.Returns a new FieldTypeVisibilityType based + * on the given String value. + * + * @param string + * @return the FieldTypeVisibilityType value of parameter + * 'string' + */ + public static org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType valueOf( + final java.lang.String string) { + java.lang.Object obj = null; + if (string != null) { + obj = _memberTable.get(string); + } + if (obj == null) { + String err = "" + string + " is not a valid FieldTypeVisibilityType"; + throw new IllegalArgumentException(err); + } + return (FieldTypeVisibilityType) obj; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/descriptors/FieldTypeVisibilityTypeDescriptor.java @@ -0,0 +1,155 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType; + +/** + * Class FieldTypeVisibilityTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FieldTypeVisibilityTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldTypeVisibilityTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "FieldTypeVisibilityType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/descriptors/VisibilityTypeDescriptor.java @@ -0,0 +1,155 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.types.VisibilityType; + +/** + * Class VisibilityTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class VisibilityTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public VisibilityTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "VisibilityType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.types.VisibilityType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/descriptors/BindingTypeDescriptor.java @@ -0,0 +1,155 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.types.BindingType; + +/** + * Class BindingTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class BindingTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public BindingTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "BindingType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.types.BindingType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/types/descriptors/FieldTypeCollectionTypeDescriptor.java @@ -0,0 +1,155 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType; + +/** + * Class FieldTypeCollectionTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FieldTypeCollectionTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldTypeCollectionTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "FieldTypeCollectionType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/EnumMemberDescriptor.java @@ -0,0 +1,249 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.EnumMember; + +/** + * Class EnumMemberDescriptor. + * + * @version $Revision$ $Date$ + */ +public class EnumMemberDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public EnumMemberDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "enumMember"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + EnumMember target = (EnumMember) object; + return target.getValue(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + EnumMember target = (EnumMember) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _javaName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_javaName", "javaName", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + EnumMember target = (EnumMember) object; + return target.getJavaName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + EnumMember target = (EnumMember) object; + target.setJavaName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _javaName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.EnumMember.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/BindingDescriptor.java @@ -0,0 +1,675 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.Binding; + +/** + * Class BindingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class BindingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public BindingDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "binding"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _defaultBindingType + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.types.BindingType.class, "_defaultBindingType", "defaultBindingType", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getDefaultBindingType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.setDefaultBindingType( (org.exolab.castor.builder.binding.xml.types.BindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.builder.binding.xml.types.BindingType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("BindingType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _defaultBindingType + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _includeList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.IncludeType.class, "_includeList", "include", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getInclude(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addInclude( (org.exolab.castor.builder.binding.xml.IncludeType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllInclude(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.IncludeType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.IncludeType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _includeList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _packageList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.PackageType.class, "_packageList", "package", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getPackage(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addPackage( (org.exolab.castor.builder.binding.xml.PackageType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllPackage(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.PackageType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.PackageType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _packageList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _namingXML + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.NamingXMLType.class, "_namingXML", "namingXML", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getNamingXML(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.setNamingXML( (org.exolab.castor.builder.binding.xml.NamingXMLType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.NamingXMLType(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.NamingXMLType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _namingXML + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _automaticNaming + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.AutomaticNamingType.class, "_automaticNaming", "automaticNaming", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getAutomaticNaming(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.setAutomaticNaming( (org.exolab.castor.builder.binding.xml.AutomaticNamingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.AutomaticNamingType(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.AutomaticNamingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _automaticNaming + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _componentBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_componentBindingList", "componentBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getComponentBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addComponentBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllComponentBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _componentBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _elementBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_elementBindingList", "elementBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getElementBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addElementBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllElementBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _elementBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _attributeBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_attributeBindingList", "attributeBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getAttributeBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addAttributeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllAttributeBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _attributeBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _complexTypeBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_complexTypeBindingList", "complexTypeBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getComplexTypeBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addComplexTypeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllComplexTypeBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _complexTypeBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _groupBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_groupBindingList", "groupBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getGroupBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addGroupBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllGroupBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _groupBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _enumBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_enumBindingList", "enumBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getEnumBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addEnumBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllEnumBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _enumBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _simpleTypeBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_simpleTypeBindingList", "simpleTypeBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Binding target = (Binding) object; + return target.getSimpleTypeBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Binding target = (Binding) object; + target.addSimpleTypeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Binding target = (Binding) object; + target.removeAllSimpleTypeBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _simpleTypeBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.Binding.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/EnumBindingTypeDescriptor.java @@ -0,0 +1,245 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.EnumBindingType; + +/** + * Class EnumBindingTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class EnumBindingTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public EnumBindingTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "enumBindingType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _enumClassName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.EnumClassName.class, "_enumClassName", "enumClassName", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + EnumBindingType target = (EnumBindingType) object; + return target.getEnumClassName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + EnumBindingType target = (EnumBindingType) object; + target.setEnumClassName( (org.exolab.castor.builder.binding.xml.EnumClassName) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.EnumClassName(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.EnumClassName"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _enumClassName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _enumMemberList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.EnumMember.class, "_enumMemberList", "enumMember", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + EnumBindingType target = (EnumBindingType) object; + return target.getEnumMember(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + EnumBindingType target = (EnumBindingType) object; + target.addEnumMember( (org.exolab.castor.builder.binding.xml.EnumMember) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + EnumBindingType target = (EnumBindingType) object; + target.removeAllEnumMember(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.EnumMember(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.EnumMember"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _enumMemberList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.EnumBindingType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/NamingTypeDescriptor.java @@ -0,0 +1,245 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.NamingType; + +/** + * Class NamingTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class NamingTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamingTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "namingType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _prefix + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_prefix", "prefix", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamingType target = (NamingType) object; + return target.getPrefix(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamingType target = (NamingType) object; + target.setPrefix( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _prefix + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _suffix + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_suffix", "suffix", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamingType target = (NamingType) object; + return target.getSuffix(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamingType target = (NamingType) object; + target.setSuffix( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _suffix + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.NamingType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/PackageTypeChoiceDescriptor.java @@ -0,0 +1,248 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.PackageTypeChoice; + +/** + * Class PackageTypeChoiceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PackageTypeChoiceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PackageTypeChoiceDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _namespace + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_namespace", "namespace", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PackageTypeChoice target = (PackageTypeChoice) object; + return target.getNamespace(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PackageTypeChoice target = (PackageTypeChoice) object; + target.setNamespace( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _namespace + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _schemaLocation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_schemaLocation", "schemaLocation", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PackageTypeChoice target = (PackageTypeChoice) object; + return target.getSchemaLocation(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PackageTypeChoice target = (PackageTypeChoice) object; + target.setSchemaLocation( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _schemaLocation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.PackageTypeChoice.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/ExcludesDescriptor.java @@ -0,0 +1,211 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.Excludes; + +/** + * Class ExcludesDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ExcludesDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ExcludesDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "excludes"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _excludeList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.Exclude.class, "_excludeList", "exclude", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Excludes target = (Excludes) object; + return target.getExclude(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Excludes target = (Excludes) object; + target.addExclude( (org.exolab.castor.builder.binding.xml.Exclude) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Excludes target = (Excludes) object; + target.removeAllExclude(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.Exclude(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.Exclude"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _excludeList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.Excludes.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/EnumClassNameDescriptor.java @@ -0,0 +1,237 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.EnumClassName; + +/** + * Class EnumClassNameDescriptor. + * + * @version $Revision$ $Date$ + */ +public class EnumClassNameDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public EnumClassNameDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "enumClassName"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + EnumClassName target = (EnumClassName) object; + return target.getContent(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + EnumClassName target = (EnumClassName) object; + target.setContent( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize attribute descriptors + + //-- _package + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_package", "package", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + EnumClassName target = (EnumClassName) object; + return target.getPackage(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + EnumClassName target = (EnumClassName) object; + target.setPackage( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _package + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.EnumClassName.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/AutomaticNamingTypeDescriptor.java @@ -0,0 +1,235 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.AutomaticNamingType; + +/** + * Class AutomaticNamingTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AutomaticNamingTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AutomaticNamingTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "automaticNamingType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _forces + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.Forces.class, "_forces", "forces", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AutomaticNamingType target = (AutomaticNamingType) object; + return target.getForces(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AutomaticNamingType target = (AutomaticNamingType) object; + target.setForces( (org.exolab.castor.builder.binding.xml.Forces) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.Forces(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.Forces"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _forces + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _excludes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.Excludes.class, "_excludes", "excludes", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AutomaticNamingType target = (AutomaticNamingType) object; + return target.getExcludes(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AutomaticNamingType target = (AutomaticNamingType) object; + target.setExcludes( (org.exolab.castor.builder.binding.xml.Excludes) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.Excludes(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.Excludes"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _excludes + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.AutomaticNamingType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/ForcesDescriptor.java @@ -0,0 +1,216 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.Forces; + +/** + * Class ForcesDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ForcesDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ForcesDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "forces"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _forceList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_forceList", "force", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Forces target = (Forces) object; + return target.getForce(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Forces target = (Forces) object; + target.addForce( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Forces target = (Forces) object; + target.removeAllForce(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _forceList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.Forces.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/ExcludeDescriptor.java @@ -0,0 +1,247 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.Exclude; + +/** + * Class ExcludeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ExcludeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ExcludeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "exclude"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Exclude target = (Exclude) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Exclude target = (Exclude) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _className + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_className", "class-name", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Exclude target = (Exclude) object; + return target.getClassName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Exclude target = (Exclude) object; + target.setClassName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _className + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.Exclude.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/ComponentBindingTypeChoiceDescriptor.java @@ -0,0 +1,349 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice; + +/** + * Class ComponentBindingTypeChoiceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ComponentBindingTypeChoiceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ComponentBindingTypeChoiceDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _javaClass + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ClassType.class, "_javaClass", "java-class", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + return target.getJavaClass(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + target.setJavaClass( (org.exolab.castor.builder.binding.xml.ClassType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ClassType(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.ClassType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _javaClass + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _interface + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.Interface.class, "_interface", "interface", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + return target.getInterface(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + target.setInterface( (org.exolab.castor.builder.binding.xml.Interface) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.Interface(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.Interface"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _interface + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _member + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.FieldType.class, "_member", "member", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + return target.getMember(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + target.setMember( (org.exolab.castor.builder.binding.xml.FieldType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.FieldType(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.FieldType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _member + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _enumDef + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.EnumBindingType.class, "_enumDef", "enum-def", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + return target.getEnumDef(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + target.setEnumDef( (org.exolab.castor.builder.binding.xml.EnumBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.EnumBindingType(); + } + }; + desc.setSchemaType("enumBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _enumDef + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _contentMember + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ContentMemberType.class, "_contentMember", "contentMember", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + return target.getContentMember(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingTypeChoice target = (ComponentBindingTypeChoice) object; + target.setContentMember( (org.exolab.castor.builder.binding.xml.ContentMemberType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ContentMemberType(); + } + }; + desc.setSchemaType("contentMemberType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _contentMember + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/ContentMemberTypeDescriptor.java @@ -0,0 +1,235 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.ContentMemberType; + +/** + * Class ContentMemberTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ContentMemberTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ContentMemberTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "contentMemberType"; + _elementDefinition = false; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ContentMemberType target = (ContentMemberType) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ContentMemberType target = (ContentMemberType) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _visibility + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.types.VisibilityType.class, "_visibility", "visibility", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ContentMemberType target = (ContentMemberType) object; + return target.getVisibility(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ContentMemberType target = (ContentMemberType) object; + target.setVisibility( (org.exolab.castor.builder.binding.xml.types.VisibilityType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.builder.binding.xml.types.VisibilityType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("VisibilityType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _visibility + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.ContentMemberType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/PackageTypeDescriptor.java @@ -0,0 +1,246 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.PackageType; + +/** + * Class PackageTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PackageTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PackageTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "packageType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PackageType target = (PackageType) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PackageType target = (PackageType) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _packageTypeChoice + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.PackageTypeChoice.class, "_packageTypeChoice", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PackageType target = (PackageType) object; + return target.getPackageTypeChoice(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PackageType target = (PackageType) object; + target.setPackageTypeChoice( (org.exolab.castor.builder.binding.xml.PackageTypeChoice) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.PackageTypeChoice(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.PackageTypeChoice"); + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new org.exolab.castor.builder.binding.xml.descriptors.PackageTypeChoiceDescriptor()); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _packageTypeChoice + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.PackageType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/InterfaceDescriptor.java @@ -0,0 +1,202 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.Interface; + +/** + * Class InterfaceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class InterfaceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public InterfaceDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "interface"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Interface target = (Interface) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Interface target = (Interface) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.Interface.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/NamingXMLTypeDescriptor.java @@ -0,0 +1,270 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.NamingXMLType; + +/** + * Class NamingXMLTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class NamingXMLTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public NamingXMLTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "namingXMLType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _elementName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.NamingType.class, "_elementName", "elementName", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamingXMLType target = (NamingXMLType) object; + return target.getElementName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamingXMLType target = (NamingXMLType) object; + target.setElementName( (org.exolab.castor.builder.binding.xml.NamingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.NamingType(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.NamingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _elementName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _complexTypeName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.NamingType.class, "_complexTypeName", "complexTypeName", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamingXMLType target = (NamingXMLType) object; + return target.getComplexTypeName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamingXMLType target = (NamingXMLType) object; + target.setComplexTypeName( (org.exolab.castor.builder.binding.xml.NamingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.NamingType(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.NamingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _complexTypeName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _modelGroupName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.NamingType.class, "_modelGroupName", "modelGroupName", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + NamingXMLType target = (NamingXMLType) object; + return target.getModelGroupName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + NamingXMLType target = (NamingXMLType) object; + target.setModelGroupName( (org.exolab.castor.builder.binding.xml.NamingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.NamingType(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.NamingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _modelGroupName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.NamingXMLType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/ClassTypeDescriptor.java @@ -0,0 +1,499 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.ClassType; + +/** + * Class ClassTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ClassTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "classType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _package + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_package", "package", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + return target.getPackage(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + target.setPackage( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _package + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _final + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_final", "final", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + if (!target.hasFinal()) { return null; } + return (target.getFinal() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFinal(); + return; + } + target.setFinal( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _final + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _abstract + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_abstract", "abstract", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + if (!target.hasAbstract()) { return null; } + return (target.getAbstract() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteAbstract(); + return; + } + target.setAbstract( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _abstract + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _equals + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_equals", "equals", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + if (!target.hasEquals()) { return null; } + return (target.getEquals() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteEquals(); + return; + } + target.setEquals( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _equals + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _bound + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_bound", "bound", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + if (!target.hasBound()) { return null; } + return (target.getBound() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteBound(); + return; + } + target.setBound( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _bound + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _implementsList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_implementsList", "implements", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + return target.getImplements(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + target.addImplements( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ClassType target = (ClassType) object; + target.removeAllImplements(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _implementsList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _extends + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_extends", "extends", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassType target = (ClassType) object; + return target.getExtends(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassType target = (ClassType) object; + target.setExtends( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _extends + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.ClassType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/IncludeTypeDescriptor.java @@ -0,0 +1,197 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.IncludeType; + +/** + * Class IncludeTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class IncludeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public IncludeTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "includeType"; + _elementDefinition = false; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _URI + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_URI", "URI", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + IncludeType target = (IncludeType) object; + return target.getURI(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + IncludeType target = (IncludeType) object; + target.setURI( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("anyURI"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _URI + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.IncludeType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/FieldTypeDescriptor.java @@ -0,0 +1,426 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.FieldType; + +/** + * Class FieldTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FieldTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FieldTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "fieldType"; + _elementDefinition = false; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldType target = (FieldType) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldType target = (FieldType) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _javaType + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_javaType", "java-type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldType target = (FieldType) object; + return target.getJavaType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldType target = (FieldType) object; + target.setJavaType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _javaType + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _wrapper + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_wrapper", "wrapper", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldType target = (FieldType) object; + if (!target.hasWrapper()) { return null; } + return (target.getWrapper() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldType target = (FieldType) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWrapper(); + return; + } + target.setWrapper( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _wrapper + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _handler + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_handler", "handler", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldType target = (FieldType) object; + return target.getHandler(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldType target = (FieldType) object; + target.setHandler( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _handler + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _collection + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType.class, "_collection", "collection", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldType target = (FieldType) object; + return target.getCollection(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldType target = (FieldType) object; + target.setCollection( (org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.builder.binding.xml.types.FieldTypeCollectionType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("FieldTypeCollectionType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _collection + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _visibility + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType.class, "_visibility", "visibility", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldType target = (FieldType) object; + return target.getVisibility(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldType target = (FieldType) object; + target.setVisibility( (org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.builder.binding.xml.types.FieldTypeVisibilityType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("FieldTypeVisibilityType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _visibility + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _validator + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_validator", "validator", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FieldType target = (FieldType) object; + return target.getValidator(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FieldType target = (FieldType) object; + target.setValidator( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _validator + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.FieldType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/codegen/target/generated-sources/castor/org/exolab/castor/builder/binding/xml/descriptors/ComponentBindingTypeDescriptor.java @@ -0,0 +1,559 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.builder.binding.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.builder.binding.xml.ComponentBindingType; + +/** + * Class ComponentBindingTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ComponentBindingTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ComponentBindingTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/SourceGenerator/Binding"; + _xmlName = "componentBindingType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _componentBindingTypeChoice + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice.class, "_componentBindingTypeChoice", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getComponentBindingTypeChoice(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.setComponentBindingTypeChoice( (org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice(); + } + }; + desc.setSchemaType("org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice"); + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new org.exolab.castor.builder.binding.xml.descriptors.ComponentBindingTypeChoiceDescriptor()); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _componentBindingTypeChoice + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _componentBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_componentBindingList", "componentBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getComponentBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.addComponentBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.removeAllComponentBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _componentBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _elementBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_elementBindingList", "elementBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getElementBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.addElementBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.removeAllElementBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _elementBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _attributeBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_attributeBindingList", "attributeBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getAttributeBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.addAttributeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.removeAllAttributeBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _attributeBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _complexTypeBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_complexTypeBindingList", "complexTypeBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getComplexTypeBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.addComplexTypeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.removeAllComplexTypeBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _complexTypeBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _groupBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_groupBindingList", "groupBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getGroupBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.addGroupBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.removeAllGroupBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _groupBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _enumBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_enumBindingList", "enumBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getEnumBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.addEnumBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.removeAllEnumBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _enumBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _simpleTypeBindingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.builder.binding.xml.ComponentBindingType.class, "_simpleTypeBindingList", "simpleTypeBinding", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ComponentBindingType target = (ComponentBindingType) object; + return target.getSimpleTypeBinding(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.addSimpleTypeBinding( (org.exolab.castor.builder.binding.xml.ComponentBindingType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + ComponentBindingType target = (ComponentBindingType) object; + target.removeAllSimpleTypeBinding(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.builder.binding.xml.ComponentBindingType(); + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.exolab.castor.builder.binding.xml.ComponentBindingType"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _simpleTypeBindingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.builder.binding.xml.ComponentBindingType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} debian/patches/fix_maven_metadata.diff0000644000000000000000000000535111712417334015272 0ustar Description: Fix Maven metadata The POM files were including an incorrect version in all artifact's specifications. Author: Miguel Landaeta Forwarded: not-needed Last-Update: 2010-06-23 diff --git a/anttask/pom.xml b/anttask/pom.xml index decda0d..5e278e3 100644 --- a/anttask/pom.xml +++ b/anttask/pom.xml @@ -6,6 +6,7 @@ 4.0.0 org.codehaus.castor castor-anttasks + 1.3.2 org.codehaus.castor diff --git a/codegen/pom.xml b/codegen/pom.xml index 3253f21..71b58db 100644 --- a/codegen/pom.xml +++ b/codegen/pom.xml @@ -6,6 +6,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.codehaus.castor castor-codegen + 1.3.2 org.codehaus.castor diff --git a/core/pom.xml b/core/pom.xml index e06ca21..f8934ec 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,6 +6,7 @@ 4.0.0 org.codehaus.castor castor-core + 1.3.2 org.codehaus.castor diff --git a/cpa/pom.xml b/cpa/pom.xml index 90364eb..19e2ab5 100644 --- a/cpa/pom.xml +++ b/cpa/pom.xml @@ -6,6 +6,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.codehaus.castor castor-jdo + 1.3.2 org.codehaus.castor diff --git a/ddlgen/pom.xml b/ddlgen/pom.xml index b19418f..3bc7f27 100644 --- a/ddlgen/pom.xml +++ b/ddlgen/pom.xml @@ -6,6 +6,7 @@ 4.0.0 org.codehaus.castor castor-ddlgen + 1.3.2 org.codehaus.castor diff --git a/schema/pom.xml b/schema/pom.xml index 26c907c..b0be80a 100644 --- a/schema/pom.xml +++ b/schema/pom.xml @@ -6,6 +6,7 @@ 4.0.0 org.codehaus.castor castor-xml-schema + 1.3.2 org.codehaus.castor diff --git a/xml/pom.xml b/xml/pom.xml index e6c7564..7b0ad6d 100644 --- a/xml/pom.xml +++ b/xml/pom.xml @@ -8,6 +8,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.codehaus.castor castor-xml + 1.3.2 org.codehaus.castor debian/patches/add_schema_generated_sources.diff0000644000000000000000000034253611712417334017320 0ustar Description: add autogenerated sources to schema module These classes were generated with castor-maven-plugin. The reason why they are not generated at build time is because castor-maven-plugin is not available in Debian since it depends on this package. When castor gets accepted in the archive, castor-maven-plugin will be packaged and when it gets accepted in the archive, this package will re rebuilt with that plugin and this patch will be removed. Author: Miguel Landaeta Forwarded: not-needed Last-Update: 2010-06-27 --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/.castor.cdr @@ -0,0 +1,9 @@ +#Sat Jun 12 20:14:23 VET 2010 +org.exolab.castor.xml.schema.annotations.jdo.ManyToMany=org.exolab.castor.xml.schema.annotations.jdo.descriptors.ManyToManyDescriptor +org.exolab.castor.xml.schema.annotations.jdo.Column=org.exolab.castor.xml.schema.annotations.jdo.descriptors.ColumnDescriptor +org.exolab.castor.xml.schema.annotations.jdo.OneToMany=org.exolab.castor.xml.schema.annotations.jdo.descriptors.OneToManyDescriptor +org.exolab.castor.xml.schema.annotations.jdo.OneToOne=org.exolab.castor.xml.schema.annotations.jdo.descriptors.OneToOneDescriptor +org.exolab.castor.xml.schema.annotations.jdo.PkType=org.exolab.castor.xml.schema.annotations.jdo.descriptors.PkTypeDescriptor +org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey=org.exolab.castor.xml.schema.annotations.jdo.descriptors.PrimaryKeyDescriptor +org.exolab.castor.xml.schema.annotations.jdo.Table=org.exolab.castor.xml.schema.annotations.jdo.descriptors.TableDescriptor +org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType=org.exolab.castor.xml.schema.annotations.jdo.descriptors.ReadonlyDirtyTypeDescriptor --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/OneToMany.java @@ -0,0 +1,153 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Class OneToMany. + * + * @version $Revision$ $Date$ + */ +public class OneToMany extends org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The name attribute specifies the name of + * the column that represents this + * relation. + * + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public OneToMany() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: The name attribute specifies the name + * of + * the column that represents this + * relation. + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: The name attribute specifies the name + * of + * the column that represents this + * relation. + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyTyp + */ + public static org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.OneToMany.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/Column.java @@ -0,0 +1,259 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Element 'column' is used to specify the column where the + * property of an object will be saved. + * + * + * @version $Revision$ $Date$ + */ +public class Column extends org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Attribute 'name' is used to specify the + * name of the column. + * + */ + private java.lang.String _name; + + /** + * Attribute 'type' is used to specify the + * JDO-type of the column. + * + */ + private java.lang.String _type; + + /** + * Specifies if this field accepts NULL + * values or not. + * + */ + private boolean _acceptNull = true; + + /** + * keeps track of state for field: _acceptNull + */ + private boolean _has_acceptNull; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Column() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteAcceptNull( + ) { + this._has_acceptNull= false; + } + + /** + * Returns the value of field 'acceptNull'. The field + * 'acceptNull' has the following description: Specifies if + * this field accepts NULL + * values or not. + * + * + * @return the value of field 'AcceptNull'. + */ + public boolean getAcceptNull( + ) { + return this._acceptNull; + } + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: Attribute 'name' is used to specify + * the + * name of the column. + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'type'. The field 'type' has the + * following description: Attribute 'type' is used to specify + * the + * JDO-type of the column. + * + * + * @return the value of field 'Type'. + */ + public java.lang.String getType( + ) { + return this._type; + } + + /** + * Method hasAcceptNull. + * + * @return true if at least one AcceptNull has been added + */ + public boolean hasAcceptNull( + ) { + return this._has_acceptNull; + } + + /** + * Returns the value of field 'acceptNull'. The field + * 'acceptNull' has the following description: Specifies if + * this field accepts NULL + * values or not. + * + * + * @return the value of field 'AcceptNull'. + */ + public boolean isAcceptNull( + ) { + return this._acceptNull; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'acceptNull'. The field 'acceptNull' + * has the following description: Specifies if this field + * accepts NULL + * values or not. + * + * + * @param acceptNull the value of field 'acceptNull'. + */ + public void setAcceptNull( + final boolean acceptNull) { + this._acceptNull = acceptNull; + this._has_acceptNull = true; + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: Attribute 'name' is used to specify + * the + * name of the column. + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'type'. The field 'type' has the + * following description: Attribute 'type' is used to specify + * the + * JDO-type of the column. + * + * + * @param type the value of field 'type'. + */ + public void setType( + final java.lang.String type) { + this._type = type; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyTyp + */ + public static org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.Column.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/ManyToMany.java @@ -0,0 +1,157 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Class ManyToMany. + * + * @version $Revision$ $Date$ + */ +public class ManyToMany implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The name attribute specifies the name of the + * column that represents this relation. Note that + * you do not need to specify the name for the + * additional table created to realize the many to + * many relation (this is done implicitly). + * + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ManyToMany() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: The name attribute specifies the name + * of the + * column that represents this relation. Note that + * you do not need to specify the name for the + * additional table created to realize the many to + * many relation (this is done implicitly). + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: The name attribute specifies the name + * of the + * column that represents this relation. Note that + * you do not need to specify the name for the + * additional table created to realize the many to + * many relation (this is done implicitly). + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.ManyToMany + */ + public static org.exolab.castor.xml.schema.annotations.jdo.ManyToMany unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.ManyToMany) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.ManyToMany.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/PkType.java @@ -0,0 +1,279 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Class PkType. + * + * @version $Revision$ $Date$ + */ +public class PkType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _keyList. + */ + private java.util.List _keyList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PkType() { + super(); + this._keyList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vKey + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addKey( + final java.lang.String vKey) + throws java.lang.IndexOutOfBoundsException { + this._keyList.add(vKey); + } + + /** + * + * + * @param index + * @param vKey + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addKey( + final int index, + final java.lang.String vKey) + throws java.lang.IndexOutOfBoundsException { + this._keyList.add(index, vKey); + } + + /** + * Method enumerateKey. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateKey( + ) { + return java.util.Collections.enumeration(this._keyList); + } + + /** + * Method getKey. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the java.lang.String at the given index + */ + public java.lang.String getKey( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._keyList.size()) { + throw new IndexOutOfBoundsException("getKey: Index value '" + index + "' not in range [0.." + (this._keyList.size() - 1) + "]"); + } + + return (java.lang.String) _keyList.get(index); + } + + /** + * Method getKey.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public java.lang.String[] getKey( + ) { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._keyList.toArray(array); + } + + /** + * Method getKeyCount. + * + * @return the size of this collection + */ + public int getKeyCount( + ) { + return this._keyList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateKey. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateKey( + ) { + return this._keyList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllKey( + ) { + this._keyList.clear(); + } + + /** + * Method removeKey. + * + * @param vKey + * @return true if the object was removed from the collection. + */ + public boolean removeKey( + final java.lang.String vKey) { + boolean removed = _keyList.remove(vKey); + return removed; + } + + /** + * Method removeKeyAt. + * + * @param index + * @return the element removed from the collection + */ + public java.lang.String removeKeyAt( + final int index) { + java.lang.Object obj = this._keyList.remove(index); + return (java.lang.String) obj; + } + + /** + * + * + * @param index + * @param vKey + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setKey( + final int index, + final java.lang.String vKey) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._keyList.size()) { + throw new IndexOutOfBoundsException("setKey: Index value '" + index + "' not in range [0.." + (this._keyList.size() - 1) + "]"); + } + + this._keyList.set(index, vKey); + } + + /** + * + * + * @param vKeyArray + */ + public void setKey( + final java.lang.String[] vKeyArray) { + //-- copy array + _keyList.clear(); + + for (int i = 0; i < vKeyArray.length; i++) { + this._keyList.add(vKeyArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.PkType + */ + public static org.exolab.castor.xml.schema.annotations.jdo.PkType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.PkType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.PkType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/OneToOne.java @@ -0,0 +1,153 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Class OneToOne. + * + * @version $Revision$ $Date$ + */ +public class OneToOne extends org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The name attribute specifies the name of + * the column that represents this + * relation. + * + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public OneToOne() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: The name attribute specifies the name + * of + * the column that represents this + * relation. + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: The name attribute specifies the name + * of + * the column that represents this + * relation. + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyTyp + */ + public static org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.OneToOne.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/Table.java @@ -0,0 +1,277 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Element 'table' is used to specify the table where the + * Object will be saved. + * + * + * @version $Revision$ $Date$ + */ +public class Table implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Attribute 'name' is used to specify the name of + * the table. + * + */ + private java.lang.String _name; + + /** + * Field _accessMode. + */ + private org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType _accessMode = org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType.valueOf("shared"); + + /** + * Attribute 'detachable' is used to indicate that the + * domain entity generated will support Castor JDO + * long transactions out of the box. + * + */ + private boolean _detachable = false; + + /** + * keeps track of state for field: _detachable + */ + private boolean _has_detachable; + + /** + * Field _primaryKey. + */ + private org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey _primaryKey; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Table() { + super(); + setAccessMode(org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType.valueOf("shared")); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteDetachable( + ) { + this._has_detachable= false; + } + + /** + * Returns the value of field 'accessMode'. + * + * @return the value of field 'AccessMode'. + */ + public org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType getAccessMode( + ) { + return this._accessMode; + } + + /** + * Returns the value of field 'detachable'. The field + * 'detachable' has the following description: Attribute + * 'detachable' is used to indicate that the + * domain entity generated will support Castor JDO + * long transactions out of the box. + * + * + * @return the value of field 'Detachable'. + */ + public boolean getDetachable( + ) { + return this._detachable; + } + + /** + * Returns the value of field 'name'. The field 'name' has the + * following description: Attribute 'name' is used to specify + * the name of + * the table. + * + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'primaryKey'. + * + * @return the value of field 'PrimaryKey'. + */ + public org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey getPrimaryKey( + ) { + return this._primaryKey; + } + + /** + * Method hasDetachable. + * + * @return true if at least one Detachable has been added + */ + public boolean hasDetachable( + ) { + return this._has_detachable; + } + + /** + * Returns the value of field 'detachable'. The field + * 'detachable' has the following description: Attribute + * 'detachable' is used to indicate that the + * domain entity generated will support Castor JDO + * long transactions out of the box. + * + * + * @return the value of field 'Detachable'. + */ + public boolean isDetachable( + ) { + return this._detachable; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'accessMode'. + * + * @param accessMode the value of field 'accessMode'. + */ + public void setAccessMode( + final org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType accessMode) { + this._accessMode = accessMode; + } + + /** + * Sets the value of field 'detachable'. The field 'detachable' + * has the following description: Attribute 'detachable' is + * used to indicate that the + * domain entity generated will support Castor JDO + * long transactions out of the box. + * + * + * @param detachable the value of field 'detachable'. + */ + public void setDetachable( + final boolean detachable) { + this._detachable = detachable; + this._has_detachable = true; + } + + /** + * Sets the value of field 'name'. The field 'name' has the + * following description: Attribute 'name' is used to specify + * the name of + * the table. + * + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'primaryKey'. + * + * @param primaryKey the value of field 'primaryKey'. + */ + public void setPrimaryKey( + final org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey primaryKey) { + this._primaryKey = primaryKey; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.Table + */ + public static org.exolab.castor.xml.schema.annotations.jdo.Table unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.Table) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.Table.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/ReadonlyDirtyType.java @@ -0,0 +1,257 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Class ReadonlyDirtyType. + * + * @version $Revision$ $Date$ + */ +public class ReadonlyDirtyType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Attribute 'read-only' is used to set off changing + * the column. If true, no update can be performed. + * + */ + private boolean _readOnly = false; + + /** + * keeps track of state for field: _readOnly + */ + private boolean _has_readOnly; + + /** + * If the value is 'true', the field will not be + * checked against the database for modification. + * + */ + private boolean _dirty = false; + + /** + * keeps track of state for field: _dirty + */ + private boolean _has_dirty; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ReadonlyDirtyType() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteDirty( + ) { + this._has_dirty= false; + } + + /** + */ + public void deleteReadOnly( + ) { + this._has_readOnly= false; + } + + /** + * Returns the value of field 'dirty'. The field 'dirty' has + * the following description: If the value is 'true', the field + * will not be + * checked against the database for modification. + * + * + * @return the value of field 'Dirty'. + */ + public boolean getDirty( + ) { + return this._dirty; + } + + /** + * Returns the value of field 'readOnly'. The field 'readOnly' + * has the following description: Attribute 'read-only' is used + * to set off changing + * the column. If true, no update can be performed. + * + * + * @return the value of field 'ReadOnly'. + */ + public boolean getReadOnly( + ) { + return this._readOnly; + } + + /** + * Method hasDirty. + * + * @return true if at least one Dirty has been added + */ + public boolean hasDirty( + ) { + return this._has_dirty; + } + + /** + * Method hasReadOnly. + * + * @return true if at least one ReadOnly has been added + */ + public boolean hasReadOnly( + ) { + return this._has_readOnly; + } + + /** + * Returns the value of field 'dirty'. The field 'dirty' has + * the following description: If the value is 'true', the field + * will not be + * checked against the database for modification. + * + * + * @return the value of field 'Dirty'. + */ + public boolean isDirty( + ) { + return this._dirty; + } + + /** + * Returns the value of field 'readOnly'. The field 'readOnly' + * has the following description: Attribute 'read-only' is used + * to set off changing + * the column. If true, no update can be performed. + * + * + * @return the value of field 'ReadOnly'. + */ + public boolean isReadOnly( + ) { + return this._readOnly; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'dirty'. The field 'dirty' has the + * following description: If the value is 'true', the field + * will not be + * checked against the database for modification. + * + * + * @param dirty the value of field 'dirty'. + */ + public void setDirty( + final boolean dirty) { + this._dirty = dirty; + this._has_dirty = true; + } + + /** + * Sets the value of field 'readOnly'. The field 'readOnly' has + * the following description: Attribute 'read-only' is used to + * set off changing + * the column. If true, no update can be performed. + * + * + * @param readOnly the value of field 'readOnly'. + */ + public void setReadOnly( + final boolean readOnly) { + this._readOnly = readOnly; + this._has_readOnly = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyTyp + */ + public static org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/PrimaryKey.java @@ -0,0 +1,110 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo; + +/** + * Class PrimaryKey. + * + * @version $Revision$ $Date$ + */ +public class PrimaryKey extends PkType +implements java.io.Serializable +{ + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PrimaryKey() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.exolab.castor.xml.schema.annotations.jdo.PkType + */ + public static org.exolab.castor.xml.schema.annotations.jdo.PkType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.exolab.castor.xml.schema.annotations.jdo.PkType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/types/.castor.cdr @@ -0,0 +1,2 @@ +#Sat Jun 12 20:14:23 VET 2010 +org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType=org.exolab.castor.xml.schema.annotations.jdo.types.descriptors.TableAccessModeTypeDescriptor --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/types/TableAccessModeType.java @@ -0,0 +1,173 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.types; + +/** + * Class TableAccessModeType. + * + * @version $Revision$ $Date$ + */ +public class TableAccessModeType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * The read-only type + */ + public static final int READ_ONLY_TYPE = 0; + + /** + * The instance of the read-only type + */ + public static final TableAccessModeType READ_ONLY = new TableAccessModeType(READ_ONLY_TYPE, "read-only"); + + /** + * The shared type + */ + public static final int SHARED_TYPE = 1; + + /** + * The instance of the shared type + */ + public static final TableAccessModeType SHARED = new TableAccessModeType(SHARED_TYPE, "shared"); + + /** + * The exclusive type + */ + public static final int EXCLUSIVE_TYPE = 2; + + /** + * The instance of the exclusive type + */ + public static final TableAccessModeType EXCLUSIVE = new TableAccessModeType(EXCLUSIVE_TYPE, "exclusive"); + + /** + * The db-locked type + */ + public static final int DB_LOCKED_TYPE = 3; + + /** + * The instance of the db-locked type + */ + public static final TableAccessModeType DB_LOCKED = new TableAccessModeType(DB_LOCKED_TYPE, "db-locked"); + + /** + * Field _memberTable. + */ + private static java.util.Hashtable _memberTable = init(); + + /** + * Field type. + */ + private final int type; + + /** + * Field stringValue. + */ + private java.lang.String stringValue = null; + + + //----------------/ + //- Constructors -/ + //----------------/ + + private TableAccessModeType(final int type, final java.lang.String value) { + super(); + this.type = type; + this.stringValue = value; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method enumerate.Returns an enumeration of all possible + * instances of TableAccessModeType + * + * @return an Enumeration over all possible instances of + * TableAccessModeType + */ + public static java.util.Enumeration enumerate( + ) { + return _memberTable.elements(); + } + + /** + * Method getType.Returns the type of this TableAccessModeType + * + * @return the type of this TableAccessModeType + */ + public int getType( + ) { + return this.type; + } + + /** + * Method init. + * + * @return the initialized Hashtable for the member table + */ + private static java.util.Hashtable init( + ) { + java.util.Hashtable members = new java.util.Hashtable(); + members.put("read-only", READ_ONLY); + members.put("shared", SHARED); + members.put("exclusive", EXCLUSIVE); + members.put("db-locked", DB_LOCKED); + return members; + } + + /** + * Method readResolve. will be called during deserialization to + * replace the deserialized object with the correct constant + * instance. + * + * @return this deserialized object + */ + private java.lang.Object readResolve( + ) { + return valueOf(this.stringValue); + } + + /** + * Method toString.Returns the String representation of this + * TableAccessModeType + * + * @return the String representation of this TableAccessModeType + */ + public java.lang.String toString( + ) { + return this.stringValue; + } + + /** + * Method valueOf.Returns a new TableAccessModeType based on + * the given String value. + * + * @param string + * @return the TableAccessModeType value of parameter 'string' + */ + public static org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType valueOf( + final java.lang.String string) { + java.lang.Object obj = null; + if (string != null) { + obj = _memberTable.get(string); + } + if (obj == null) { + String err = "" + string + " is not a valid TableAccessModeType"; + throw new IllegalArgumentException(err); + } + return (TableAccessModeType) obj; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/types/descriptors/TableAccessModeTypeDescriptor.java @@ -0,0 +1,155 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.types.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType; + +/** + * Class TableAccessModeTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class TableAccessModeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TableAccessModeTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "TableAccessModeType"; + _elementDefinition = false; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/ManyToManyDescriptor.java @@ -0,0 +1,200 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.ManyToMany; + +/** + * Class ManyToManyDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ManyToManyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ManyToManyDescriptor() { + super(); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "many-to-many"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ManyToMany target = (ManyToMany) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ManyToMany target = (ManyToMany) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.ManyToMany.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/ReadonlyDirtyTypeDescriptor.java @@ -0,0 +1,246 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType; + +/** + * Class ReadonlyDirtyTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ReadonlyDirtyTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ReadonlyDirtyTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "readonlyDirtyType"; + _elementDefinition = false; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _readOnly + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_readOnly", "read-only", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ReadonlyDirtyType target = (ReadonlyDirtyType) object; + if (!target.hasReadOnly()) { return null; } + return (target.getReadOnly() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ReadonlyDirtyType target = (ReadonlyDirtyType) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteReadOnly(); + return; + } + target.setReadOnly( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _readOnly + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _dirty + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_dirty", "dirty", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ReadonlyDirtyType target = (ReadonlyDirtyType) object; + if (!target.hasDirty()) { return null; } + return (target.getDirty() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ReadonlyDirtyType target = (ReadonlyDirtyType) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDirty(); + return; + } + target.setDirty( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _dirty + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.ReadonlyDirtyType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/TableDescriptor.java @@ -0,0 +1,319 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.Table; + +/** + * Class TableDescriptor. + * + * @version $Revision$ $Date$ + */ +public class TableDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TableDescriptor() { + super(); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "table"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Table target = (Table) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Table target = (Table) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _accessMode + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType.class, "_accessMode", "accessMode", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Table target = (Table) object; + return target.getAccessMode(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Table target = (Table) object; + target.setAccessMode( (org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.xml.schema.annotations.jdo.types.TableAccessModeType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("TableAccessModeType"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _accessMode + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _detachable + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_detachable", "detachable", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Table target = (Table) object; + if (!target.hasDetachable()) { return null; } + return (target.getDetachable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Table target = (Table) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDetachable(); + return; + } + target.setDetachable( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _detachable + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _primaryKey + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey.class, "_primaryKey", "primaryKey", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Table target = (Table) object; + return target.getPrimaryKey(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Table target = (Table) object; + target.setPrimaryKey( (org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey(); + } + }; + desc.setSchemaType("org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/binding/persistence"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _primaryKey + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.Table.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/OneToOneDescriptor.java @@ -0,0 +1,204 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.OneToOne; + +/** + * Class OneToOneDescriptor. + * + * @version $Revision$ $Date$ + */ +public class OneToOneDescriptor extends org.exolab.castor.xml.schema.annotations.jdo.descriptors.ReadonlyDirtyTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public OneToOneDescriptor() { + super(); + setExtendsWithoutFlatten(new org.exolab.castor.xml.schema.annotations.jdo.descriptors.ReadonlyDirtyTypeDescriptor()); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "one-to-one"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + OneToOne target = (OneToOne) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + OneToOne target = (OneToOne) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.OneToOne.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/OneToManyDescriptor.java @@ -0,0 +1,204 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.OneToMany; + +/** + * Class OneToManyDescriptor. + * + * @version $Revision$ $Date$ + */ +public class OneToManyDescriptor extends org.exolab.castor.xml.schema.annotations.jdo.descriptors.ReadonlyDirtyTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public OneToManyDescriptor() { + super(); + setExtendsWithoutFlatten(new org.exolab.castor.xml.schema.annotations.jdo.descriptors.ReadonlyDirtyTypeDescriptor()); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "one-to-many"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + OneToMany target = (OneToMany) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + OneToMany target = (OneToMany) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.OneToMany.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/PrimaryKeyDescriptor.java @@ -0,0 +1,159 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey; + +/** + * Class PrimaryKeyDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PrimaryKeyDescriptor extends org.exolab.castor.xml.schema.annotations.jdo.descriptors.PkTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PrimaryKeyDescriptor() { + super(); + setExtendsWithoutFlatten(new org.exolab.castor.xml.schema.annotations.jdo.descriptors.PkTypeDescriptor()); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "primaryKey"; + _elementDefinition = true; + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.PrimaryKey.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/ColumnDescriptor.java @@ -0,0 +1,288 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.Column; + +/** + * Class ColumnDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ColumnDescriptor extends org.exolab.castor.xml.schema.annotations.jdo.descriptors.ReadonlyDirtyTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ColumnDescriptor() { + super(); + setExtendsWithoutFlatten(new org.exolab.castor.xml.schema.annotations.jdo.descriptors.ReadonlyDirtyTypeDescriptor()); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "column"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Column target = (Column) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Column target = (Column) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Column target = (Column) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Column target = (Column) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _acceptNull + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_acceptNull", "acceptNull", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Column target = (Column) object; + if (!target.hasAcceptNull()) { return null; } + return (target.getAcceptNull() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Column target = (Column) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteAcceptNull(); + return; + } + target.setAcceptNull( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("boolean"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _acceptNull + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.Column.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.1/schema/target/generated-sources/castor/org/exolab/castor/xml/schema/annotations/jdo/descriptors/PkTypeDescriptor.java @@ -0,0 +1,216 @@ +/* + * This class was automatically generated with + * Castor 1.3.0.1, using an XML + * Schema. + * $Id$ + */ + +package org.exolab.castor.xml.schema.annotations.jdo.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.schema.annotations.jdo.PkType; + +/** + * Class PkTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PkTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PkTypeDescriptor() { + super(); + _nsURI = "http://www.castor.org/binding/persistence"; + _xmlName = "pkType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _keyList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_keyList", "key", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PkType target = (PkType) object; + return target.getKey(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PkType target = (PkType) object; + target.addKey( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + PkType target = (PkType) object; + target.removeAllKey(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("string"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.castor.org/binding/persistence"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _keyList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return org.exolab.castor.xml.schema.annotations.jdo.PkType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} debian/patches/series0000644000000000000000000000026111712417334012034 0ustar add_xml_generated_sources.diff add_codegen_generated_sources.diff add_cpa_generated_sources.diff add_schema_generated_sources.diff fix_debian_build.diff fix_maven_metadata.diff debian/patches/add_cpa_generated_sources.diff0000644000000000000000000056602711712417334016626 0ustar Description: add autogenerated sources to cpa/jdo module These classes were generated with castor-maven-plugin. The reason why they are not generated at build time is because castor-maven-plugin is not available in Debian since it depends on this package. When castor gets accepted in the archive, castor-maven-plugin will be packaged and when it gets accepted in the archive, this package will re rebuilt with that plugin and this patch will be removed. Author: Miguel Landaeta Forwarded: no Last-Update: 2012-01-21 --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/.castor.cdr @@ -0,0 +1,13 @@ +#Sun Jan 22 02:12:12 UTC 2012 +org.castor.jdo.conf.ClassMapping=org.castor.jdo.conf.descriptors.ClassMappingDescriptor +org.castor.jdo.conf.Jndi=org.castor.jdo.conf.descriptors.JndiDescriptor +org.castor.jdo.conf.TransactionManager=org.castor.jdo.conf.descriptors.TransactionManagerDescriptor +org.castor.jdo.conf.TransactionDemarcation=org.castor.jdo.conf.descriptors.TransactionDemarcationDescriptor +org.castor.jdo.conf.JdoConf=org.castor.jdo.conf.descriptors.JdoConfDescriptor +org.castor.jdo.conf.Param=org.castor.jdo.conf.descriptors.ParamDescriptor +org.castor.jdo.conf.DataSource=org.castor.jdo.conf.descriptors.DataSourceDescriptor +org.castor.jdo.conf.DatabaseChoice=org.castor.jdo.conf.descriptors.DatabaseChoiceDescriptor +org.castor.jdo.conf.PackageMapping=org.castor.jdo.conf.descriptors.PackageMappingDescriptor +org.castor.jdo.conf.Driver=org.castor.jdo.conf.descriptors.DriverDescriptor +org.castor.jdo.conf.Database=org.castor.jdo.conf.descriptors.DatabaseDescriptor +org.castor.jdo.conf.Mapping=org.castor.jdo.conf.descriptors.MappingDescriptor --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/Mapping.java @@ -0,0 +1,138 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class Mapping. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Mapping implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _href. + */ + private java.lang.String _href; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Mapping() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'href'. + * + * @return the value of field 'Href'. + */ + public java.lang.String getHref( + ) { + return this._href; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'href'. + * + * @param href the value of field 'href'. + */ + public void setHref( + final java.lang.String href) { + this._href = href; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.Mapping + */ + public static org.castor.jdo.conf.Mapping unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.Mapping) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.Mapping.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/JdoConf.java @@ -0,0 +1,332 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class JdoConf. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class JdoConf implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name = "jdo-conf"; + + /** + * Field _databaseList. + */ + private java.util.List _databaseList; + + /** + * Field _transactionDemarcation. + */ + private org.castor.jdo.conf.TransactionDemarcation _transactionDemarcation; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JdoConf() { + super(); + setName("jdo-conf"); + this._databaseList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vDatabase + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addDatabase( + final org.castor.jdo.conf.Database vDatabase) + throws java.lang.IndexOutOfBoundsException { + this._databaseList.add(vDatabase); + } + + /** + * + * + * @param index + * @param vDatabase + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addDatabase( + final int index, + final org.castor.jdo.conf.Database vDatabase) + throws java.lang.IndexOutOfBoundsException { + this._databaseList.add(index, vDatabase); + } + + /** + * Method enumerateDatabase. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateDatabase( + ) { + return java.util.Collections.enumeration(this._databaseList); + } + + /** + * Method getDatabase. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.castor.jdo.conf.Database at the + * given index + */ + public org.castor.jdo.conf.Database getDatabase( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._databaseList.size()) { + throw new IndexOutOfBoundsException("getDatabase: Index value '" + index + "' not in range [0.." + (this._databaseList.size() - 1) + "]"); + } + + return (org.castor.jdo.conf.Database) _databaseList.get(index); + } + + /** + * Method getDatabase.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.castor.jdo.conf.Database[] getDatabase( + ) { + org.castor.jdo.conf.Database[] array = new org.castor.jdo.conf.Database[0]; + return (org.castor.jdo.conf.Database[]) this._databaseList.toArray(array); + } + + /** + * Method getDatabaseCount. + * + * @return the size of this collection + */ + public int getDatabaseCount( + ) { + return this._databaseList.size(); + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'transactionDemarcation'. + * + * @return the value of field 'TransactionDemarcation'. + */ + public org.castor.jdo.conf.TransactionDemarcation getTransactionDemarcation( + ) { + return this._transactionDemarcation; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateDatabase. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateDatabase( + ) { + return this._databaseList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllDatabase( + ) { + this._databaseList.clear(); + } + + /** + * Method removeDatabase. + * + * @param vDatabase + * @return true if the object was removed from the collection. + */ + public boolean removeDatabase( + final org.castor.jdo.conf.Database vDatabase) { + boolean removed = _databaseList.remove(vDatabase); + return removed; + } + + /** + * Method removeDatabaseAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.jdo.conf.Database removeDatabaseAt( + final int index) { + java.lang.Object obj = this._databaseList.remove(index); + return (org.castor.jdo.conf.Database) obj; + } + + /** + * + * + * @param index + * @param vDatabase + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setDatabase( + final int index, + final org.castor.jdo.conf.Database vDatabase) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._databaseList.size()) { + throw new IndexOutOfBoundsException("setDatabase: Index value '" + index + "' not in range [0.." + (this._databaseList.size() - 1) + "]"); + } + + this._databaseList.set(index, vDatabase); + } + + /** + * + * + * @param vDatabaseArray + */ + public void setDatabase( + final org.castor.jdo.conf.Database[] vDatabaseArray) { + //-- copy array + _databaseList.clear(); + + for (int i = 0; i < vDatabaseArray.length; i++) { + this._databaseList.add(vDatabaseArray[i]); + } + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'transactionDemarcation'. + * + * @param transactionDemarcation the value of field + * 'transactionDemarcation'. + */ + public void setTransactionDemarcation( + final org.castor.jdo.conf.TransactionDemarcation transactionDemarcation) { + this._transactionDemarcation = transactionDemarcation; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.JdoConf + */ + public static org.castor.jdo.conf.JdoConf unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.JdoConf) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.JdoConf.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/DatabaseChoice.java @@ -0,0 +1,188 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class DatabaseChoice. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class DatabaseChoice implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _driver. + */ + private org.castor.jdo.conf.Driver _driver; + + /** + * Field _dataSource. + */ + private org.castor.jdo.conf.DataSource _dataSource; + + /** + * Field _jndi. + */ + private org.castor.jdo.conf.Jndi _jndi; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DatabaseChoice() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'dataSource'. + * + * @return the value of field 'DataSource'. + */ + public org.castor.jdo.conf.DataSource getDataSource( + ) { + return this._dataSource; + } + + /** + * Returns the value of field 'driver'. + * + * @return the value of field 'Driver'. + */ + public org.castor.jdo.conf.Driver getDriver( + ) { + return this._driver; + } + + /** + * Returns the value of field 'jndi'. + * + * @return the value of field 'Jndi'. + */ + public org.castor.jdo.conf.Jndi getJndi( + ) { + return this._jndi; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'dataSource'. + * + * @param dataSource the value of field 'dataSource'. + */ + public void setDataSource( + final org.castor.jdo.conf.DataSource dataSource) { + this._dataSource = dataSource; + } + + /** + * Sets the value of field 'driver'. + * + * @param driver the value of field 'driver'. + */ + public void setDriver( + final org.castor.jdo.conf.Driver driver) { + this._driver = driver; + } + + /** + * Sets the value of field 'jndi'. + * + * @param jndi the value of field 'jndi'. + */ + public void setJndi( + final org.castor.jdo.conf.Jndi jndi) { + this._jndi = jndi; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.DatabaseChoice + */ + public static org.castor.jdo.conf.DatabaseChoice unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.DatabaseChoice) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.DatabaseChoice.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/Param.java @@ -0,0 +1,163 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class Param. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Param implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _value. + */ + private java.lang.String _value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Param() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Returns the value of field 'value'. + * + * @return the value of field 'Value'. + */ + public java.lang.String getValue( + ) { + return this._value; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue( + final java.lang.String value) { + this._value = value; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.Param + */ + public static org.castor.jdo.conf.Param unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.Param) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.Param.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/ClassMapping.java @@ -0,0 +1,138 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class ClassMapping. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class ClassMapping implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassMapping() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.ClassMapping + */ + public static org.castor.jdo.conf.ClassMapping unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.ClassMapping) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.ClassMapping.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/TransactionDemarcation.java @@ -0,0 +1,165 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class TransactionDemarcation. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class TransactionDemarcation implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _mode. + */ + private java.lang.String _mode; + + /** + * Field _transactionManager. + */ + private org.castor.jdo.conf.TransactionManager _transactionManager; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TransactionDemarcation() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'mode'. + * + * @return the value of field 'Mode'. + */ + public java.lang.String getMode( + ) { + return this._mode; + } + + /** + * Returns the value of field 'transactionManager'. + * + * @return the value of field 'TransactionManager'. + */ + public org.castor.jdo.conf.TransactionManager getTransactionManager( + ) { + return this._transactionManager; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'mode'. + * + * @param mode the value of field 'mode'. + */ + public void setMode( + final java.lang.String mode) { + this._mode = mode; + } + + /** + * Sets the value of field 'transactionManager'. + * + * @param transactionManager the value of field + * 'transactionManager'. + */ + public void setTransactionManager( + final org.castor.jdo.conf.TransactionManager transactionManager) { + this._transactionManager = transactionManager; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * org.castor.jdo.conf.TransactionDemarcation + */ + public static org.castor.jdo.conf.TransactionDemarcation unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.TransactionDemarcation) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.TransactionDemarcation.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/PackageMapping.java @@ -0,0 +1,138 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class PackageMapping. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class PackageMapping implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PackageMapping() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.PackageMapping + */ + public static org.castor.jdo.conf.PackageMapping unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.PackageMapping) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.PackageMapping.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/DataSource.java @@ -0,0 +1,305 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class DataSource. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class DataSource implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _className. + */ + private java.lang.String _className; + + /** + * Field _paramList. + */ + private java.util.List _paramList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DataSource() { + super(); + this._paramList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(vParam); + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final int index, + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(index, vParam); + } + + /** + * Method enumerateParam. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateParam( + ) { + return java.util.Collections.enumeration(this._paramList); + } + + /** + * Returns the value of field 'className'. + * + * @return the value of field 'ClassName'. + */ + public java.lang.String getClassName( + ) { + return this._className; + } + + /** + * Method getParam. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.castor.jdo.conf.Param at the + * given index + */ + public org.castor.jdo.conf.Param getParam( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("getParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + return (org.castor.jdo.conf.Param) _paramList.get(index); + } + + /** + * Method getParam.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.castor.jdo.conf.Param[] getParam( + ) { + org.castor.jdo.conf.Param[] array = new org.castor.jdo.conf.Param[0]; + return (org.castor.jdo.conf.Param[]) this._paramList.toArray(array); + } + + /** + * Method getParamCount. + * + * @return the size of this collection + */ + public int getParamCount( + ) { + return this._paramList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateParam. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateParam( + ) { + return this._paramList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllParam( + ) { + this._paramList.clear(); + } + + /** + * Method removeParam. + * + * @param vParam + * @return true if the object was removed from the collection. + */ + public boolean removeParam( + final org.castor.jdo.conf.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.jdo.conf.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.castor.jdo.conf.Param) obj; + } + + /** + * Sets the value of field 'className'. + * + * @param className the value of field 'className'. + */ + public void setClassName( + final java.lang.String className) { + this._className = className; + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setParam( + final int index, + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("setParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + this._paramList.set(index, vParam); + } + + /** + * + * + * @param vParamArray + */ + public void setParam( + final org.castor.jdo.conf.Param[] vParamArray) { + //-- copy array + _paramList.clear(); + + for (int i = 0; i < vParamArray.length; i++) { + this._paramList.add(vParamArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.DataSource + */ + public static org.castor.jdo.conf.DataSource unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.DataSource) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.DataSource.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/Jndi.java @@ -0,0 +1,138 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class Jndi. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Jndi implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Jndi() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.Jndi + */ + public static org.castor.jdo.conf.Jndi unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.Jndi) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.Jndi.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/TransactionManager.java @@ -0,0 +1,306 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class TransactionManager. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class TransactionManager implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name = "local"; + + /** + * Field _paramList. + */ + private java.util.List _paramList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TransactionManager() { + super(); + setName("local"); + this._paramList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(vParam); + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final int index, + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(index, vParam); + } + + /** + * Method enumerateParam. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateParam( + ) { + return java.util.Collections.enumeration(this._paramList); + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method getParam. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.castor.jdo.conf.Param at the + * given index + */ + public org.castor.jdo.conf.Param getParam( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("getParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + return (org.castor.jdo.conf.Param) _paramList.get(index); + } + + /** + * Method getParam.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.castor.jdo.conf.Param[] getParam( + ) { + org.castor.jdo.conf.Param[] array = new org.castor.jdo.conf.Param[0]; + return (org.castor.jdo.conf.Param[]) this._paramList.toArray(array); + } + + /** + * Method getParamCount. + * + * @return the size of this collection + */ + public int getParamCount( + ) { + return this._paramList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateParam. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateParam( + ) { + return this._paramList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllParam( + ) { + this._paramList.clear(); + } + + /** + * Method removeParam. + * + * @param vParam + * @return true if the object was removed from the collection. + */ + public boolean removeParam( + final org.castor.jdo.conf.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.jdo.conf.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.castor.jdo.conf.Param) obj; + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setParam( + final int index, + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("setParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + this._paramList.set(index, vParam); + } + + /** + * + * + * @param vParamArray + */ + public void setParam( + final org.castor.jdo.conf.Param[] vParamArray) { + //-- copy array + _paramList.clear(); + + for (int i = 0; i < vParamArray.length; i++) { + this._paramList.add(vParamArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.TransactionManage + */ + public static org.castor.jdo.conf.TransactionManager unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.TransactionManager) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.TransactionManager.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/Database.java @@ -0,0 +1,692 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class Database. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Database implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _engine. + */ + private java.lang.String _engine = "generic"; + + /** + * Field _databaseChoice. + */ + private org.castor.jdo.conf.DatabaseChoice _databaseChoice; + + /** + * Field _mappingList. + */ + private java.util.List _mappingList; + + /** + * Field _packageMappingList. + */ + private java.util.List _packageMappingList; + + /** + * Field _classMappingList. + */ + private java.util.List _classMappingList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Database() { + super(); + setEngine("generic"); + this._mappingList = new java.util.ArrayList(); + this._packageMappingList = new java.util.ArrayList(); + this._classMappingList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vClassMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addClassMapping( + final org.castor.jdo.conf.ClassMapping vClassMapping) + throws java.lang.IndexOutOfBoundsException { + this._classMappingList.add(vClassMapping); + } + + /** + * + * + * @param index + * @param vClassMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addClassMapping( + final int index, + final org.castor.jdo.conf.ClassMapping vClassMapping) + throws java.lang.IndexOutOfBoundsException { + this._classMappingList.add(index, vClassMapping); + } + + /** + * + * + * @param vMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addMapping( + final org.castor.jdo.conf.Mapping vMapping) + throws java.lang.IndexOutOfBoundsException { + this._mappingList.add(vMapping); + } + + /** + * + * + * @param index + * @param vMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addMapping( + final int index, + final org.castor.jdo.conf.Mapping vMapping) + throws java.lang.IndexOutOfBoundsException { + this._mappingList.add(index, vMapping); + } + + /** + * + * + * @param vPackageMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addPackageMapping( + final org.castor.jdo.conf.PackageMapping vPackageMapping) + throws java.lang.IndexOutOfBoundsException { + this._packageMappingList.add(vPackageMapping); + } + + /** + * + * + * @param index + * @param vPackageMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addPackageMapping( + final int index, + final org.castor.jdo.conf.PackageMapping vPackageMapping) + throws java.lang.IndexOutOfBoundsException { + this._packageMappingList.add(index, vPackageMapping); + } + + /** + * Method enumerateClassMapping. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateClassMapping( + ) { + return java.util.Collections.enumeration(this._classMappingList); + } + + /** + * Method enumerateMapping. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateMapping( + ) { + return java.util.Collections.enumeration(this._mappingList); + } + + /** + * Method enumeratePackageMapping. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumeratePackageMapping( + ) { + return java.util.Collections.enumeration(this._packageMappingList); + } + + /** + * Method getClassMapping. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.castor.jdo.conf.ClassMapping at + * the given index + */ + public org.castor.jdo.conf.ClassMapping getClassMapping( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._classMappingList.size()) { + throw new IndexOutOfBoundsException("getClassMapping: Index value '" + index + "' not in range [0.." + (this._classMappingList.size() - 1) + "]"); + } + + return (org.castor.jdo.conf.ClassMapping) _classMappingList.get(index); + } + + /** + * Method getClassMapping.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.castor.jdo.conf.ClassMapping[] getClassMapping( + ) { + org.castor.jdo.conf.ClassMapping[] array = new org.castor.jdo.conf.ClassMapping[0]; + return (org.castor.jdo.conf.ClassMapping[]) this._classMappingList.toArray(array); + } + + /** + * Method getClassMappingCount. + * + * @return the size of this collection + */ + public int getClassMappingCount( + ) { + return this._classMappingList.size(); + } + + /** + * Returns the value of field 'databaseChoice'. + * + * @return the value of field 'DatabaseChoice'. + */ + public org.castor.jdo.conf.DatabaseChoice getDatabaseChoice( + ) { + return this._databaseChoice; + } + + /** + * Returns the value of field 'engine'. + * + * @return the value of field 'Engine'. + */ + public java.lang.String getEngine( + ) { + return this._engine; + } + + /** + * Method getMapping. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.castor.jdo.conf.Mapping at the + * given index + */ + public org.castor.jdo.conf.Mapping getMapping( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._mappingList.size()) { + throw new IndexOutOfBoundsException("getMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]"); + } + + return (org.castor.jdo.conf.Mapping) _mappingList.get(index); + } + + /** + * Method getMapping.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.castor.jdo.conf.Mapping[] getMapping( + ) { + org.castor.jdo.conf.Mapping[] array = new org.castor.jdo.conf.Mapping[0]; + return (org.castor.jdo.conf.Mapping[]) this._mappingList.toArray(array); + } + + /** + * Method getMappingCount. + * + * @return the size of this collection + */ + public int getMappingCount( + ) { + return this._mappingList.size(); + } + + /** + * Returns the value of field 'name'. + * + * @return the value of field 'Name'. + */ + public java.lang.String getName( + ) { + return this._name; + } + + /** + * Method getPackageMapping. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.castor.jdo.conf.PackageMapping + * at the given index + */ + public org.castor.jdo.conf.PackageMapping getPackageMapping( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._packageMappingList.size()) { + throw new IndexOutOfBoundsException("getPackageMapping: Index value '" + index + "' not in range [0.." + (this._packageMappingList.size() - 1) + "]"); + } + + return (org.castor.jdo.conf.PackageMapping) _packageMappingList.get(index); + } + + /** + * Method getPackageMapping.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public org.castor.jdo.conf.PackageMapping[] getPackageMapping( + ) { + org.castor.jdo.conf.PackageMapping[] array = new org.castor.jdo.conf.PackageMapping[0]; + return (org.castor.jdo.conf.PackageMapping[]) this._packageMappingList.toArray(array); + } + + /** + * Method getPackageMappingCount. + * + * @return the size of this collection + */ + public int getPackageMappingCount( + ) { + return this._packageMappingList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateClassMapping. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateClassMapping( + ) { + return this._classMappingList.iterator(); + } + + /** + * Method iterateMapping. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateMapping( + ) { + return this._mappingList.iterator(); + } + + /** + * Method iteratePackageMapping. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iteratePackageMapping( + ) { + return this._packageMappingList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllClassMapping( + ) { + this._classMappingList.clear(); + } + + /** + */ + public void removeAllMapping( + ) { + this._mappingList.clear(); + } + + /** + */ + public void removeAllPackageMapping( + ) { + this._packageMappingList.clear(); + } + + /** + * Method removeClassMapping. + * + * @param vClassMapping + * @return true if the object was removed from the collection. + */ + public boolean removeClassMapping( + final org.castor.jdo.conf.ClassMapping vClassMapping) { + boolean removed = _classMappingList.remove(vClassMapping); + return removed; + } + + /** + * Method removeClassMappingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.jdo.conf.ClassMapping removeClassMappingAt( + final int index) { + java.lang.Object obj = this._classMappingList.remove(index); + return (org.castor.jdo.conf.ClassMapping) obj; + } + + /** + * Method removeMapping. + * + * @param vMapping + * @return true if the object was removed from the collection. + */ + public boolean removeMapping( + final org.castor.jdo.conf.Mapping vMapping) { + boolean removed = _mappingList.remove(vMapping); + return removed; + } + + /** + * Method removeMappingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.jdo.conf.Mapping removeMappingAt( + final int index) { + java.lang.Object obj = this._mappingList.remove(index); + return (org.castor.jdo.conf.Mapping) obj; + } + + /** + * Method removePackageMapping. + * + * @param vPackageMapping + * @return true if the object was removed from the collection. + */ + public boolean removePackageMapping( + final org.castor.jdo.conf.PackageMapping vPackageMapping) { + boolean removed = _packageMappingList.remove(vPackageMapping); + return removed; + } + + /** + * Method removePackageMappingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.jdo.conf.PackageMapping removePackageMappingAt( + final int index) { + java.lang.Object obj = this._packageMappingList.remove(index); + return (org.castor.jdo.conf.PackageMapping) obj; + } + + /** + * + * + * @param index + * @param vClassMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setClassMapping( + final int index, + final org.castor.jdo.conf.ClassMapping vClassMapping) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._classMappingList.size()) { + throw new IndexOutOfBoundsException("setClassMapping: Index value '" + index + "' not in range [0.." + (this._classMappingList.size() - 1) + "]"); + } + + this._classMappingList.set(index, vClassMapping); + } + + /** + * + * + * @param vClassMappingArray + */ + public void setClassMapping( + final org.castor.jdo.conf.ClassMapping[] vClassMappingArray) { + //-- copy array + _classMappingList.clear(); + + for (int i = 0; i < vClassMappingArray.length; i++) { + this._classMappingList.add(vClassMappingArray[i]); + } + } + + /** + * Sets the value of field 'databaseChoice'. + * + * @param databaseChoice the value of field 'databaseChoice'. + */ + public void setDatabaseChoice( + final org.castor.jdo.conf.DatabaseChoice databaseChoice) { + this._databaseChoice = databaseChoice; + } + + /** + * Sets the value of field 'engine'. + * + * @param engine the value of field 'engine'. + */ + public void setEngine( + final java.lang.String engine) { + this._engine = engine; + } + + /** + * + * + * @param index + * @param vMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setMapping( + final int index, + final org.castor.jdo.conf.Mapping vMapping) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._mappingList.size()) { + throw new IndexOutOfBoundsException("setMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]"); + } + + this._mappingList.set(index, vMapping); + } + + /** + * + * + * @param vMappingArray + */ + public void setMapping( + final org.castor.jdo.conf.Mapping[] vMappingArray) { + //-- copy array + _mappingList.clear(); + + for (int i = 0; i < vMappingArray.length; i++) { + this._mappingList.add(vMappingArray[i]); + } + } + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName( + final java.lang.String name) { + this._name = name; + } + + /** + * + * + * @param index + * @param vPackageMapping + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setPackageMapping( + final int index, + final org.castor.jdo.conf.PackageMapping vPackageMapping) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._packageMappingList.size()) { + throw new IndexOutOfBoundsException("setPackageMapping: Index value '" + index + "' not in range [0.." + (this._packageMappingList.size() - 1) + "]"); + } + + this._packageMappingList.set(index, vPackageMapping); + } + + /** + * + * + * @param vPackageMappingArray + */ + public void setPackageMapping( + final org.castor.jdo.conf.PackageMapping[] vPackageMappingArray) { + //-- copy array + _packageMappingList.clear(); + + for (int i = 0; i < vPackageMappingArray.length; i++) { + this._packageMappingList.add(vPackageMappingArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.Database + */ + public static org.castor.jdo.conf.Database unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.Database) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.Database.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/Driver.java @@ -0,0 +1,330 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf; + +/** + * Class Driver. + * + * @version $Revision$ $Date$ + */ +@SuppressWarnings("serial") +public class Driver implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _url. + */ + private java.lang.String _url; + + /** + * Field _className. + */ + private java.lang.String _className; + + /** + * Field _paramList. + */ + private java.util.List _paramList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Driver() { + super(); + this._paramList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(vParam); + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addParam( + final int index, + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + this._paramList.add(index, vParam); + } + + /** + * Method enumerateParam. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateParam( + ) { + return java.util.Collections.enumeration(this._paramList); + } + + /** + * Returns the value of field 'className'. + * + * @return the value of field 'ClassName'. + */ + public java.lang.String getClassName( + ) { + return this._className; + } + + /** + * Method getParam. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the org.castor.jdo.conf.Param at the + * given index + */ + public org.castor.jdo.conf.Param getParam( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("getParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + return (org.castor.jdo.conf.Param) _paramList.get(index); + } + + /** + * Method getParam.Returns the contents of the collection in an + * Array.

Note: Just in case the collection contents are + * changing in another thread, we pass a 0-length Array of the + * correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public org.castor.jdo.conf.Param[] getParam( + ) { + org.castor.jdo.conf.Param[] array = new org.castor.jdo.conf.Param[0]; + return (org.castor.jdo.conf.Param[]) this._paramList.toArray(array); + } + + /** + * Method getParamCount. + * + * @return the size of this collection + */ + public int getParamCount( + ) { + return this._paramList.size(); + } + + /** + * Returns the value of field 'url'. + * + * @return the value of field 'Url'. + */ + public java.lang.String getUrl( + ) { + return this._url; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * Method iterateParam. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateParam( + ) { + return this._paramList.iterator(); + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllParam( + ) { + this._paramList.clear(); + } + + /** + * Method removeParam. + * + * @param vParam + * @return true if the object was removed from the collection. + */ + public boolean removeParam( + final org.castor.jdo.conf.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.jdo.conf.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.castor.jdo.conf.Param) obj; + } + + /** + * Sets the value of field 'className'. + * + * @param className the value of field 'className'. + */ + public void setClassName( + final java.lang.String className) { + this._className = className; + } + + /** + * + * + * @param index + * @param vParam + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setParam( + final int index, + final org.castor.jdo.conf.Param vParam) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._paramList.size()) { + throw new IndexOutOfBoundsException("setParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]"); + } + + this._paramList.set(index, vParam); + } + + /** + * + * + * @param vParamArray + */ + public void setParam( + final org.castor.jdo.conf.Param[] vParamArray) { + //-- copy array + _paramList.clear(); + + for (int i = 0; i < vParamArray.length; i++) { + this._paramList.add(vParamArray[i]); + } + } + + /** + * Sets the value of field 'url'. + * + * @param url the value of field 'url'. + */ + public void setUrl( + final java.lang.String url) { + this._url = url; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled org.castor.jdo.conf.Driver + */ + public static org.castor.jdo.conf.Driver unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.jdo.conf.Driver) org.exolab.castor.xml.Unmarshaller.unmarshal(org.castor.jdo.conf.Driver.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/MappingDescriptor.java @@ -0,0 +1,213 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.Mapping; + +/** + * Class MappingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MappingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MappingDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "mapping"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _href + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_href", "href", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Mapping target = (Mapping) object; + return target.getHref(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Mapping target = (Mapping) object; + target.setHref( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _href + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.Mapping.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/PackageMappingDescriptor.java @@ -0,0 +1,213 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.PackageMapping; + +/** + * Class PackageMappingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PackageMappingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PackageMappingDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "package"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PackageMapping target = (PackageMapping) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PackageMapping target = (PackageMapping) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.PackageMapping.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/TransactionDemarcationDescriptor.java @@ -0,0 +1,255 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.TransactionDemarcation; + +/** + * Class TransactionDemarcationDescriptor. + * + * @version $Revision$ $Date$ + */ +public class TransactionDemarcationDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TransactionDemarcationDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "transaction-demarcation"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _mode + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_mode", "mode", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + TransactionDemarcation target = (TransactionDemarcation) object; + return target.getMode(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + TransactionDemarcation target = (TransactionDemarcation) object; + target.setMode( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _mode + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _transactionManager + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.TransactionManager.class, "_transactionManager", "transaction-manager", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + TransactionDemarcation target = (TransactionDemarcation) object; + return target.getTransactionManager(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + TransactionDemarcation target = (TransactionDemarcation) object; + target.setTransactionManager( (org.castor.jdo.conf.TransactionManager) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.castor.jdo.conf.TransactionManager"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _transactionManager + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.TransactionDemarcation.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/DatabaseChoiceDescriptor.java @@ -0,0 +1,294 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.DatabaseChoice; + +/** + * Class DatabaseChoiceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class DatabaseChoiceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DatabaseChoiceDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _driver + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.Driver.class, "_driver", "driver", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DatabaseChoice target = (DatabaseChoice) object; + return target.getDriver(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DatabaseChoice target = (DatabaseChoice) object; + target.setDriver( (org.castor.jdo.conf.Driver) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.castor.jdo.conf.Driver"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _driver + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _dataSource + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.DataSource.class, "_dataSource", "data-source", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DatabaseChoice target = (DatabaseChoice) object; + return target.getDataSource(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DatabaseChoice target = (DatabaseChoice) object; + target.setDataSource( (org.castor.jdo.conf.DataSource) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.castor.jdo.conf.DataSource"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _dataSource + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _jndi + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.Jndi.class, "_jndi", "jndi", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DatabaseChoice target = (DatabaseChoice) object; + return target.getJndi(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DatabaseChoice target = (DatabaseChoice) object; + target.setJndi( (org.castor.jdo.conf.Jndi) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.castor.jdo.conf.Jndi"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _jndi + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.DatabaseChoice.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/DataSourceDescriptor.java @@ -0,0 +1,265 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.DataSource; + +/** + * Class DataSourceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class DataSourceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DataSourceDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "data-source"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _className + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_className", "class-name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DataSource target = (DataSource) object; + return target.getClassName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DataSource target = (DataSource) object; + target.setClassName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _className + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _paramList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DataSource target = (DataSource) object; + return target.getParam(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DataSource target = (DataSource) object; + target.addParam( (org.castor.jdo.conf.Param) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + DataSource target = (DataSource) object; + target.removeAllParam(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.castor.jdo.conf.Param"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _paramList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.DataSource.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/ParamDescriptor.java @@ -0,0 +1,257 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.Param; + +/** + * Class ParamDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ParamDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ParamDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "param"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Param target = (Param) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Param target = (Param) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Param target = (Param) object; + return target.getValue(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Param target = (Param) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.Param.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/ClassMappingDescriptor.java @@ -0,0 +1,213 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.ClassMapping; + +/** + * Class ClassMappingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ClassMappingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ClassMappingDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "class"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ClassMapping target = (ClassMapping) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ClassMapping target = (ClassMapping) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.ClassMapping.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/DatabaseDescriptor.java @@ -0,0 +1,447 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.Database; + +/** + * Class DatabaseDescriptor. + * + * @version $Revision$ $Date$ + */ +public class DatabaseDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DatabaseDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "database"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + this._identity = desc; + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.lang.String(); + } + }; + desc.setSchemaType("ID"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IdValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IdValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _engine + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_engine", "engine", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getEngine(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.setEngine( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _engine + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _databaseChoice + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.DatabaseChoice.class, "_databaseChoice", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getDatabaseChoice(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.setDatabaseChoice( (org.castor.jdo.conf.DatabaseChoice) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.jdo.conf.DatabaseChoice(); + } + }; + desc.setSchemaType("org.castor.jdo.conf.DatabaseChoice"); + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new org.castor.jdo.conf.descriptors.DatabaseChoiceDescriptor()); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _databaseChoice + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _mappingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.Mapping.class, "_mappingList", "mapping", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.addMapping( (org.castor.jdo.conf.Mapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Database target = (Database) object; + target.removeAllMapping(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.castor.jdo.conf.Mapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _mappingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _packageMappingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.PackageMapping.class, "_packageMappingList", "package", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getPackageMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.addPackageMapping( (org.castor.jdo.conf.PackageMapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Database target = (Database) object; + target.removeAllPackageMapping(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.castor.jdo.conf.PackageMapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _packageMappingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _classMappingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.ClassMapping.class, "_classMappingList", "class", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getClassMapping(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.addClassMapping( (org.castor.jdo.conf.ClassMapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Database target = (Database) object; + target.removeAllClassMapping(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.castor.jdo.conf.ClassMapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _classMappingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.Database.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/TransactionManagerDescriptor.java @@ -0,0 +1,263 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.TransactionManager; + +/** + * Class TransactionManagerDescriptor. + * + * @version $Revision$ $Date$ + */ +public class TransactionManagerDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TransactionManagerDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "transaction-manager"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + TransactionManager target = (TransactionManager) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + TransactionManager target = (TransactionManager) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _paramList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + TransactionManager target = (TransactionManager) object; + return target.getParam(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + TransactionManager target = (TransactionManager) object; + target.addParam( (org.castor.jdo.conf.Param) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + TransactionManager target = (TransactionManager) object; + target.removeAllParam(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.castor.jdo.conf.Param"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _paramList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.TransactionManager.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/DriverDescriptor.java @@ -0,0 +1,309 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.Driver; + +/** + * Class DriverDescriptor. + * + * @version $Revision$ $Date$ + */ +public class DriverDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DriverDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "driver"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _url + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_url", "url", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Driver target = (Driver) object; + return target.getUrl(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Driver target = (Driver) object; + target.setUrl( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _url + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _className + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_className", "class-name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Driver target = (Driver) object; + return target.getClassName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Driver target = (Driver) object; + target.setClassName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _className + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _paramList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Driver target = (Driver) object; + return target.getParam(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Driver target = (Driver) object; + target.addParam( (org.castor.jdo.conf.Param) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Driver target = (Driver) object; + target.removeAllParam(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.castor.jdo.conf.Param"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _paramList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.Driver.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/JndiDescriptor.java @@ -0,0 +1,213 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.Jndi; + +/** + * Class JndiDescriptor. + * + * @version $Revision$ $Date$ + */ +public class JndiDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JndiDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "jndi"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Jndi target = (Jndi) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Jndi target = (Jndi) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.Jndi.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} --- /dev/null +++ castor-1.3.2/cpa/target/generated-sources/castor/org/castor/jdo/conf/descriptors/JdoConfDescriptor.java @@ -0,0 +1,303 @@ +/* + * This class was automatically generated with + * Castor 1.3.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.jdo.conf.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.jdo.conf.JdoConf; + +/** + * Class JdoConfDescriptor. + * + * @version $Revision$ $Date$ + */ +public class JdoConfDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JdoConfDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "jdo-conf"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JdoConf target = (JdoConf) object; + return target.getName(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JdoConf target = (JdoConf) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("string"); + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _databaseList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.Database.class, "_databaseList", "database", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JdoConf target = (JdoConf) object; + return target.getDatabase(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JdoConf target = (JdoConf) object; + target.addDatabase( (org.castor.jdo.conf.Database) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JdoConf target = (JdoConf) object; + target.removeAllDatabase(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("list"); + desc.setComponentType("org.castor.jdo.conf.Database"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _databaseList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _transactionDemarcation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.jdo.conf.TransactionDemarcation.class, "_transactionDemarcation", "transaction-demarcation", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + @Override + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JdoConf target = (JdoConf) object; + return target.getTransactionDemarcation(); + } + @Override + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JdoConf target = (JdoConf) object; + target.setTransactionDemarcation( (org.castor.jdo.conf.TransactionDemarcation) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + @Override + @SuppressWarnings("unused") + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setSchemaType("org.castor.jdo.conf.TransactionDemarcation"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _transactionDemarcation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + @Override() + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + @Override() + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + @Override() + public java.lang.Class getJavaClass( + ) { + return org.castor.jdo.conf.JdoConf.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + @Override() + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + @Override() + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + @Override() + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + @Override() + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +}