Index: /home/ralf/workspace/castor-1/cpactf/build.xml
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/build.xml (revision 7317)
+++ /home/ralf/workspace/castor-1/cpactf/build.xml (working copy)
@@ -23,6 +23,9 @@
null if the cause is nonexistent or unknown. */
+ private Throwable _cause = null;
+
+ /** Has the cause of this exception been initialized? */
+ private boolean _initCause = false;
+
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructs a new CPATestException without a message. The cause is not initialized
+ * but may subsequently be initialized by a call to initCause(Throwable).
+ */
+ public CPAConfigException() {
+ super();
+ }
+
+ /**
+ * Constructs a new CPATestException with the specified detail message. The cause is
+ * not initialized but may subsequently be initialized by a call to initCause(Throwable).
+ *
+ * @param message The detail message.
+ */
+ public CPAConfigException(final String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a new CPATestException with the specified cause and the detail message
+ * of the cause. This constructor is useful for exceptions that are wrappers for others.
+ *
+ * @param cause The cause.
+ */
+ public CPAConfigException(final Throwable cause) {
+ super((cause == null) ? null : cause.getMessage());
+ _cause = cause;
+ _initCause = true;
+ }
+
+ /**
+ * Constructs a new CPATestException with the specified detail message and cause.
+ *
+ * @param message The detail message.
+ * @param cause The cause.
+ */
+ public CPAConfigException(final String message, final Throwable cause) {
+ super(message);
+ _cause = cause;
+ _initCause = true;
+ }
+
+ //--------------------------------------------------------------------------
+
+ /**
+ * The method emulates the JDK 1.4 Throwable version of initCause() for JDKs before 1.4.
+ *
+ * {@inheritDoc}
+ */
+ public Throwable initCause(final Throwable cause) {
+ if (cause == this) { throw new IllegalArgumentException(); }
+ if (_initCause) { throw new IllegalStateException(); }
+ _cause = cause;
+ _initCause = true;
+ return this;
+ }
+
+ /**
+ * The method emulates the JDK 1.4 Throwable version of getCause() for JDKs before 1.4.
+ *
+ * {@inheritDoc}
+ */
+ public Throwable getCause() {
+ return _cause;
+ }
+
+ //--------------------------------------------------------------------------
+
+ /**
+ * {@inheritDoc}
+ */
+ public void printStackTrace() {
+ // Print the stack trace for this exception.
+ super.printStackTrace();
+
+ if (_cause != null) {
+ System.err.print("Caused by: ");
+ _cause.printStackTrace();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void printStackTrace(final PrintStream s) {
+ // Print the stack trace for this exception.
+ super.printStackTrace(s);
+
+ if (_cause != null) {
+ s.print("Caused by: ");
+ _cause.printStackTrace(s);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void printStackTrace(final PrintWriter w) {
+ // Print the stack trace for this exception.
+ super.printStackTrace(w);
+
+ if (_cause != null) {
+ w.print("Caused by: ");
+ _cause.printStackTrace(w);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+}
Property changes on: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPAConfigException.java
___________________________________________________________________
Name: svn:executable
+ *
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPAConfigRegistry.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPAConfigRegistry.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPAConfigRegistry.java (revision 0)
@@ -0,0 +1,278 @@
+package org.castor.cpa.test.framework;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import org.castor.cpa.test.framework.xml.Configuration;
+import org.castor.cpa.test.framework.xml.CpactfConf;
+import org.castor.cpa.test.framework.xml.DataSource;
+import org.castor.cpa.test.framework.xml.Database;
+import org.castor.cpa.test.framework.xml.DatabaseChoice;
+import org.castor.cpa.test.framework.xml.Driver;
+import org.castor.cpa.test.framework.xml.Jndi;
+import org.castor.cpa.test.framework.xml.Manager;
+import org.castor.cpa.test.framework.xml.Mapping;
+import org.castor.cpa.test.framework.xml.Param;
+import org.castor.cpa.test.framework.xml.Transaction;
+import org.castor.cpa.test.framework.xml.types.DatabaseEngineType;
+import org.castor.cpa.test.framework.xml.types.TransactionModeType;
+import org.castor.jdo.util.JDOConfFactory;
+import org.exolab.castor.util.DTDResolver;
+import org.exolab.castor.xml.MarshalException;
+import org.exolab.castor.xml.Unmarshaller;
+import org.exolab.castor.xml.ValidationException;
+import org.xml.sax.InputSource;
+
+public class CPAConfigRegistry {
+ //--------------------------------------------------------------------------
+
+ private String _jdoConfBaseURL;
+
+ private String _defaultDatabaseName;
+
+ private String _defaultTransactionName;
+
+ private final Map _configurations = new HashMap();
+
+ private final Map _databases = new HashMap();
+
+ private final Map _transactions = new HashMap();
+
+ //--------------------------------------------------------------------------
+
+ public void loadConfiguration(final String url) {
+ InputSource source = new InputSource(url);
+ _jdoConfBaseURL = source.getSystemId();
+
+ CpactfConf cpactfconf = null;
+ try {
+ Unmarshaller unmarshaller = new Unmarshaller(CpactfConf.class);
+ unmarshaller.setEntityResolver(new DTDResolver(null));
+ cpactfconf = (CpactfConf) unmarshaller.unmarshal(source);
+ } catch (MarshalException e) {
+ throw new CPAConfigException(e);
+ } catch (ValidationException e) {
+ throw new CPAConfigException(e);
+ }
+
+ _defaultDatabaseName = cpactfconf.getDefaultDatabase();
+ _defaultTransactionName = cpactfconf.getDefaultTransaction();
+
+ Iterator cfgIter = cpactfconf.iterateConfiguration();
+ while (cfgIter.hasNext()) {
+ Configuration config = (Configuration) cfgIter.next();
+ _configurations.put(config.getName(), config);
+ }
+
+ Iterator dbIter = cpactfconf.iterateDatabase();
+ while (dbIter.hasNext()) {
+ Database database = (Database) dbIter.next();
+ _databases.put(database.getName(), database);
+ }
+
+ Iterator transIter = cpactfconf.iterateTransaction();
+ while (transIter.hasNext()) {
+ Transaction trans = (Transaction) transIter.next();
+ _transactions.put(trans.getName(), trans);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+
+ public String getJdoConfBaseURL() { return _jdoConfBaseURL; }
+
+ public String getDefaultDatabaseName() { return _defaultDatabaseName; }
+
+ public String getDefaultTransactionName() { return _defaultTransactionName; }
+
+ public DatabaseEngineType getEngine(final String db) {
+ if (!_databases.containsKey(db)) {
+ throw new CPAConfigException("Database config '" + db + "' not found.");
+ }
+
+ Database database = (Database) _databases.get(db);
+
+ if (database.getEngine() == null) {
+ throw new CPAConfigException("No engine specified "
+ + "in database config '" + db + "'.");
+ }
+
+ return database.getEngine();
+ }
+
+ public org.castor.jdo.conf.JdoConf createJdoConf(
+ final String cfg, final String db, final String tx) {
+ if (cfg == null) {
+ throw new CPAConfigException("No configuration name specified.");
+ } else if (!_configurations.containsKey(cfg)) {
+ throw new CPAConfigException("Mapping config '" + cfg + "' not found.");
+ } else if (!_databases.containsKey(db)) {
+ throw new CPAConfigException("Database config '" + db + "' not found.");
+ } else if (!_transactions.containsKey(tx)) {
+ throw new CPAConfigException("Transaction config '" + tx + "' not found.");
+ }
+
+ return JDOConfFactory.createJdoConf(
+ createDatabase(cfg, db, createMappings(cfg)),
+ createTransactionDemarcation(tx));
+ }
+
+ public org.castor.jdo.conf.JdoConf createJdoConf(
+ final String cfg, final String db, final String tx, final String[] mappings) {
+ if (cfg == null) {
+ throw new CPAConfigException("No configuration name specified.");
+ } else if (!_databases.containsKey(db)) {
+ throw new CPAConfigException("Database config '" + db + "' not found.");
+ } else if (!_transactions.containsKey(tx)) {
+ throw new CPAConfigException("Transaction config '" + tx + "' not found.");
+ }
+
+ return JDOConfFactory.createJdoConf(
+ createDatabase(cfg, db, mappings),
+ createTransactionDemarcation(tx));
+ }
+
+ private String[] createMappings(final String cfg) {
+ Configuration config = (Configuration) _configurations.get(cfg);
+
+ int count = config.getMappingCount();
+ String[] mappings = new String[count];
+ for (int i = 0; i < count; i++) {
+ Mapping mapping = config.getMapping(i);
+ if (mapping.getHref() == null) {
+ throw new CPAConfigException("No mapping URL specified "
+ + "in mapping config '" + cfg + "'.");
+ }
+ mappings[i] = mapping.getHref();
+ }
+ return mappings;
+ }
+
+ private org.castor.jdo.conf.Database createDatabase(
+ final String name, final String db, final String[] mappings) {
+ Database database = (Database) _databases.get(db);
+
+ if (database.getEngine() == null) {
+ throw new CPAConfigException("No engine specified "
+ + "in database config '" + db + "'.");
+ }
+ String engine = database.getEngine().toString();
+
+ DatabaseChoice choice = database.getDatabaseChoice();
+ if (choice == null) {
+ throw new CPAConfigException("Neither driver, datasource nor jndi specified "
+ + "in database config '" + db + "'.");
+ }
+
+ if (choice.getDriver() != null) {
+ return JDOConfFactory.createDatabase(name, engine,
+ createDriver(db, choice.getDriver()), mappings);
+ } else if (choice.getDataSource() != null) {
+ return JDOConfFactory.createDatabase(name, engine,
+ createDataSource(db, choice.getDataSource()), mappings);
+ } else if (choice.getJndi() != null) {
+ return JDOConfFactory.createDatabase(name, engine,
+ createJNDI(db, choice.getJndi()), mappings);
+ } else {
+ throw new CPAConfigException("Neither driver, datasource nor jndi specified "
+ + "in database config '" + db + "'.");
+ }
+ }
+
+ private org.castor.jdo.conf.Driver createDriver(
+ final String db, final Driver driver) {
+ String classname = driver.getClassName();
+ if (classname == null) {
+ throw new CPAConfigException("No classname specified for driver "
+ + "in database config '" + db + "'.");
+ }
+
+ String connect = driver.getUrl();
+ if (connect == null) {
+ throw new CPAConfigException("No connect string specified for driver "
+ + "in database config '" + db + "'.");
+ }
+
+ String user = null;
+ String password = null;
+ for (int i = 0; i < driver.getParamCount(); i++) {
+ Param param = driver.getParam(i);
+ if ("user".equalsIgnoreCase(param.getName())) { user = param.getValue(); }
+ if ("password".equalsIgnoreCase(param.getName())) { password = param.getValue(); }
+ }
+ if (user == null) {
+ throw new CPAConfigException("Parameter 'user' is missing for driver "
+ + "in database config '" + db + "'.");
+ }
+ if (password == null) {
+ throw new CPAConfigException("Parameter 'password' is missing for driver "
+ + "in database config '" + db + "'.");
+ }
+
+ return JDOConfFactory.createDriver(classname, connect, user, password);
+ }
+
+ private org.castor.jdo.conf.DataSource createDataSource(
+ final String db, final DataSource datasource) {
+ String classname = datasource.getClassName();
+ if (classname == null) {
+ throw new CPAConfigException("No classname specified for datasource "
+ + "in database config '" + db + "'.");
+ }
+
+ Properties props = new Properties();
+ for (int i = 0; i < datasource.getParamCount(); i++) {
+ Param param = datasource.getParam(i);
+ props.put(param.getName(), param.getValue());
+ }
+
+ return JDOConfFactory.createDataSource(classname, props);
+ }
+
+ private org.castor.jdo.conf.Jndi createJNDI(
+ final String db, final Jndi jndi) {
+ String name = jndi.getName();
+ if (name == null) {
+ throw new CPAConfigException("No JNDI name specified "
+ + "in database config '" + db + "'.");
+ }
+
+ return JDOConfFactory.createJNDI(name);
+ }
+
+ private org.castor.jdo.conf.TransactionDemarcation createTransactionDemarcation(
+ final String tx) {
+ Transaction trans = (Transaction) _transactions.get(tx);
+
+ if (trans.getMode() == TransactionModeType.LOCAL) {
+ return JDOConfFactory.createLocalTransactionDemarcation();
+ } else if (trans.getMode() == TransactionModeType.GLOBAL) {
+ Manager manager = trans.getManager();
+ if (manager == null) {
+ throw new CPAConfigException("No manager definition found "
+ + "in global transaction config '" + tx + "'.");
+ }
+
+ String name = manager.getName();
+ if (name == null) {
+ throw new CPAConfigException("No manager name specified "
+ + "in global transaction config '" + tx + "'.");
+ }
+
+ Properties props = new Properties();
+ for (int i = 0; i < manager.getParamCount(); i++) {
+ Param param = manager.getParam(i);
+ props.put(param.getName(), param.getValue());
+ }
+
+ return JDOConfFactory.createGlobalTransactionDemarcation(name, props);
+ } else {
+ throw new CPAConfigException("Neither local nor global mode specified "
+ + "in transaction config '" + tx + "'.");
+ }
+ }
+
+ //--------------------------------------------------------------------------
+}
Property changes on: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPAConfigRegistry.java
___________________________________________________________________
Name: svn:executable
+ *
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPATestCase.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPATestCase.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPATestCase.java (revision 0)
@@ -0,0 +1,122 @@
+package org.castor.cpa.test.framework;
+
+import org.castor.cpa.test.framework.xml.types.DatabaseEngineType;
+import org.castor.jdo.conf.JdoConf;
+import org.castor.jdo.engine.DatabaseRegistry;
+import org.exolab.castor.jdo.JDOManager;
+import org.exolab.castor.mapping.MappingException;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+
+public abstract class CPATestCase extends TestCase {
+ //--------------------------------------------------------------------------
+
+ private static final String DEFAULT_CONFIG = "/cpactf-conf.xml";
+
+ private static final String ARG_CONFIG = "config";
+
+ private static final String ARG_DATABASE = "database";
+
+ private static final String ARG_TRANSACTION = "transaction";
+
+ private static final String ARG_FORCE = "force";
+
+ //--------------------------------------------------------------------------
+
+ private static CPAConfigRegistry _registry = null;
+
+ private static String _database;
+
+ private static String _transaction;
+
+ private static boolean _force;
+
+ private static DatabaseEngineType _engine;
+
+ //--------------------------------------------------------------------------
+
+ private static void initialize() {
+ if (_registry == null) {
+ _registry = new CPAConfigRegistry();
+
+ String config = System.getProperty(ARG_CONFIG);
+ if ((config == null) || config.trim().equals("")) {
+ config = CPATestCase.class.getResource(DEFAULT_CONFIG).toExternalForm();
+ }
+ _registry.loadConfiguration(config);
+
+ _database = System.getProperty(ARG_DATABASE);
+ if ((_database == null) || _database.trim().equals("")) {
+ _database = _registry.getDefaultDatabaseName();
+ }
+
+ _transaction = System.getProperty(ARG_TRANSACTION);
+ if ((_transaction == null) || _transaction.trim().equals("")) {
+ _transaction = _registry.getDefaultTransactionName();
+ }
+
+ _force = Boolean.getBoolean(ARG_FORCE);
+
+ _engine = _registry.getEngine(_database);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+
+ public static final JDOManager getJDOManager(final String name)
+ throws MappingException {
+ if (!DatabaseRegistry.isDatabaseRegistred(name)) {
+ JdoConf jdoConf = _registry.createJdoConf(name, _database, _transaction);
+ String baseURL = _registry.getJdoConfBaseURL();
+ JDOManager.loadConfiguration(jdoConf, baseURL);
+ }
+
+ return JDOManager.createInstance(name);
+ }
+
+ public static final JDOManager getJDOManager(final String name, final String mapping)
+ throws MappingException {
+ return getJDOManager(name, new String[] {mapping});
+ }
+
+ public static final JDOManager getJDOManager(final String name, final String[] mappings)
+ throws MappingException {
+ if (!DatabaseRegistry.isDatabaseRegistred(name)) {
+ JdoConf jdoConf = _registry.createJdoConf(name, _database, _transaction, mappings);
+ String baseURL = _registry.getJdoConfBaseURL();
+ JDOManager.loadConfiguration(jdoConf, baseURL);
+ }
+
+ return JDOManager.createInstance(name);
+ }
+
+ //--------------------------------------------------------------------------
+
+ public CPATestCase() {
+ super();
+ initialize();
+ }
+
+ public CPATestCase(final String name) {
+ super(name);
+ initialize();
+ }
+
+ //--------------------------------------------------------------------------
+
+ public boolean include(final DatabaseEngineType engine) { return true; }
+
+ public boolean exclude(final DatabaseEngineType engine) { return false; }
+
+ /**
+ * {@inheritDoc}
+ */
+ public final void run(final TestResult result) {
+ if ((include(_engine) && !exclude(_engine)) || _force) {
+ super.run(result);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+}
Property changes on: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/CPATestCase.java
___________________________________________________________________
Name: svn:executable
+ *
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/.castor.cdr
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/.castor.cdr (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/.castor.cdr (revision 0)
@@ -0,0 +1,12 @@
+#Wed Dec 19 01:08:25 GMT+01:00 2007
+org.castor.cpa.test.framework.xml.Jndi=org.castor.cpa.test.framework.xml.descriptors.JndiDescriptor
+org.castor.cpa.test.framework.xml.Param=org.castor.cpa.test.framework.xml.descriptors.ParamDescriptor
+org.castor.cpa.test.framework.xml.Transaction=org.castor.cpa.test.framework.xml.descriptors.TransactionDescriptor
+org.castor.cpa.test.framework.xml.Driver=org.castor.cpa.test.framework.xml.descriptors.DriverDescriptor
+org.castor.cpa.test.framework.xml.DatabaseChoice=org.castor.cpa.test.framework.xml.descriptors.DatabaseChoiceDescriptor
+org.castor.cpa.test.framework.xml.Mapping=org.castor.cpa.test.framework.xml.descriptors.MappingDescriptor
+org.castor.cpa.test.framework.xml.Configuration=org.castor.cpa.test.framework.xml.descriptors.ConfigurationDescriptor
+org.castor.cpa.test.framework.xml.Manager=org.castor.cpa.test.framework.xml.descriptors.ManagerDescriptor
+org.castor.cpa.test.framework.xml.DataSource=org.castor.cpa.test.framework.xml.descriptors.DataSourceDescriptor
+org.castor.cpa.test.framework.xml.Database=org.castor.cpa.test.framework.xml.descriptors.DatabaseDescriptor
+org.castor.cpa.test.framework.xml.CpactfConf=org.castor.cpa.test.framework.xml.descriptors.CpactfConfDescriptor
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Configuration.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Configuration.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Configuration.java (revision 0)
@@ -0,0 +1,337 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * Class Configuration.
+ *
+ * @version $Revision$ $Date$
+ */
+public class Configuration implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _mappingList.
+ */
+ private java.util.List _mappingList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Configuration() {
+ super();
+ this._mappingList = new java.util.ArrayList();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vMapping
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addMapping(
+ final org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.Mapping vMapping)
+ throws java.lang.IndexOutOfBoundsException {
+ this._mappingList.add(index, vMapping);
+ }
+
+ /**
+ * Method enumerateMapping.
+ *
+ * @return an Enumeration over all possible elements of this
+ * collection
+ */
+ public java.util.Enumeration enumerateMapping(
+ ) {
+ return java.util.Collections.enumeration(this._mappingList);
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription(
+ ) {
+ return this._description;
+ }
+
+ /**
+ * 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.cpa.test.framework.xml.Mapping at the given index
+ */
+ public org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.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.cpa.test.framework.xml.Mapping[] getMapping( + ) { + org.castor.cpa.test.framework.xml.Mapping[] array = new org.castor.cpa.test.framework.xml.Mapping[0]; + return (org.castor.cpa.test.framework.xml.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 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 iterateMapping. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateMapping( + ) { + return this._mappingList.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 { + 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 { + Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllMapping( + ) { + this._mappingList.clear(); + } + + /** + * Method removeMapping. + * + * @param vMapping + * @return true if the object was removed from the collection. + */ + public boolean removeMapping( + final org.castor.cpa.test.framework.xml.Mapping vMapping) { + boolean removed = _mappingList.remove(vMapping); + return removed; + } + + /** + * Method removeMappingAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.cpa.test.framework.xml.Mapping removeMappingAt( + final int index) { + java.lang.Object obj = this._mappingList.remove(index); + return (org.castor.cpa.test.framework.xml.Mapping) obj; + } + + /** + * 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 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.cpa.test.framework.xml.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.cpa.test.framework.xml.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; + } + + /** + * 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.cpa.test.framework.xml.Configuration + */ + public static org.castor.cpa.test.framework.xml.Configuration unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.cpa.test.framework.xml.Configuration) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.Configuration.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); + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/CpactfConf.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/CpactfConf.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/CpactfConf.java (revision 0) @@ -0,0 +1,675 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class CpactfConf. + * + * @version $Revision$ $Date$ + */ +public class CpactfConf implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _defaultDatabase. + */ + private java.lang.String _defaultDatabase; + + /** + * Field _defaultTransaction. + */ + private java.lang.String _defaultTransaction; + + /** + * Field _configurationList. + */ + private java.util.List _configurationList; + + /** + * Field _databaseList. + */ + private java.util.List _databaseList; + + /** + * Field _transactionList. + */ + private java.util.List _transactionList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public CpactfConf() { + super(); + this._configurationList = new java.util.ArrayList(); + this._databaseList = new java.util.ArrayList(); + this._transactionList = new java.util.ArrayList(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vConfiguration + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addConfiguration( + final org.castor.cpa.test.framework.xml.Configuration vConfiguration) + throws java.lang.IndexOutOfBoundsException { + this._configurationList.add(vConfiguration); + } + + /** + * + * + * @param index + * @param vConfiguration + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addConfiguration( + final int index, + final org.castor.cpa.test.framework.xml.Configuration vConfiguration) + throws java.lang.IndexOutOfBoundsException { + this._configurationList.add(index, vConfiguration); + } + + /** + * + * + * @param vDatabase + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addDatabase( + final org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.Database vDatabase) + throws java.lang.IndexOutOfBoundsException { + this._databaseList.add(index, vDatabase); + } + + /** + * + * + * @param vTransaction + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addTransaction( + final org.castor.cpa.test.framework.xml.Transaction vTransaction) + throws java.lang.IndexOutOfBoundsException { + this._transactionList.add(vTransaction); + } + + /** + * + * + * @param index + * @param vTransaction + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addTransaction( + final int index, + final org.castor.cpa.test.framework.xml.Transaction vTransaction) + throws java.lang.IndexOutOfBoundsException { + this._transactionList.add(index, vTransaction); + } + + /** + * Method enumerateConfiguration. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateConfiguration( + ) { + return java.util.Collections.enumeration(this._configurationList); + } + + /** + * 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 enumerateTransaction. + * + * @return an Enumeration over all possible elements of this + * collection + */ + public java.util.Enumeration enumerateTransaction( + ) { + return java.util.Collections.enumeration(this._transactionList); + } + + /** + * Method getConfiguration. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.castor.cpa.test.framework.xml.Configuration at the given + * index + */ + public org.castor.cpa.test.framework.xml.Configuration getConfiguration( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._configurationList.size()) { + throw new IndexOutOfBoundsException("getConfiguration: Index value '" + index + "' not in range [0.." + (this._configurationList.size() - 1) + "]"); + } + + return (org.castor.cpa.test.framework.xml.Configuration) _configurationList.get(index); + } + + /** + * Method getConfiguration.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.cpa.test.framework.xml.Configuration[] getConfiguration( + ) { + org.castor.cpa.test.framework.xml.Configuration[] array = new org.castor.cpa.test.framework.xml.Configuration[0]; + return (org.castor.cpa.test.framework.xml.Configuration[]) this._configurationList.toArray(array); + } + + /** + * Method getConfigurationCount. + * + * @return the size of this collection + */ + public int getConfigurationCount( + ) { + return this._configurationList.size(); + } + + /** + * 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.cpa.test.framework.xml.Database at the given index + */ + public org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.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.cpa.test.framework.xml.Database[] getDatabase( + ) { + org.castor.cpa.test.framework.xml.Database[] array = new org.castor.cpa.test.framework.xml.Database[0]; + return (org.castor.cpa.test.framework.xml.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 'defaultDatabase'. + * + * @return the value of field 'DefaultDatabase'. + */ + public java.lang.String getDefaultDatabase( + ) { + return this._defaultDatabase; + } + + /** + * Returns the value of field 'defaultTransaction'. + * + * @return the value of field 'DefaultTransaction'. + */ + public java.lang.String getDefaultTransaction( + ) { + return this._defaultTransaction; + } + + /** + * Method getTransaction. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * org.castor.cpa.test.framework.xml.Transaction at the given + * index + */ + public org.castor.cpa.test.framework.xml.Transaction getTransaction( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._transactionList.size()) { + throw new IndexOutOfBoundsException("getTransaction: Index value '" + index + "' not in range [0.." + (this._transactionList.size() - 1) + "]"); + } + + return (org.castor.cpa.test.framework.xml.Transaction) _transactionList.get(index); + } + + /** + * Method getTransaction.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.cpa.test.framework.xml.Transaction[] getTransaction( + ) { + org.castor.cpa.test.framework.xml.Transaction[] array = new org.castor.cpa.test.framework.xml.Transaction[0]; + return (org.castor.cpa.test.framework.xml.Transaction[]) this._transactionList.toArray(array); + } + + /** + * Method getTransactionCount. + * + * @return the size of this collection + */ + public int getTransactionCount( + ) { + return this._transactionList.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 iterateConfiguration. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateConfiguration( + ) { + return this._configurationList.iterator(); + } + + /** + * Method iterateDatabase. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateDatabase( + ) { + return this._databaseList.iterator(); + } + + /** + * Method iterateTransaction. + * + * @return an Iterator over all possible elements in this + * collection + */ + public java.util.Iterator iterateTransaction( + ) { + return this._transactionList.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 { + 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 { + Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllConfiguration( + ) { + this._configurationList.clear(); + } + + /** + */ + public void removeAllDatabase( + ) { + this._databaseList.clear(); + } + + /** + */ + public void removeAllTransaction( + ) { + this._transactionList.clear(); + } + + /** + * Method removeConfiguration. + * + * @param vConfiguration + * @return true if the object was removed from the collection. + */ + public boolean removeConfiguration( + final org.castor.cpa.test.framework.xml.Configuration vConfiguration) { + boolean removed = _configurationList.remove(vConfiguration); + return removed; + } + + /** + * Method removeConfigurationAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.cpa.test.framework.xml.Configuration removeConfigurationAt( + final int index) { + java.lang.Object obj = this._configurationList.remove(index); + return (org.castor.cpa.test.framework.xml.Configuration) obj; + } + + /** + * Method removeDatabase. + * + * @param vDatabase + * @return true if the object was removed from the collection. + */ + public boolean removeDatabase( + final org.castor.cpa.test.framework.xml.Database vDatabase) { + boolean removed = _databaseList.remove(vDatabase); + return removed; + } + + /** + * Method removeDatabaseAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.cpa.test.framework.xml.Database removeDatabaseAt( + final int index) { + java.lang.Object obj = this._databaseList.remove(index); + return (org.castor.cpa.test.framework.xml.Database) obj; + } + + /** + * Method removeTransaction. + * + * @param vTransaction + * @return true if the object was removed from the collection. + */ + public boolean removeTransaction( + final org.castor.cpa.test.framework.xml.Transaction vTransaction) { + boolean removed = _transactionList.remove(vTransaction); + return removed; + } + + /** + * Method removeTransactionAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.cpa.test.framework.xml.Transaction removeTransactionAt( + final int index) { + java.lang.Object obj = this._transactionList.remove(index); + return (org.castor.cpa.test.framework.xml.Transaction) obj; + } + + /** + * + * + * @param index + * @param vConfiguration + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setConfiguration( + final int index, + final org.castor.cpa.test.framework.xml.Configuration vConfiguration) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._configurationList.size()) { + throw new IndexOutOfBoundsException("setConfiguration: Index value '" + index + "' not in range [0.." + (this._configurationList.size() - 1) + "]"); + } + + this._configurationList.set(index, vConfiguration); + } + + /** + * + * + * @param vConfigurationArray + */ + public void setConfiguration( + final org.castor.cpa.test.framework.xml.Configuration[] vConfigurationArray) { + //-- copy array + _configurationList.clear(); + + for (int i = 0; i < vConfigurationArray.length; i++) { + this._configurationList.add(vConfigurationArray[i]); + } + } + + /** + * + * + * @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.cpa.test.framework.xml.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.cpa.test.framework.xml.Database[] vDatabaseArray) { + //-- copy array + _databaseList.clear(); + + for (int i = 0; i < vDatabaseArray.length; i++) { + this._databaseList.add(vDatabaseArray[i]); + } + } + + /** + * Sets the value of field 'defaultDatabase'. + * + * @param defaultDatabase the value of field 'defaultDatabase'. + */ + public void setDefaultDatabase( + final java.lang.String defaultDatabase) { + this._defaultDatabase = defaultDatabase; + } + + /** + * Sets the value of field 'defaultTransaction'. + * + * @param defaultTransaction the value of field + * 'defaultTransaction'. + */ + public void setDefaultTransaction( + final java.lang.String defaultTransaction) { + this._defaultTransaction = defaultTransaction; + } + + /** + * + * + * @param index + * @param vTransaction + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setTransaction( + final int index, + final org.castor.cpa.test.framework.xml.Transaction vTransaction) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._transactionList.size()) { + throw new IndexOutOfBoundsException("setTransaction: Index value '" + index + "' not in range [0.." + (this._transactionList.size() - 1) + "]"); + } + + this._transactionList.set(index, vTransaction); + } + + /** + * + * + * @param vTransactionArray + */ + public void setTransaction( + final org.castor.cpa.test.framework.xml.Transaction[] vTransactionArray) { + //-- copy array + _transactionList.clear(); + + for (int i = 0; i < vTransactionArray.length; i++) { + this._transactionList.add(vTransactionArray[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.cpa.test.framework.xml.CpactfConf + */ + public static org.castor.cpa.test.framework.xml.CpactfConf unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.cpa.test.framework.xml.CpactfConf) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.CpactfConf.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); + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Database.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Database.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Database.java (revision 0) @@ -0,0 +1,220 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class Database. + * + * @version $Revision$ $Date$ + */ +public class Database implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _engine. + */ + private org.castor.cpa.test.framework.xml.types.DatabaseEngineType _engine; + + /** + * Field _description. + */ + private java.lang.String _description; + + /** + * Field _databaseChoice. + */ + private org.castor.cpa.test.framework.xml.DatabaseChoice _databaseChoice; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Database() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'databaseChoice'. + * + * @return the value of field 'DatabaseChoice'. + */ + public org.castor.cpa.test.framework.xml.DatabaseChoice getDatabaseChoice( + ) { + return this._databaseChoice; + } + + /** + * 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 'engine'. + * + * @return the value of field 'Engine'. + */ + public org.castor.cpa.test.framework.xml.types.DatabaseEngineType getEngine( + ) { + return this._engine; + } + + /** + * 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 { + 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 { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'databaseChoice'. + * + * @param databaseChoice the value of field 'databaseChoice'. + */ + public void setDatabaseChoice( + final org.castor.cpa.test.framework.xml.DatabaseChoice databaseChoice) { + this._databaseChoice = databaseChoice; + } + + /** + * 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 'engine'. + * + * @param engine the value of field 'engine'. + */ + public void setEngine( + final org.castor.cpa.test.framework.xml.types.DatabaseEngineType engine) { + this._engine = engine; + } + + /** + * 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.cpa.test.framework.xml.Database + */ + public static org.castor.cpa.test.framework.xml.Database unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.cpa.test.framework.xml.Database) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.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); + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/DatabaseChoice.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/DatabaseChoice.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/DatabaseChoice.java (revision 0) @@ -0,0 +1,195 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class DatabaseChoice. + * + * @version $Revision$ $Date$ + */ +public class DatabaseChoice implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _driver. + */ + private org.castor.cpa.test.framework.xml.Driver _driver; + + /** + * Field _dataSource. + */ + private org.castor.cpa.test.framework.xml.DataSource _dataSource; + + /** + * Field _jndi. + */ + private org.castor.cpa.test.framework.xml.Jndi _jndi; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DatabaseChoice() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'dataSource'. + * + * @return the value of field 'DataSource'. + */ + public org.castor.cpa.test.framework.xml.DataSource getDataSource( + ) { + return this._dataSource; + } + + /** + * Returns the value of field 'driver'. + * + * @return the value of field 'Driver'. + */ + public org.castor.cpa.test.framework.xml.Driver getDriver( + ) { + return this._driver; + } + + /** + * Returns the value of field 'jndi'. + * + * @return the value of field 'Jndi'. + */ + public org.castor.cpa.test.framework.xml.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 { + 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 { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'dataSource'. + * + * @param dataSource the value of field 'dataSource'. + */ + public void setDataSource( + final org.castor.cpa.test.framework.xml.DataSource dataSource) { + this._dataSource = dataSource; + } + + /** + * Sets the value of field 'driver'. + * + * @param driver the value of field 'driver'. + */ + public void setDriver( + final org.castor.cpa.test.framework.xml.Driver driver) { + this._driver = driver; + } + + /** + * Sets the value of field 'jndi'. + * + * @param jndi the value of field 'jndi'. + */ + public void setJndi( + final org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.DatabaseChoice + */ + public static org.castor.cpa.test.framework.xml.DatabaseChoice unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.cpa.test.framework.xml.DatabaseChoice) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.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); + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/DataSource.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/DataSource.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/DataSource.java (revision 0) @@ -0,0 +1,312 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class DataSource. + * + * @version $Revision$ $Date$ + */ +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.cpa.test.framework.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.castor.cpa.test.framework.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 '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.cpa.test.framework.xml.Param at the given index + */ + public org.castor.cpa.test.framework.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.castor.cpa.test.framework.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.castor.cpa.test.framework.xml.Param[] getParam( + ) { + org.castor.cpa.test.framework.xml.Param[] array = new org.castor.cpa.test.framework.xml.Param[0]; + return (org.castor.cpa.test.framework.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 { + 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 { + 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.cpa.test.framework.xml.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.cpa.test.framework.xml.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.castor.cpa.test.framework.xml.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.cpa.test.framework.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.castor.cpa.test.framework.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.castor.cpa.test.framework.xml.DataSource + */ + public static org.castor.cpa.test.framework.xml.DataSource unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.cpa.test.framework.xml.DataSource) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.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); + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ConfigurationDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ConfigurationDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ConfigurationDescriptor.java (revision 0) @@ -0,0 +1,288 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.Configuration; + +/** + * Class ConfigurationDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ConfigurationDescriptor 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 ConfigurationDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "configuration"; + _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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Configuration target = (Configuration) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Configuration target = (Configuration) 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 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); + //-- 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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Configuration target = (Configuration) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Configuration target = (Configuration) object; + target.setDescription( (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); + 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); + //-- _mappingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.Mapping.class, "_mappingList", "mapping", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Configuration target = (Configuration) object; + return target.getMapping(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Configuration target = (Configuration) object; + target.addMapping( (org.castor.cpa.test.framework.xml.Mapping) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Configuration target = (Configuration) object; + target.removeAllMapping(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Mapping(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.Mapping"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _mappingList + 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.castor.cpa.test.framework.xml.Configuration.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/CpactfConfDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/CpactfConfDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/CpactfConfDescriptor.java (revision 0) @@ -0,0 +1,380 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.CpactfConf; + +/** + * Class CpactfConfDescriptor. + * + * @version $Revision$ $Date$ + */ +public class CpactfConfDescriptor 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 CpactfConfDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "cpactf-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 + + //-- _defaultDatabase + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_defaultDatabase", "default-database", 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 + { + CpactfConf target = (CpactfConf) object; + return target.getDefaultDatabase(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CpactfConf target = (CpactfConf) object; + target.setDefaultDatabase( (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: _defaultDatabase + 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); + //-- _defaultTransaction + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_defaultTransaction", "default-transaction", 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 + { + CpactfConf target = (CpactfConf) object; + return target.getDefaultTransaction(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CpactfConf target = (CpactfConf) object; + target.setDefaultTransaction( (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: _defaultTransaction + 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 + + //-- _configurationList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.Configuration.class, "_configurationList", "configuration", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + CpactfConf target = (CpactfConf) object; + return target.getConfiguration(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CpactfConf target = (CpactfConf) object; + target.addConfiguration( (org.castor.cpa.test.framework.xml.Configuration) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + CpactfConf target = (CpactfConf) object; + target.removeAllConfiguration(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Configuration(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.Configuration"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _configurationList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _databaseList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.Database.class, "_databaseList", "database", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + CpactfConf target = (CpactfConf) object; + return target.getDatabase(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CpactfConf target = (CpactfConf) object; + target.addDatabase( (org.castor.cpa.test.framework.xml.Database) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + CpactfConf target = (CpactfConf) object; + target.removeAllDatabase(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Database(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.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); + //-- _transactionList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.Transaction.class, "_transactionList", "transaction", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + CpactfConf target = (CpactfConf) object; + return target.getTransaction(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + CpactfConf target = (CpactfConf) object; + target.addTransaction( (org.castor.cpa.test.framework.xml.Transaction) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + CpactfConf target = (CpactfConf) object; + target.removeAllTransaction(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Transaction(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.Transaction"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _transactionList + 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.castor.cpa.test.framework.xml.CpactfConf.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DatabaseChoiceDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DatabaseChoiceDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DatabaseChoiceDescriptor.java (revision 0) @@ -0,0 +1,275 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.Driver.class, "_driver", "driver", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DatabaseChoice target = (DatabaseChoice) object; + return target.getDriver(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DatabaseChoice target = (DatabaseChoice) object; + target.setDriver( (org.castor.cpa.test.framework.xml.Driver) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Driver(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.DataSource.class, "_dataSource", "data-source", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DatabaseChoice target = (DatabaseChoice) object; + return target.getDataSource(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DatabaseChoice target = (DatabaseChoice) object; + target.setDataSource( (org.castor.cpa.test.framework.xml.DataSource) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.DataSource(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.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.cpa.test.framework.xml.Jndi.class, "_jndi", "jndi", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DatabaseChoice target = (DatabaseChoice) object; + return target.getJndi(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DatabaseChoice target = (DatabaseChoice) object; + target.setJndi( (org.castor.cpa.test.framework.xml.Jndi) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Jndi(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.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. + */ + 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.castor.cpa.test.framework.xml.DatabaseChoice.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DatabaseDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DatabaseDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DatabaseDescriptor.java (revision 0) @@ -0,0 +1,319 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getName(); + } + 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()); + } + } + 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(org.castor.cpa.test.framework.xml.types.DatabaseEngineType.class, "_engine", "engine", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getEngine(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.setEngine( (org.castor.cpa.test.framework.xml.types.DatabaseEngineType) 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.castor.cpa.test.framework.xml.types.DatabaseEngineType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("DatabaseEngineType"); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _engine + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + 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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Database target = (Database) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.setDescription( (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); + 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); + //-- _databaseChoice + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.DatabaseChoice.class, "_databaseChoice", "-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 + { + Database target = (Database) object; + return target.getDatabaseChoice(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Database target = (Database) object; + target.setDatabaseChoice( (org.castor.cpa.test.framework.xml.DatabaseChoice) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.DatabaseChoice(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.DatabaseChoice"); + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new org.castor.cpa.test.framework.xml.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); + } + + + //-----------/ + //- 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.castor.cpa.test.framework.xml.Database.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DataSourceDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DataSourceDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DataSourceDescriptor.java (revision 0) @@ -0,0 +1,249 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DataSource target = (DataSource) object; + return target.getClassName(); + } + 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()); + } + } + 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.cpa.test.framework.xml.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DataSource target = (DataSource) object; + return target.getParam(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DataSource target = (DataSource) object; + target.addParam( (org.castor.cpa.test.framework.xml.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()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Param(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.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. + */ + 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.castor.cpa.test.framework.xml.DataSource.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DriverDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DriverDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/DriverDescriptor.java (revision 0) @@ -0,0 +1,289 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Driver target = (Driver) object; + return target.getUrl(); + } + 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()); + } + } + 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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Driver target = (Driver) object; + return target.getClassName(); + } + 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()); + } + } + 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.cpa.test.framework.xml.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Driver target = (Driver) object; + return target.getParam(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Driver target = (Driver) object; + target.addParam( (org.castor.cpa.test.framework.xml.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()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Param(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.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. + */ + 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.castor.cpa.test.framework.xml.Driver.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/JndiDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/JndiDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/JndiDescriptor.java (revision 0) @@ -0,0 +1,202 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Jndi target = (Jndi) object; + return target.getName(); + } + 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()); + } + } + 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.castor.cpa.test.framework.xml.Jndi.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ManagerDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ManagerDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ManagerDescriptor.java (revision 0) @@ -0,0 +1,249 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.Manager; + +/** + * Class ManagerDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ManagerDescriptor 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 ManagerDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Manager target = (Manager) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Manager target = (Manager) 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 + + //-- _paramList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Manager target = (Manager) object; + return target.getParam(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Manager target = (Manager) object; + target.addParam( (org.castor.cpa.test.framework.xml.Param) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Manager target = (Manager) object; + target.removeAllParam(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Param(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.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. + */ + 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.castor.cpa.test.framework.xml.Manager.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/MappingDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/MappingDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/MappingDescriptor.java (revision 0) @@ -0,0 +1,202 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Mapping target = (Mapping) object; + return target.getHref(); + } + 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()); + } + } + 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. + */ + 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.castor.cpa.test.framework.xml.Mapping.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ParamDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ParamDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/ParamDescriptor.java (revision 0) @@ -0,0 +1,242 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.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.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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Param target = (Param) object; + return target.getName(); + } + 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()); + } + } + 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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Param target = (Param) object; + return target.getValue(); + } + 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()); + } + } + 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. + */ + 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.castor.cpa.test.framework.xml.Param.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/TransactionDescriptor.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/TransactionDescriptor.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/descriptors/TransactionDescriptor.java (revision 0) @@ -0,0 +1,315 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.castor.cpa.test.framework.xml.Transaction; + +/** + * Class TransactionDescriptor. + * + * @version $Revision$ $Date$ + */ +public class TransactionDescriptor 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 TransactionDescriptor() { + super(); + _nsURI = "http://castor.org/JDO"; + _xmlName = "transaction"; + _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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Transaction target = (Transaction) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Transaction target = (Transaction) 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 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); + //-- _mode + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.types.TransactionModeType.class, "_mode", "mode", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Transaction target = (Transaction) object; + return target.getMode(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Transaction target = (Transaction) object; + target.setMode( (org.castor.cpa.test.framework.xml.types.TransactionModeType) 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.castor.cpa.test.framework.xml.types.TransactionModeType.class, handler); + desc.setImmutable(true); + desc.setSchemaType("TransactionModeType"); + 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 + } + 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() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Transaction target = (Transaction) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Transaction target = (Transaction) object; + target.setDescription( (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); + 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); + //-- _manager + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.castor.cpa.test.framework.xml.Manager.class, "_manager", "manager", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Transaction target = (Transaction) object; + return target.getManager(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Transaction target = (Transaction) object; + target.setManager( (org.castor.cpa.test.framework.xml.Manager) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new org.castor.cpa.test.framework.xml.Manager(); + } + }; + desc.setSchemaType("org.castor.cpa.test.framework.xml.Manager"); + desc.setHandler(handler); + desc.setNameSpaceURI("http://castor.org/JDO"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + addSequenceElement(desc); + + //-- validation code for: _manager + 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.castor.cpa.test.framework.xml.Transaction.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; + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Driver.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Driver.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Driver.java (revision 0) @@ -0,0 +1,337 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class Driver. + * + * @version $Revision$ $Date$ + */ +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.cpa.test.framework.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.castor.cpa.test.framework.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 '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.cpa.test.framework.xml.Param at the given index + */ + public org.castor.cpa.test.framework.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.castor.cpa.test.framework.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.castor.cpa.test.framework.xml.Param[] getParam( + ) { + org.castor.cpa.test.framework.xml.Param[] array = new org.castor.cpa.test.framework.xml.Param[0]; + return (org.castor.cpa.test.framework.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 '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 { + 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 { + 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.cpa.test.framework.xml.Param vParam) { + boolean removed = _paramList.remove(vParam); + return removed; + } + + /** + * Method removeParamAt. + * + * @param index + * @return the element removed from the collection + */ + public org.castor.cpa.test.framework.xml.Param removeParamAt( + final int index) { + java.lang.Object obj = this._paramList.remove(index); + return (org.castor.cpa.test.framework.xml.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.cpa.test.framework.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.castor.cpa.test.framework.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 '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.cpa.test.framework.xml.Driver + */ + public static org.castor.cpa.test.framework.xml.Driver unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.cpa.test.framework.xml.Driver) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.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); + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Jndi.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Jndi.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Jndi.java (revision 0) @@ -0,0 +1,144 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class Jndi. + * + * @version $Revision$ $Date$ + */ +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 { + 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 { + 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.cpa.test.framework.xml.Jnd + */ + public static org.castor.cpa.test.framework.xml.Jndi unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (org.castor.cpa.test.framework.xml.Jndi) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.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); + } + +} Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Manager.java =================================================================== --- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Manager.java (revision 0) +++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Manager.java (revision 0) @@ -0,0 +1,312 @@ +/* + * This class was automatically generated with + * Castor 1.1.2.1, using an XML + * Schema. + * $Id$ + */ + +package org.castor.cpa.test.framework.xml; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class Manager. + * + * @version $Revision$ $Date$ + */ +public class Manager implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name. + */ + private java.lang.String _name; + + /** + * Field _paramList. + */ + private java.util.List _paramList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Manager() { + 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.cpa.test.framework.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.castor.cpa.test.framework.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 '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.cpa.test.framework.xml.Param at the given index + */ + public org.castor.cpa.test.framework.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.castor.cpa.test.framework.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.castor.cpa.test.framework.xml.Param[] getParam(
+ ) {
+ org.castor.cpa.test.framework.xml.Param[] array = new org.castor.cpa.test.framework.xml.Param[0];
+ return (org.castor.cpa.test.framework.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 {
+ 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 {
+ 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.cpa.test.framework.xml.Param vParam) {
+ boolean removed = _paramList.remove(vParam);
+ return removed;
+ }
+
+ /**
+ * Method removeParamAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public org.castor.cpa.test.framework.xml.Param removeParamAt(
+ final int index) {
+ java.lang.Object obj = this._paramList.remove(index);
+ return (org.castor.cpa.test.framework.xml.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.cpa.test.framework.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.castor.cpa.test.framework.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.castor.cpa.test.framework.xml.Manager
+ */
+ public static org.castor.cpa.test.framework.xml.Manager unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (org.castor.cpa.test.framework.xml.Manager) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.Manager.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);
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Mapping.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Mapping.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Mapping.java (revision 0)
@@ -0,0 +1,145 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * Class Mapping.
+ *
+ * @version $Revision$ $Date$
+ */
+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 {
+ 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 {
+ 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.cpa.test.framework.xml.Mapping
+ */
+ public static org.castor.cpa.test.framework.xml.Mapping unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (org.castor.cpa.test.framework.xml.Mapping) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.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);
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Param.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Param.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Param.java (revision 0)
@@ -0,0 +1,170 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * Class Param.
+ *
+ * @version $Revision$ $Date$
+ */
+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 {
+ 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 {
+ 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.cpa.test.framework.xml.Param
+ */
+ public static org.castor.cpa.test.framework.xml.Param unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (org.castor.cpa.test.framework.xml.Param) Unmarshaller.unmarshal(org.castor.cpa.test.framework.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);
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Transaction.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Transaction.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/Transaction.java (revision 0)
@@ -0,0 +1,220 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * Class Transaction.
+ *
+ * @version $Revision$ $Date$
+ */
+public class Transaction implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _mode.
+ */
+ private org.castor.cpa.test.framework.xml.types.TransactionModeType _mode;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _manager.
+ */
+ private org.castor.cpa.test.framework.xml.Manager _manager;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public Transaction() {
+ super();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ * 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 'manager'.
+ *
+ * @return the value of field 'Manager'.
+ */
+ public org.castor.cpa.test.framework.xml.Manager getManager(
+ ) {
+ return this._manager;
+ }
+
+ /**
+ * Returns the value of field 'mode'.
+ *
+ * @return the value of field 'Mode'.
+ */
+ public org.castor.cpa.test.framework.xml.types.TransactionModeType getMode(
+ ) {
+ return this._mode;
+ }
+
+ /**
+ * 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 {
+ 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 {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * 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 'manager'.
+ *
+ * @param manager the value of field 'manager'.
+ */
+ public void setManager(
+ final org.castor.cpa.test.framework.xml.Manager manager) {
+ this._manager = manager;
+ }
+
+ /**
+ * Sets the value of field 'mode'.
+ *
+ * @param mode the value of field 'mode'.
+ */
+ public void setMode(
+ final org.castor.cpa.test.framework.xml.types.TransactionModeType mode) {
+ this._mode = mode;
+ }
+
+ /**
+ * 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.cpa.test.framework.xml.Transaction
+ */
+ public static org.castor.cpa.test.framework.xml.Transaction unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (org.castor.cpa.test.framework.xml.Transaction) Unmarshaller.unmarshal(org.castor.cpa.test.framework.xml.Transaction.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);
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/.castor.cdr
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/.castor.cdr (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/.castor.cdr (revision 0)
@@ -0,0 +1,3 @@
+#Wed Dec 19 01:08:25 GMT+01:00 2007
+org.castor.cpa.test.framework.xml.types.TransactionModeType=org.castor.cpa.test.framework.xml.types.descriptors.TransactionModeTypeDescriptor
+org.castor.cpa.test.framework.xml.types.DatabaseEngineType=org.castor.cpa.test.framework.xml.types.descriptors.DatabaseEngineTypeDescriptor
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/DatabaseEngineType.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/DatabaseEngineType.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/DatabaseEngineType.java (revision 0)
@@ -0,0 +1,256 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml.types;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Hashtable;
+
+/**
+ * Class DatabaseEngineType.
+ *
+ * @version $Revision$ $Date$
+ */
+public class DatabaseEngineType implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * The db2 type
+ */
+ public static final int DB2_TYPE = 0;
+
+ /**
+ * The instance of the db2 type
+ */
+ public static final DatabaseEngineType DB2 = new DatabaseEngineType(DB2_TYPE, "db2");
+
+ /**
+ * The derby type
+ */
+ public static final int DERBY_TYPE = 1;
+
+ /**
+ * The instance of the derby type
+ */
+ public static final DatabaseEngineType DERBY = new DatabaseEngineType(DERBY_TYPE, "derby");
+
+ /**
+ * The hsql type
+ */
+ public static final int HSQL_TYPE = 2;
+
+ /**
+ * The instance of the hsql type
+ */
+ public static final DatabaseEngineType HSQL = new DatabaseEngineType(HSQL_TYPE, "hsql");
+
+ /**
+ * The mysql type
+ */
+ public static final int MYSQL_TYPE = 3;
+
+ /**
+ * The instance of the mysql type
+ */
+ public static final DatabaseEngineType MYSQL = new DatabaseEngineType(MYSQL_TYPE, "mysql");
+
+ /**
+ * The oracle type
+ */
+ public static final int ORACLE_TYPE = 4;
+
+ /**
+ * The instance of the oracle type
+ */
+ public static final DatabaseEngineType ORACLE = new DatabaseEngineType(ORACLE_TYPE, "oracle");
+
+ /**
+ * The pointbase type
+ */
+ public static final int POINTBASE_TYPE = 5;
+
+ /**
+ * The instance of the pointbase type
+ */
+ public static final DatabaseEngineType POINTBASE = new DatabaseEngineType(POINTBASE_TYPE, "pointbase");
+
+ /**
+ * The postgresql type
+ */
+ public static final int POSTGRESQL_TYPE = 6;
+
+ /**
+ * The instance of the postgresql type
+ */
+ public static final DatabaseEngineType POSTGRESQL = new DatabaseEngineType(POSTGRESQL_TYPE, "postgresql");
+
+ /**
+ * The progress type
+ */
+ public static final int PROGRESS_TYPE = 7;
+
+ /**
+ * The instance of the progress type
+ */
+ public static final DatabaseEngineType PROGRESS = new DatabaseEngineType(PROGRESS_TYPE, "progress");
+
+ /**
+ * The sapdb type
+ */
+ public static final int SAPDB_TYPE = 8;
+
+ /**
+ * The instance of the sapdb type
+ */
+ public static final DatabaseEngineType SAPDB = new DatabaseEngineType(SAPDB_TYPE, "sapdb");
+
+ /**
+ * The sql-server type
+ */
+ public static final int SQL_SERVER_TYPE = 9;
+
+ /**
+ * The instance of the sql-server type
+ */
+ public static final DatabaseEngineType SQL_SERVER = new DatabaseEngineType(SQL_SERVER_TYPE, "sql-server");
+
+ /**
+ * The sybase type
+ */
+ public static final int SYBASE_TYPE = 10;
+
+ /**
+ * The instance of the sybase type
+ */
+ public static final DatabaseEngineType SYBASE = new DatabaseEngineType(SYBASE_TYPE, "sybase");
+
+ /**
+ * 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 DatabaseEngineType(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 DatabaseEngineType
+ *
+ * @return an Enumeration over all possible instances of
+ * DatabaseEngineType
+ */
+ public static java.util.Enumeration enumerate(
+ ) {
+ return _memberTable.elements();
+ }
+
+ /**
+ * Method getType.Returns the type of this DatabaseEngineType
+ *
+ * @return the type of this DatabaseEngineType
+ */
+ public int getType(
+ ) {
+ return this.type;
+ }
+
+ /**
+ * Method init.
+ *
+ * @return the initialized Hashtable for the member table
+ */
+ private static java.util.Hashtable init(
+ ) {
+ Hashtable members = new Hashtable();
+ members.put("db2", DB2);
+ members.put("derby", DERBY);
+ members.put("hsql", HSQL);
+ members.put("mysql", MYSQL);
+ members.put("oracle", ORACLE);
+ members.put("pointbase", POINTBASE);
+ members.put("postgresql", POSTGRESQL);
+ members.put("progress", PROGRESS);
+ members.put("sapdb", SAPDB);
+ members.put("sql-server", SQL_SERVER);
+ members.put("sybase", SYBASE);
+ 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
+ * DatabaseEngineType
+ *
+ * @return the String representation of this DatabaseEngineType
+ */
+ public java.lang.String toString(
+ ) {
+ return this.stringValue;
+ }
+
+ /**
+ * Method valueOf.Returns a new DatabaseEngineType based on the
+ * given String value.
+ *
+ * @param string
+ * @return the DatabaseEngineType value of parameter 'string'
+ */
+ public static org.castor.cpa.test.framework.xml.types.DatabaseEngineType 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 DatabaseEngineType";
+ throw new IllegalArgumentException(err);
+ }
+ return (DatabaseEngineType) obj;
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/descriptors/DatabaseEngineTypeDescriptor.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/descriptors/DatabaseEngineTypeDescriptor.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/descriptors/DatabaseEngineTypeDescriptor.java (revision 0)
@@ -0,0 +1,155 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml.types.descriptors;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import org.castor.cpa.test.framework.xml.types.DatabaseEngineType;
+
+/**
+ * Class DatabaseEngineTypeDescriptor.
+ *
+ * @version $Revision$ $Date$
+ */
+public class DatabaseEngineTypeDescriptor 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 DatabaseEngineTypeDescriptor() {
+ super();
+ _nsURI = "http://castor.org/JDO";
+ _xmlName = "DatabaseEngineType";
+ _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.castor.cpa.test.framework.xml.types.DatabaseEngineType.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;
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/descriptors/TransactionModeTypeDescriptor.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/descriptors/TransactionModeTypeDescriptor.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/descriptors/TransactionModeTypeDescriptor.java (revision 0)
@@ -0,0 +1,155 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml.types.descriptors;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import org.castor.cpa.test.framework.xml.types.TransactionModeType;
+
+/**
+ * Class TransactionModeTypeDescriptor.
+ *
+ * @version $Revision$ $Date$
+ */
+public class TransactionModeTypeDescriptor 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 TransactionModeTypeDescriptor() {
+ super();
+ _nsURI = "http://castor.org/JDO";
+ _xmlName = "TransactionModeType";
+ _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.castor.cpa.test.framework.xml.types.TransactionModeType.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;
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/TransactionModeType.java
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/TransactionModeType.java (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/java/org/castor/cpa/test/framework/xml/types/TransactionModeType.java (revision 0)
@@ -0,0 +1,157 @@
+/*
+ * This class was automatically generated with
+ * Castor 1.1.2.1, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package org.castor.cpa.test.framework.xml.types;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Hashtable;
+
+/**
+ * Class TransactionModeType.
+ *
+ * @version $Revision$ $Date$
+ */
+public class TransactionModeType implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * The local type
+ */
+ public static final int LOCAL_TYPE = 0;
+
+ /**
+ * The instance of the local type
+ */
+ public static final TransactionModeType LOCAL = new TransactionModeType(LOCAL_TYPE, "local");
+
+ /**
+ * The global type
+ */
+ public static final int GLOBAL_TYPE = 1;
+
+ /**
+ * The instance of the global type
+ */
+ public static final TransactionModeType GLOBAL = new TransactionModeType(GLOBAL_TYPE, "global");
+
+ /**
+ * 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 TransactionModeType(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 TransactionModeType
+ *
+ * @return an Enumeration over all possible instances of
+ * TransactionModeType
+ */
+ public static java.util.Enumeration enumerate(
+ ) {
+ return _memberTable.elements();
+ }
+
+ /**
+ * Method getType.Returns the type of this TransactionModeType
+ *
+ * @return the type of this TransactionModeType
+ */
+ public int getType(
+ ) {
+ return this.type;
+ }
+
+ /**
+ * Method init.
+ *
+ * @return the initialized Hashtable for the member table
+ */
+ private static java.util.Hashtable init(
+ ) {
+ Hashtable members = new Hashtable();
+ members.put("local", LOCAL);
+ members.put("global", GLOBAL);
+ 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
+ * TransactionModeType
+ *
+ * @return the String representation of this TransactionModeType
+ */
+ public java.lang.String toString(
+ ) {
+ return this.stringValue;
+ }
+
+ /**
+ * Method valueOf.Returns a new TransactionModeType based on
+ * the given String value.
+ *
+ * @param string
+ * @return the TransactionModeType value of parameter 'string'
+ */
+ public static org.castor.cpa.test.framework.xml.types.TransactionModeType 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 TransactionModeType";
+ throw new IllegalArgumentException(err);
+ }
+ return (TransactionModeType) obj;
+ }
+
+}
Index: /home/ralf/workspace/castor-1/cpactf/src/main/resources/org/castor/cpa/test/framework/cpactf-conf.dtd
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/resources/org/castor/cpa/test/framework/cpactf-conf.dtd (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/resources/org/castor/cpa/test/framework/cpactf-conf.dtd (revision 0)
@@ -0,0 +1,248 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: /home/ralf/workspace/castor-1/cpactf/src/main/resources/org/castor/cpa/test/framework/cpactf-conf.dtd
___________________________________________________________________
Name: svn:executable
+ *
Index: /home/ralf/workspace/castor-1/cpactf/src/main/resources/org/castor/cpa/test/framework/cpactf-conf.xsd
===================================================================
--- /home/ralf/workspace/castor-1/cpactf/src/main/resources/org/castor/cpa/test/framework/cpactf-conf.xsd (revision 0)
+++ /home/ralf/workspace/castor-1/cpactf/src/main/resources/org/castor/cpa/test/framework/cpactf-conf.xsd (revision 0)
@@ -0,0 +1,140 @@
+
+
+