From xmlbeansbrittany35@example.net Fri Oct 03 01:35:41 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 71123 invoked from network); 3 Oct 2003 01:35:40 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 01:35:40 -0000 Received: (qmail 4958 invoked by uid 500); 3 Oct 2003 01:35:23 -0000 Delivered-To: brittany35@example.net Received: (qmail 4936 invoked by uid 500); 3 Oct 2003 01:35:23 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 4922 invoked from network); 3 Oct 2003 01:35:23 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 01:35:23 -0000 Received: (qmail 71117 invoked by uid 1739); 3 Oct 2003 01:35:40 -0000 Date: 3 Oct 2003 01:35:40 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v1/xkit anttask.html X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ericvas 2003/10/02 18:35:40 Added: v1/docs xmlbeantask.html Removed: v1/xkit anttask.html Log: Added help for XmlBeans Ant task, submitted by Keven Krouse, Reviewed by Eric Vasilik Revision Changes Path 1.1 xml-xmlbeans/v1/docs/xmlbeantask.html Index: xmlbeantask.html =================================================================== <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <title>XMLBean Task</title> </head> <body> <h2><a name="xmlbean">XMLBean</a></h2> <h3>Description</h3> <p>Compile a set of XSDs and/or WSDLs into xbeans. This is useful for building an XMLBean jar from .XSD and .WSDL files. &nbsp;The task can also generate the source code that makes up the xbean type system specified by the schema files if desired.</p> <p><b>Note:</b> This task depends on an external library not included in the Ant distribution called xbean.jar. &nbsp;It can be found in the XMLBeans developer kit at <a href="http://dev2dev.bea.com/technologies/xmlbeans/">http://dev2dev.bea.com/technologies/xmlbeans/</a>. The build script will need to include a taskdef for xmlbean, which could look like this:<br> </p> <pre>&nbsp;&nbsp;&nbsp; &lt;taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="path/to/xbean.jar"/&gt;</pre> <p> </p> <p>It is possible to refine the set of files that are being processed. This can be done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i> attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify the files you want to have excluded. This is also done with patterns. And finally with the <i>defaultexcludes</i> attribute, you can specify whether you want to use default exclusions or not. See the section on <a href="http://ant.apache.org/manual/dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the inclusion/exclusion of files works, and how to write patterns.</p> <p>This task forms an implicit <a href="http://ant.apache.org/manual/CoreTypes/fileset.html">FileSet</a> and supports all attributes of <code>&lt;fileset&gt;</code> (<code>dir</code> becomes <code>basedir</code>) as well as the nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and <code>&lt;patternset&gt;</code> elements.</p> <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tbody> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">schema</td> <td valign="top">A file that points to either an individual schema file or a directory of files. &nbsp;Not a path reference. &nbsp;If multiple schema files need to be built together, use a nexted fileset instead of setting schema.</td> <td align="center" valign="top">Yes, unless a fileset element is nested.</td> </tr> <tr> <td valign="top">destfile</td> <td valign="top">Define the name of the jar file created.&nbsp; For instance, "myXMLBean.jar" will output the results of this task into a jar with the same name.</td> <td align="center" valign="top">No, default is "xmltypes.jar".</td> </tr> <tr> <td valign="top">download</td> <td valign="top">Set to true to permit the compiler to download URLs for imports and includes.&nbsp; Defaults to false, meaning all imports and includes must be copied locally.<br> </td> <td align="center" valign="top">No, default is false.</td> </tr> <tr> <td valign="top">failonerror</td> <td valign="top"> Determines whether or not the ant target will continue if the XMLBean creation encounters a build error.<br> </td> <td align="center" valign="top">No, default is true.</td> </tr> <tr> <td valign="top">verbose<br> </td> <td valign="top">Controls the amount of build message output.<br> </td> <td valign="top" align="center">No, default is true.<br> </td> </tr> <tr> <td valign="top">typesystemname<br> </td> <td valign="top">The name of the package that the TypeSystemHolder class should be generated in.&nbsp; Normally this should be left unspecified. None of the xml beans are generated in this package. Use .xsdconfig files to modify xml bean package or class names.<br> </td> <td valign="top" align="center">No<br> </td> </tr> <tr> <td valign="top">classgendir<br> </td> <td valign="top">Set a location to generate .class files into.<br> </td> <td valign="top" align="center">No<br> </td> </tr> <tr> <td valign="top">srconly<br> </td> <td valign="top">A value of true means that only source will be generated.<br> </td> <td valign="top" align="center">No, default is false.<br> </td> </tr> <tr> <td valign="top">srcgendir<br> </td> <td valign="top">Set a location to generate .java files into.<br> </td> <td valign="top" align="center">No<br> </td> </tr> <tr> <td valign="top">classpath</td> <td valign="top">The classpath to use if schemas in the fileset import definitions that are supplied by other compiled xml beans JAR files, or if .java files are in the schema fileset. Also supports a nested classpath.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">classpathref</td> <td valign="top">Adds a classpath, given as <a href="http://ant.apache.org/manual/using.html#references">reference</a> to a path defined elsewhere.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">includes</td> <td valign="top">Comma- or space-separated list of patterns of files that must be included. All files are included when omitted.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">includesfile</td> <td valign="top">The name of a file. Each line of this file is taken to be an include pattern</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">excludes</td> <td valign="top">Comma- or space-separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">excludesfile</td> <td valign="top">The name of a file. Each line of this file is taken to be an exclude pattern</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">defaultexcludes</td> <td valign="top">Indicates whether default excludes should be used or not ("yes"/"no"). Default excludes are used when omitted.</td> <td valign="top" align="center">No</td> </tr> <tr> <td valign="top">debug</td> <td valign="top">Indicates whether source should be compiled with debug information; defaults to <code>off</code>. If set to <code>off</code>, <code>-g:none</code> will be passed on the command line for compilers that support it (for other compilers, no command line argument will be used). If set to <code>true</code>, the value of the <code>debuglevel</code> attribute determines the command line argument.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">debuglevel</td> <td valign="top">Keyword list to be appended to the <code>-g</code> command-line switch. This will be ignored by all implementations except <code>modern</code> and <code>classic(ver &gt;= 1.2)</code>. Legal values are <code>none</code> or a comma-separated list of the following keywords: <code>lines</code>, <code>vars</code>, and <code>source</code>. If <code>debuglevel</code> is not specified, by default, nothing will be appended to <code>-g</code>. If <code>debug</code> is not turned on, this attribute will be ignored. </td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">optimize</td> <td valign="top">Indicates whether source should be compiled with optimization; defaults to <code>off</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">includeAntRuntime</td> <td valign="top">Whether to include the Ant run-time libraries in the classpath; defaults to <code>yes</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">includeJavaRuntime</td> <td valign="top">Whether to include the default run-time libraries from the executing VM in the classpath; defaults to <code>no</code>.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">fork</td> <td valign="top">Whether to execute <code>javac</code> using the JDK compiler externally; defaults to <code>yes</code>.</td> <td align="center" valign="top">No, default is true</td> </tr> <tr> <td valign="top">executable</td> <td valign="top">Complete path to the <code>javac</code> executable to use in case of <code>fork=&quot;yes&quot;</code>. Defaults to the compiler of the Java version that is currently running Ant. Ignored if <code>fork=&quot;no&quot;</code></td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">memoryInitialSize</td> <td valign="top">The initial size of the memory for the underlying VM, if <code>javac</code> is run externally; ignored otherwise. Defaults to the standard VM memory setting. (Examples: <code>83886080</code>, <code>81920k</code>, or <code>80m</code>)</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">memoryMaximumSize</td> <td valign="top">The maximum size of the memory for the underlying VM, if <code>javac</code> is run externally; ignored otherwise. Defaults to the standard VM memory setting. (Examples: <code>83886080</code>, <code>81920k</code>, or <code>80m</code>)</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">compiler</td> <td valign="top">The compiler implementation to use. If this attribute is not set, the value of the <code>build.compiler</code> property, if set, will be used. Otherwise, the default compiler for the current VM will be used. <td align="center" valign="top">No</td> </tr> </tbody> </table> <h3>Example</h3> <blockquote> Be sure to define the task in your script, like this:<br> <pre>&lt;taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpath="path/to/xbean.jar"/&gt;</pre> <pre><br>&lt;xmlbean schema="schemas" destfile="Schemas.jar"/&gt;<br></pre> Builds all the schemas in the schemas directory and creates a jar called 'Schemas.jar'.<br> <pre>&lt;xmlbean schema="schemas/ourSchema.xsd" download="true"/&gt;<br></pre> Compiles the schema 'ourShema.xsd' into the default jar 'xmltypes.jar'. &nbsp;If &nbsp;any imports and includes are defined by remote URLs, they are downloaded during the build.<br> <h4>Using a fileset</h4> <pre>&lt;xmlbean classgendir="${build.dir}" classpath="${class.path}"<br> failonerror="true"&gt;<br> &lt;fileset basedir="src" excludes="**/*.xsd"/&gt;<br> &lt;fileset basedir="schemas" includes="**/*.*"/&gt;<br>&lt;/xmlbean&gt;<br></pre> Gathers all the files in the 'src' directory except .xsd files, along with every file in the 'schemas' directory and compiles them. The fileset can include schema files that refer to previously compiled schema components.&nbsp; The fileset can also contain .java files.&nbsp; The classpath parameter defines the classpath necessary to resolve compiled schema and java references.<br> <br> The built classes will go into ${build.dir}.<br> <pre></pre> </blockquote> <hr> <br> <br> <br> </body> </html> --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 20:37:19 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 23997 invoked from network); 3 Oct 2003 20:37:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 20:37:18 -0000 Received: (qmail 84191 invoked by uid 500); 3 Oct 2003 20:37:07 -0000 Delivered-To: brittany35@example.net Received: (qmail 84158 invoked by uid 500); 3 Oct 2003 20:37:06 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 84128 invoked from network); 3 Oct 2003 20:37:06 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 20:37:06 -0000 Received: (qmail 23974 invoked by uid 1738); 3 Oct 2003 20:37:17 -0000 Date: 3 Oct 2003 20:37:17 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v2/src/binding - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N davidbau 2003/10/03 13:37:17 xml-xmlbeans/v2/src/binding - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 20:37:29 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 24127 invoked from network); 3 Oct 2003 20:37:28 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 20:37:28 -0000 Received: (qmail 84592 invoked by uid 500); 3 Oct 2003 20:37:15 -0000 Delivered-To: brittany35@example.net Received: (qmail 84505 invoked by uid 500); 3 Oct 2003 20:37:15 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 84303 invoked from network); 3 Oct 2003 20:37:13 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 20:37:13 -0000 Received: (qmail 24052 invoked by uid 1738); 3 Oct 2003 20:37:25 -0000 Date: 3 Oct 2003 20:37:25 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v2/src/binding/org - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N davidbau 2003/10/03 13:37:25 xml-xmlbeans/v2/src/binding/org - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 20:37:32 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 24207 invoked from network); 3 Oct 2003 20:37:32 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 20:37:32 -0000 Received: (qmail 84906 invoked by uid 500); 3 Oct 2003 20:37:20 -0000 Delivered-To: brittany35@example.net Received: (qmail 84887 invoked by uid 500); 3 Oct 2003 20:37:20 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 84874 invoked from network); 3 Oct 2003 20:37:20 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 20:37:20 -0000 Received: (qmail 24200 invoked by uid 1738); 3 Oct 2003 20:37:31 -0000 Date: 3 Oct 2003 20:37:31 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v2/src/binding/org/apache - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N davidbau 2003/10/03 13:37:31 xml-xmlbeans/v2/src/binding/org/apache - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 20:37:39 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 24249 invoked from network); 3 Oct 2003 20:37:39 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 20:37:39 -0000 Received: (qmail 85002 invoked by uid 500); 3 Oct 2003 20:37:27 -0000 Delivered-To: brittany35@example.net Received: (qmail 84987 invoked by uid 500); 3 Oct 2003 20:37:27 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 84974 invoked from network); 3 Oct 2003 20:37:27 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 20:37:27 -0000 Received: (qmail 24243 invoked by uid 1738); 3 Oct 2003 20:37:38 -0000 Date: 3 Oct 2003 20:37:38 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v2/src/binding/org/apache/xmlbeans - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N davidbau 2003/10/03 13:37:38 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 20:37:46 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 24290 invoked from network); 3 Oct 2003 20:37:46 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 20:37:46 -0000 Received: (qmail 85069 invoked by uid 500); 3 Oct 2003 20:37:34 -0000 Delivered-To: brittany35@example.net Received: (qmail 85055 invoked by uid 500); 3 Oct 2003 20:37:34 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 85042 invoked from network); 3 Oct 2003 20:37:34 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 20:37:34 -0000 Received: (qmail 24283 invoked by uid 1738); 3 Oct 2003 20:37:45 -0000 Date: 3 Oct 2003 20:37:45 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N davidbau 2003/10/03 13:37:45 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 20:37:54 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 24334 invoked from network); 3 Oct 2003 20:37:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 20:37:53 -0000 Received: (qmail 85139 invoked by uid 500); 3 Oct 2003 20:37:42 -0000 Delivered-To: brittany35@example.net Received: (qmail 85125 invoked by uid 500); 3 Oct 2003 20:37:41 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 85112 invoked from network); 3 Oct 2003 20:37:41 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 20:37:41 -0000 Received: (qmail 24325 invoked by uid 1738); 3 Oct 2003 20:37:53 -0000 Date: 3 Oct 2003 20:37:53 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N davidbau 2003/10/03 13:37:53 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:02:00 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 34379 invoked from network); 3 Oct 2003 21:02:00 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:02:00 -0000 Received: (qmail 24748 invoked by uid 500); 3 Oct 2003 21:01:48 -0000 Delivered-To: brittany35@example.net Received: (qmail 24728 invoked by uid 500); 3 Oct 2003 21:01:48 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 24689 invoked from network); 3 Oct 2003 21:01:48 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:01:48 -0000 Received: (qmail 34374 invoked by uid 1737); 3 Oct 2003 21:01:59 -0000 Date: 3 Oct 2003 21:01:59 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/website/src/documentation/content/docs - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N daveremy 2003/10/03 14:01:59 xml-xmlbeans/website/src/documentation/content/docs - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:03:04 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 34635 invoked from network); 3 Oct 2003 21:03:04 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:03:04 -0000 Received: (qmail 27605 invoked by uid 500); 3 Oct 2003 21:02:52 -0000 Delivered-To: brittany35@example.net Received: (qmail 27563 invoked by uid 500); 3 Oct 2003 21:02:52 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 27550 invoked from network); 3 Oct 2003 21:02:52 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:02:52 -0000 Received: (qmail 34630 invoked by uid 1737); 3 Oct 2003 21:03:03 -0000 Date: 3 Oct 2003 21:03:03 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/website/src/documentation/content/docs/guide - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N daveremy 2003/10/03 14:03:03 xml-xmlbeans/website/src/documentation/content/docs/guide - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:03:13 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 34663 invoked from network); 3 Oct 2003 21:03:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:03:13 -0000 Received: (qmail 27684 invoked by uid 500); 3 Oct 2003 21:03:01 -0000 Delivered-To: brittany35@example.net Received: (qmail 27669 invoked by uid 500); 3 Oct 2003 21:03:01 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 27655 invoked from network); 3 Oct 2003 21:03:01 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:03:01 -0000 Received: (qmail 34658 invoked by uid 1737); 3 Oct 2003 21:03:12 -0000 Date: 3 Oct 2003 21:03:12 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/website/src/documentation/content/docs/images - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N daveremy 2003/10/03 14:03:12 xml-xmlbeans/website/src/documentation/content/docs/images - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:03:24 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 34749 invoked from network); 3 Oct 2003 21:03:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:03:24 -0000 Received: (qmail 28022 invoked by uid 500); 3 Oct 2003 21:03:12 -0000 Delivered-To: brittany35@example.net Received: (qmail 28003 invoked by uid 500); 3 Oct 2003 21:03:12 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 27990 invoked from network); 3 Oct 2003 21:03:12 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:03:12 -0000 Received: (qmail 34742 invoked by uid 1737); 3 Oct 2003 21:03:24 -0000 Date: 3 Oct 2003 21:03:24 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/website/src/documentation/content/docs/reference - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N daveremy 2003/10/03 14:03:24 xml-xmlbeans/website/src/documentation/content/docs/reference - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:03:37 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 34824 invoked from network); 3 Oct 2003 21:03:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:03:36 -0000 Received: (qmail 28189 invoked by uid 500); 3 Oct 2003 21:03:24 -0000 Delivered-To: brittany35@example.net Received: (qmail 28147 invoked by uid 500); 3 Oct 2003 21:03:24 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 28134 invoked from network); 3 Oct 2003 21:03:24 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:03:24 -0000 Received: (qmail 34819 invoked by uid 1737); 3 Oct 2003 21:03:36 -0000 Date: 3 Oct 2003 21:03:36 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/website/src/documentation/content/docs/reference/javax - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N daveremy 2003/10/03 14:03:36 xml-xmlbeans/website/src/documentation/content/docs/reference/javax - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:04:07 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 35022 invoked from network); 3 Oct 2003 21:04:06 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:04:06 -0000 Received: (qmail 28958 invoked by uid 500); 3 Oct 2003 21:03:37 -0000 Delivered-To: brittany35@example.net Received: (qmail 28933 invoked by uid 500); 3 Oct 2003 21:03:36 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 28907 invoked from network); 3 Oct 2003 21:03:36 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:03:36 -0000 Received: (qmail 34865 invoked by uid 1737); 3 Oct 2003 21:03:48 -0000 Date: 3 Oct 2003 21:03:48 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/website/src/documentation/content/docs/reference/org - New directory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N daveremy 2003/10/03 14:03:48 xml-xmlbeans/website/src/documentation/content/docs/reference/org - New directory --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:06:59 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 36028 invoked from network); 3 Oct 2003 21:06:59 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:06:59 -0000 Received: (qmail 37169 invoked by uid 500); 3 Oct 2003 21:06:47 -0000 Delivered-To: brittany35@example.net Received: (qmail 37124 invoked by uid 500); 3 Oct 2003 21:06:47 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 37102 invoked from network); 3 Oct 2003 21:06:46 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:06:46 -0000 Received: (qmail 36022 invoked by uid 1737); 3 Oct 2003 21:06:58 -0000 Date: 3 Oct 2003 21:06:58 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/website/src/documentation/content/docs xmlbeans.css X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N daveremy 2003/10/03 14:06:58 Added: website/src/documentation/content/docs/reference allclasses-frame.html allclasses-noframe.html constant-values.html deprecated-list.html help-doc.html index-all.html index.html overview-frame.html overview-summary.html overview-tree.html package-list packages.html serialized-form.html stylesheet.css website/src/documentation/content/docs/images conCursorTokenLocations.gif conXMLTypeHierarchy.gif website/src/documentation/content/docs/guide conGettingStartedwithXMLBeans.html conIntroToTheSchemaTypeSystem.html conJavaTypesGeneratedFromUserDerived.html conMethodsForGeneratedJavaTypes.html conNavigatingXMLwithCursors.html conSelectingXMLwithXPath.html conUnderstandingXMLTokens.html conUsingBookmarksToAnnotateXML.html conXMLBeansSupportBuiltInSchemaTypes.html website/src/documentation/content/docs xmlbeans.css Log: Adding docs Revision Changes Path 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/allclasses-frame.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/allclasses-frame.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/allclasses-noframe.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/allclasses-noframe.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/constant-values.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/constant-values.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/deprecated-list.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/deprecated-list.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/help-doc.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/help-doc.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/index-all.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/index-all.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/index.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/index.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/overview-frame.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/overview-frame.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/overview-summary.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/overview-summary.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/overview-tree.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/overview-tree.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/package-list http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/package-list?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/packages.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/packages.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/serialized-form.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/serialized-form.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/reference/stylesheet.css http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/reference/stylesheet.css?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/images/conCursorTokenLocations.gif <<Binary file>> 1.1 xml-xmlbeans/website/src/documentation/content/docs/images/conXMLTypeHierarchy.gif <<Binary file>> 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conGettingStartedwithXMLBeans.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conGettingStartedwithXMLBeans.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conIntroToTheSchemaTypeSystem.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conIntroToTheSchemaTypeSystem.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conJavaTypesGeneratedFromUserDerived.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conJavaTypesGeneratedFromUserDerived.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conMethodsForGeneratedJavaTypes.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conMethodsForGeneratedJavaTypes.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conNavigatingXMLwithCursors.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conNavigatingXMLwithCursors.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conSelectingXMLwithXPath.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conSelectingXMLwithXPath.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conUnderstandingXMLTokens.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conUnderstandingXMLTokens.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conUsingBookmarksToAnnotateXML.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conUsingBookmarksToAnnotateXML.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/guide/conXMLBeansSupportBuiltInSchemaTypes.html http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/guide/conXMLBeansSupportBuiltInSchemaTypes.html?rev=1.1 1.1 xml-xmlbeans/website/src/documentation/content/docs/xmlbeans.css http://cvs.apache.org/viewcvs/xml-xmlbeans/website/src/documentation/content/docs/xmlbeans.css?rev=1.1 --------------------------------------------------------------------- To unsubscribe, e-mail: brittany35@example.net For additional commands, e-mail: brittany35@example.net From xmlbeansbrittany35@example.net Fri Oct 03 21:18:19 2003 Return-Path: <xmlbeansbrittany35@example.net> Delivered-To: brittany35@example.net Received: (qmail 40765 invoked from network); 3 Oct 2003 21:18:19 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Oct 2003 21:18:19 -0000 Received: (qmail 57672 invoked by uid 500); 3 Oct 2003 21:18:07 -0000 Delivered-To: brittany35@example.net Received: (qmail 57657 invoked by uid 500); 3 Oct 2003 21:18:07 -0000 Mailing-List: contact brittany35@example.net; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: <mailto:brittany35@example.net> List-Help: <mailto:brittany35@example.net> List-Unsubscribe: <mailto:brittany35@example.net> List-Subscribe: <mailto:brittany35@example.net> Reply-To: brittany35@example.net Delivered-To: mailing list brittany35@example.net Received: (qmail 57644 invoked from network); 3 Oct 2003 21:18:07 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 3 Oct 2003 21:18:07 -0000 Received: (qmail 40757 invoked by uid 1738); 3 Oct 2003 21:18:18 -0000 Date: 3 Oct 2003 21:18:18 -0000 Message-ID: <brittany35@example.net> From: brittany35@example.net To: brittany35@example.net Subject: cvs commit: xml-xmlbeans/v2/test/src/drt/drtcases BindingTests.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N davidbau 2003/10/03 14:18:18 Modified: v2 build.xml v2/src/xmlstore/org/apache/xmlbeans/impl/store Saver.java Added: v2/src/binding/org/apache/xmlbeans/impl/binding BindingFile.java BindingLoader.java BindingProperty.java BindingType.java ByNameBean.java JavaName.java JaxbBean.java KindRegistry.java ParticleProperty.java PathBindingLoader.java QNameProperty.java XmlName.java v2/src/configschema/schema binding-config.xsd v2/test/src/drt/drtcases BindingTests.java Removed: v2/src/bindingconfig/schema binding-config.xsd Log: (1) Slightly modified binding-config.xsd to make it easier to persist (2) Added an in-memory API for dealing with binding config (3) Ported over a recent Saver.java fix from v1 to v2 (4) Added tests for the new binding-config stuff. Code review: Scott DRT: passed Revision Changes Path 1.3 +23 -1 xml-xmlbeans/v2/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-xmlbeans/v2/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 29 Sep 2003 19:20:29 -0000 1.2 +++ build.xml 3 Oct 2003 21:18:18 -0000 1.3 @@ -447,7 +447,7 @@ <target name="xbean.jar" depends="dirs, xmlpublic.classes, typestore.classes, common.classes, typeimpl.classes, xmlcomp.classes, - xmlstore.classes, + xmlstore.classes, binding.classes, oldxbean.jar, xsdschema.classes, xmlinputstream.classes"> <jar jarfile="build/lib/xbean.jar" index="true"> @@ -462,6 +462,7 @@ <fileset dir="build/classes/xmlschema"/> <fileset dir="build/classes/xmlstore"/> <fileset dir="build/classes/xmlinputstream"/> + <fileset dir="build/classes/binding"/> <fileset dir="build/classes/repackage"/> <fileset dir="src/license"/> </jar> @@ -601,6 +602,27 @@ <mkdir dir="build/classes/xmlcomp"/> <javac srcdir="src/xmlcomp" destdir="build/classes/xmlcomp" source="1.4" debug="on"> <classpath> + <pathelement location="build/classes/xmlinputstream"/> + <pathelement location="build/classes/xmlpublic"/> + <pathelement location="build/classes/common"/> + <pathelement location="build/classes/repackage"/> + <pathelement location="build/classes/typeimpl"/> + <pathelement location="build/classes/xmlconfig"/> + <pathelement location="build/classes/configschema"/> + <pathelement location="build/classes/toolschema"/> + <pathelement location="build/classes/xsdschema"/> + </classpath> + </javac> + + </target> + + <!-- binding target =============================================== --> + + <target name="binding.classes" depends="dirs, repackage.classes, typeimpl.classes, xmlpublic.classes, typestore.classes, configschema.classes"> + <mkdir dir="build/classes/binding"/> + <javac srcdir="src/binding" destdir="build/classes/binding" source="1.4" debug="on"> + <classpath> + <pathelement location="build/classes/configschema"/> <pathelement location="build/classes/xmlinputstream"/> <pathelement location="build/classes/xmlpublic"/> <pathelement location="build/classes/common"/> 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/BindingFile.java Index: BindingFile.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; import org.apache.xmlbeans.XmlOptions; import java.util.Map; import java.util.LinkedHashMap; import java.util.ArrayList; import java.util.List; import java.util.Iterator; import java.io.IOException; public class BindingFile extends BindingLoader { private Map bindingTypes = new LinkedHashMap(); // name-pair -> BindingType private Map xmlFromJava = new LinkedHashMap(); // javaName -> xmlName private Map javaFromXmlPojo = new LinkedHashMap(); // xmlName -> javaName (pojo) private Map javaFromXmlObj = new LinkedHashMap(); // xmlName -> javaName (xmlobj) /** * This constructor is used when making a new one out of the blue. */ public BindingFile() { // nothing to do - all maps are empty } /** * Loader */ public static BindingFile forDoc(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingConfigDocument doc) { return new BindingFile(doc); } /** * This constructor loads an instance from an XML file */ protected BindingFile(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingConfigDocument doc) { List errors = new ArrayList(); if (!doc.validate(new XmlOptions().setErrorListener(errors))) throw new IllegalArgumentException(errors.size() > 0 ? errors.get(0).toString() : "Invalid binding-config document"); // todo: in the loops below, validate that entries are unique, or modify schema to do so. org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType[] btNodes = doc.getBindingConfig().getBindings().getBindingTypeArray(); for (int i = 0; i < btNodes.length; i++) { BindingType next = BindingType.loadFromBindingTypeNode(this, btNodes[i]); addBindingType(next, false, false); } org.apache.xmlbeans.x2003.x09.bindingConfig.Mapping[] mNodes = doc.getBindingConfig().getJavaToXml().getMappingArray(); for (int i = 0; i < mNodes.length; i++) { JavaName jName = JavaName.forString(mNodes[i].getJavatype()); XmlName xName = XmlName.forString(mNodes[i].getXmlcomponent()); xmlFromJava.put(jName, xName); } mNodes = doc.getBindingConfig().getXmlToPojo().getMappingArray(); for (int i = 0; i < mNodes.length; i++) { JavaName jName = JavaName.forString(mNodes[i].getJavatype()); XmlName xName = XmlName.forString(mNodes[i].getXmlcomponent()); javaFromXmlPojo.put(xName, jName); } mNodes = doc.getBindingConfig().getXmlToXmlobj().getMappingArray(); for (int i = 0; i < mNodes.length; i++) { JavaName jName = JavaName.forString(mNodes[i].getJavatype()); XmlName xName = XmlName.forString(mNodes[i].getXmlcomponent()); javaFromXmlObj.put(xName, jName); } } /** * Writes out to XML */ public org.apache.xmlbeans.x2003.x09.bindingConfig.BindingConfigDocument write() throws IOException { org.apache.xmlbeans.x2003.x09.bindingConfig.BindingConfigDocument doc = org.apache.xmlbeans.x2003.x09.bindingConfig.BindingConfigDocument.Factory.newInstance(); write(doc); return doc; } /** * This function copies an instance into an empty doc. */ private void write(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingConfigDocument doc) { if (doc.getBindingConfig() != null) throw new IllegalArgumentException("Can only write into empty doc"); org.apache.xmlbeans.x2003.x09.bindingConfig.BindingConfigDocument.BindingConfig bcNode = doc.addNewBindingConfig(); // make tables org.apache.xmlbeans.x2003.x09.bindingConfig.BindingTable btabNode = bcNode.addNewBindings(); org.apache.xmlbeans.x2003.x09.bindingConfig.MappingTable jtabNode = bcNode.addNewJavaToXml(); org.apache.xmlbeans.x2003.x09.bindingConfig.MappingTable pojotabNode = bcNode.addNewXmlToPojo(); org.apache.xmlbeans.x2003.x09.bindingConfig.MappingTable xotabNode = bcNode.addNewXmlToXmlobj(); // fill em in: binding types (delegate to BindingType.write) for (Iterator i = bindingTypes.values().iterator(); i.hasNext(); ) { BindingType bType = (BindingType)i.next(); org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType btNode = btabNode.addNewBindingType(); bType.write(btNode); } // from-java mappings for (Iterator i = xmlFromJava.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry)i.next(); JavaName jName = (JavaName)entry.getKey(); XmlName xName = (XmlName)entry.getValue(); org.apache.xmlbeans.x2003.x09.bindingConfig.Mapping mNode = jtabNode.addNewMapping(); mNode.setJavatype(jName.toString()); mNode.setXmlcomponent(xName.toString()); } // to-pojo for (Iterator i = javaFromXmlPojo.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry)i.next(); JavaName jName = (JavaName)entry.getValue(); XmlName xName = (XmlName)entry.getKey(); org.apache.xmlbeans.x2003.x09.bindingConfig.Mapping mNode = pojotabNode.addNewMapping(); mNode.setJavatype(jName.toString()); mNode.setXmlcomponent(xName.toString()); } // to-xmlobj for (Iterator i = javaFromXmlObj.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry)i.next(); JavaName jName = (JavaName)entry.getValue(); XmlName xName = (XmlName)entry.getKey(); org.apache.xmlbeans.x2003.x09.bindingConfig.Mapping mNode = xotabNode.addNewMapping(); mNode.setJavatype(jName.toString()); mNode.setXmlcomponent(xName.toString()); } } public void addBindingType(BindingType bType, boolean fromJavaDefault, boolean fromXmlDefault) { bindingTypes.put(pair(bType.getJavaName(), bType.getXmlName()), bType); if (fromJavaDefault) { if (bType.isXmlObject()) javaFromXmlObj.put(bType.getXmlName(), bType.getJavaName()); else javaFromXmlPojo.put(bType.getXmlName(), bType.getJavaName()); } if (fromXmlDefault) { xmlFromJava.put(bType.getJavaName(), bType.getXmlName()); } } public BindingType getBindingType(JavaName jName, XmlName xName) { return (BindingType)bindingTypes.get(pair(jName, xName)); } public BindingType getBindingTypeForXmlPojo(XmlName xName) { JavaName jName = (JavaName)javaFromXmlPojo.get(xName); if (jName == null) return null; return (BindingType)bindingTypes.get(pair(jName, xName)); } public BindingType getBindingTypeForXmlObj(XmlName xName) { JavaName jName = (JavaName)javaFromXmlObj.get(xName); if (jName == null) return null; return (BindingType)bindingTypes.get(pair(jName, xName)); } public BindingType getBindingTypeForJava(JavaName jName) { XmlName xName = (XmlName)xmlFromJava.get(jName); if (xName == null) return null; return (BindingType)bindingTypes.get(pair(jName, xName)); } protected static NamePair pair(JavaName jName, XmlName xName) { return new NamePair(jName, xName); } private static class NamePair { private final JavaName jName; private final XmlName xName; NamePair(JavaName jName, XmlName xName) { this.jName = jName; this.xName = xName; } public JavaName getJavaName() { return jName; } public XmlName getXmlName() { return xName; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof BindingFile.NamePair)) return false; final BindingFile.NamePair namePair = (BindingFile.NamePair) o; if (!jName.equals(namePair.jName)) return false; if (!xName.equals(namePair.xName)) return false; return true; } public int hashCode() { int result; result = jName.hashCode(); result = 29 * result + xName.hashCode(); return result; } } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/BindingLoader.java Index: BindingLoader.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 2, 2003 */ package org.apache.xmlbeans.impl.binding; public abstract class BindingLoader { public abstract BindingType getBindingType(JavaName jName, XmlName xName); public abstract BindingType getBindingTypeForXmlPojo(XmlName xName); public abstract BindingType getBindingTypeForXmlObj(XmlName xName); public abstract BindingType getBindingTypeForJava(JavaName jName); } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/BindingProperty.java Index: BindingProperty.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; import org.apache.xmlbeans.SchemaType; public abstract class BindingProperty { private BindingLoader bLoader; private JavaName tJava; private XmlName tXml; private String getter; private String setter; private String field; private JavaName collection; /** * This kind of constructor is used when making a new one out of the blue. * * Subclasses should call super(..) when defining constructors that init new BindingTypes. */ protected BindingProperty(BindingLoader bFile) { this.bLoader = bFile; } /** * This constructor loads an instance from an XML file * * Subclasses should have ctors of the same signature and call super(..) first. */ protected BindingProperty(BindingLoader bLoader, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty node) { this.bLoader = bLoader; this.tJava = JavaName.forString(node.getJavatype()); this.tXml = XmlName.forString(node.getXmlcomponent()); this.getter = node.getGetter(); this.setter = node.getSetter(); this.field = node.getField(); String collection = node.getCollection(); if (collection != null) this.collection = JavaName.forString(collection); } /** * This function copies an instance back out to the relevant part of the XML file. * * Subclasses should override and call super.write first. */ protected org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty write(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty node) { node = (org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty)node.changeType(kinds.typeForClass(this.getClass())); node.setJavatype(tJava.toString()); node.setXmlcomponent(tXml.toString()); if (getFieldName() != null) node.setField(getFieldName()); if (getGetterName() != null) node.setGetter(getGetterName()); if (getSetterName() != null) node.setSetter(getSetterName()); if (getCollectionClass() != null) node.setCollection(getCollectionClass().toString()); return node; } public boolean isField() { return field != null; } public BindingType getBindingType() { return bLoader.getBindingType(tJava, tXml); } public void setBindingType(BindingType bType) { this.tJava = bType.getJavaName(); this.tXml = bType.getXmlName(); } public String getGetterName() { return isField() ? null : getter; } public void setGetterName(String getter) { this.getter = getter; } public boolean hasSetter() { return !isField() && setter != null; } public String getSetterName() { return isField() ? null : setter; } public void setSetterName(String setter) { this.setter = setter; } public String getFieldName() { return field; } public void setFieldName(String field) { this.field = field; } public JavaName getCollectionClass() { return collection; } public void setCollectionClass(JavaName jName) { collection = jName; } /* REGISTRY OF SUBCLASSES */ private static final Class[] ctorArgs = new Class[] {BindingLoader.class, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty.class}; public static BindingProperty forNode(BindingLoader bLoader, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty node) { try { Class clazz = kinds.classForType(node.schemaType()); return (BindingProperty)clazz.getConstructor(ctorArgs).newInstance(new Object[] {bLoader, node}); } catch (Exception e) { throw (IllegalStateException)new IllegalStateException("Cannot load class for " + node.schemaType() + ": should be registered.").initCause(e); } } /** * Should only be called by BindingFile, when loading up bindingtypes */ static KindRegistry kinds = new KindRegistry(); public static void registerClassAndType(Class clazz, SchemaType type) { if (!BindingProperty.class.isAssignableFrom(clazz)) throw new IllegalArgumentException("Classes must inherit from BindingProperty"); if (!org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty.type.isAssignableFrom(type)) throw new IllegalArgumentException("Schema types must inherit from binding-property"); kinds.registerClassAndType(clazz, type); } static { registerClassAndType(QNameProperty.class, org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty.type); registerClassAndType(ParticleProperty.class, org.apache.xmlbeans.x2003.x09.bindingConfig.ParticleProperty.type); } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/BindingType.java Index: BindingType.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; import org.apache.xmlbeans.SchemaType; public abstract class BindingType { private BindingLoader bLoader; private JavaName jName; private XmlName xName; private boolean isXmlObj; /** * This kind of constructor is used when making a new one out of the blue. * * Subclasses should call super(..) when defining constructors that init new BindingTypes. */ protected BindingType(BindingLoader bLoader, JavaName jName, XmlName xName, boolean isXmlObj) { this.bLoader = bLoader; this.jName = jName; this.xName = xName; this.isXmlObj = isXmlObj; } /** * This constructor loads an instance from an XML file * * Subclasses should have ctors of the same signature and call super(..) first. */ protected BindingType(BindingLoader bLoader, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType node) { this.bLoader = bLoader; this.jName = JavaName.forString(node.getJavatype()); this.xName = XmlName.forString(node.getXmlcomponent()); this.isXmlObj = node.getXmlobj(); } /** * This function copies an instance back out to the relevant part of the XML file. * * Subclasses should override and call super.write first. */ protected org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType write(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType node) { node = (org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType)node.changeType(kinds.typeForClass(this.getClass())); node.setJavatype(jName.toString()); node.setXmlcomponent(xName.toString()); node.setXmlobj(isXmlObj); return node; } public final BindingLoader getBindingLoader() { return bLoader; } public final JavaName getJavaName() { return jName; } public final XmlName getXmlName() { return xName; } public final boolean isXmlObject() { return isXmlObj; } /* REGISTRY OF SUBCLASSES */ private static final Class[] ctorArgs = new Class[] {BindingLoader.class, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType.class}; public static BindingType loadFromBindingTypeNode(BindingLoader bLoader, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType node) { try { Class clazz = kinds.classForType(node.schemaType()); return (BindingType)clazz.getConstructor(ctorArgs).newInstance(new Object[] {bLoader, node}); } catch (Exception e) { throw (IllegalStateException)new IllegalStateException("Cannot load class for " + node.schemaType() + ": should be registered.").initCause(e); } } /** * Should only be called by BindingFile, when loading up bindingtypes */ static KindRegistry kinds = new KindRegistry(); public static void registerClassAndType(Class clazz, SchemaType type) { if (!BindingType.class.isAssignableFrom(clazz)) throw new IllegalArgumentException("Classes must inherit from BindingType"); if (!org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType.type.isAssignableFrom(type)) throw new IllegalArgumentException("Schema types must inherit from binding-type"); kinds.registerClassAndType(clazz, type); } static { registerClassAndType(JaxbBean.class, org.apache.xmlbeans.x2003.x09.bindingConfig.JaxbBean.type); registerClassAndType(ByNameBean.class, org.apache.xmlbeans.x2003.x09.bindingConfig.ByNameBean.type); } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/ByNameBean.java Index: ByNameBean.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; import javax.xml.namespace.QName; import java.util.Map; import java.util.List; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Collections; import java.util.Collection; public class ByNameBean extends BindingType { List props = new ArrayList(); // of QNameProperties Map eltProps = new HashMap(); // QName -> prop (elts) Map attProps = new HashMap(); // QName -> prop (attrs) public ByNameBean(BindingLoader bLoader, JavaName jName, XmlName xName, boolean isXmlObj) { super(bLoader, jName, xName, isXmlObj); } public ByNameBean(BindingLoader bFile, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType node) { super(bFile, node); org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty[] propArray = ((org.apache.xmlbeans.x2003.x09.bindingConfig.ByNameBean)node).getQnamePropertyArray(); for (int i = 0; i < propArray.length; i++) { addProperty((QNameProperty)BindingProperty.forNode(getBindingLoader(), propArray[i])); } } /** * This function copies an instance back out to the relevant part of the XML file. * * Subclasses should override and call super.write first. */ protected org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType write(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType node) { org.apache.xmlbeans.x2003.x09.bindingConfig.ByNameBean bnNode = (org.apache.xmlbeans.x2003.x09.bindingConfig.ByNameBean)super.write(node); for (Iterator i = props.iterator(); i.hasNext(); ) { QNameProperty qProp = (QNameProperty)i.next(); org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty qpNode = bnNode.addNewQnameProperty(); qProp.write(qpNode); } return bnNode; } /** * Returns an unmodifiable collection of QNameProperty objects. */ public Collection getProperties() { return Collections.unmodifiableCollection(props); } /** * Looks up a property by attribute name, null if no match. */ public QNameProperty getPropertyForAttribute(QName name) { return (QNameProperty)attProps.get(name); } /** * Looks up a property by element name, null if no match. */ public QNameProperty getPropertyForElement(QName name) { return (QNameProperty)eltProps.get(name); } /** * Adds a new property */ public void addProperty(QNameProperty newProp) { if (newProp.isAttribute() ? attProps.containsKey(newProp.getQName()) : eltProps.containsKey(newProp.getQName())) throw new IllegalArgumentException(); props.add(newProp); if (newProp.isAttribute()) attProps.put(newProp.getQName(), newProp); else eltProps.put(newProp.getQName(), newProp); } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/JavaName.java Index: JavaName.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; public final class JavaName { private final String className; private final String arrayString; /** * Returns a JavaName object for a fully-qualified class name. * The class-name should be dot-separated for packages and * dollar-separated for inner classes. * * The names "int", "byte" etc are considered special. * Arrays are dealt with as [][][] at the end. * * This is a static function to permit pooling in the future. */ public static JavaName forString(String className) { return new JavaName(className); } /** * Do not use this constructor; use forClassName instead. */ private JavaName(String className) { if (className == null) throw new IllegalArgumentException(); int arrayDepth = 0; for (int i = className.length() - 2; i >= 0; i -= 2) { if (className.charAt(i) != '[' || className.charAt(i + 1) != ']') break; arrayDepth += 1; } this.className = className.substring(0, className.length() - 2 * arrayDepth); this.arrayString = className.substring(className.length() - 2 * arrayDepth); } /** * Returns the fully-qualified class name. */ public String toString() { return className + arrayString; } /** * Returns the array depth, 0 for non-arrays, 1 for [], 2 for [][], etc. */ public int getArrayDepth() { return arrayString.length() / 2; } /** * Returns the dot-separated package name. */ public String getPackage() { int index = className.lastIndexOf('.'); if (index <= 0) return ""; return className.substring(0, index); } /** * True if this is an inner class name. */ public boolean isInnerClass() { return (className.lastIndexOf('$') >= 0); } /** * Returns the JavaName of the containing class, or null if this * is not an inner class name. */ public JavaName getContainingClass() { int index = className.lastIndexOf('$'); if (index < 0) return null; return JavaName.forString(className.substring(0, index)); } /** * Returns the short class name (i.e., no dots or dollars). */ public String getShortClassName() { int index = className.lastIndexOf('$'); int index2 = className.lastIndexOf('.'); if (index2 > index) index = index2; if (index < 0) return className; return className.substring(index + 1); } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof JavaName)) return false; final JavaName javaName = (JavaName) o; if (!className.equals(javaName.className)) return false; return true; } public int hashCode() { return className.hashCode(); } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/JaxbBean.java Index: JaxbBean.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; import javax.xml.namespace.QName; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.Iterator; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; public class JaxbBean extends BindingType { Map partProps = new LinkedHashMap(); // XmlName -> prop (particles) Map eltProps = new LinkedHashMap(); // QName -> prop (elts) Map attProps = new LinkedHashMap(); // QName -> prop (attrs) public JaxbBean(BindingLoader bFile, JavaName jName, XmlName xName) { super(bFile, jName, xName, false); } public JaxbBean(BindingLoader bFile, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType node) { super(bFile, node); org.apache.xmlbeans.x2003.x09.bindingConfig.JaxbBean jbNode = (org.apache.xmlbeans.x2003.x09.bindingConfig.JaxbBean)node; org.apache.xmlbeans.x2003.x09.bindingConfig.ParticleProperty[] ppropArray = jbNode.getParticlePropertyArray(); for (int i = 0; i < ppropArray.length; i++) { addProperty(BindingProperty.forNode(getBindingLoader(), ppropArray[i])); } org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty[] qpropArray = jbNode.getQnamePropertyArray(); for (int i = 0; i < qpropArray.length; i++) { addProperty(BindingProperty.forNode(getBindingLoader(), qpropArray[i])); } } /** * This function copies an instance back out to the relevant part of the XML file. * * Subclasses should override and call super.write first. */ protected org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType write(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingType node) { org.apache.xmlbeans.x2003.x09.bindingConfig.JaxbBean jbNode = (org.apache.xmlbeans.x2003.x09.bindingConfig.JaxbBean)super.write(node); for (Iterator i = getProperties().iterator(); i.hasNext(); ) { BindingProperty bProp = (BindingProperty)i.next(); if (bProp instanceof ParticleProperty) { org.apache.xmlbeans.x2003.x09.bindingConfig.ParticleProperty ppNode = jbNode.addNewParticleProperty(); bProp.write(ppNode); } else { org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty qpNode = jbNode.addNewQnameProperty(); bProp.write(qpNode); } } return jbNode; } /** * Returns an unmodifiable collection of QNameProperty objects. */ public Collection getProperties() { List result = new ArrayList(); result.addAll(partProps.values()); result.addAll(eltProps.values()); result.addAll(attProps.values()); return Collections.unmodifiableCollection(result); } /** * Looks up a property by attribute name, null if no match. */ public QNameProperty getPropertyForAttribute(QName name) { return (QNameProperty)attProps.get(name); } /** * Looks up a property by element name, null if no match. */ public QNameProperty getPropertyForElement(QName name) { return (QNameProperty)eltProps.get(name); } /** * Adds a new property */ public void addProperty(BindingProperty newProp) { if (newProp instanceof ParticleProperty) { partProps.put(newProp.getBindingType().getXmlName(), newProp); } else if (newProp instanceof QNameProperty) { QNameProperty qProp = (QNameProperty)newProp; if (qProp.isAttribute()) attProps.put(qProp.getQName(), newProp); else eltProps.put(qProp.getQName(), newProp); } else { throw new IllegalArgumentException(); } } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/KindRegistry.java Index: KindRegistry.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 2, 2003 */ package org.apache.xmlbeans.impl.binding; import org.apache.xmlbeans.SchemaType; import java.util.Map; import java.util.HashMap; /* package protected */ /** * Note that this is NOT a generic binding registry for users' binding; this is * a registry that is used internally just to manage binding between * XBeans for BindingTypes and BindingType wrapper classes. The reason * for this mechanism is that XMLBeans binding is NOT YET powerful enough * to bind the various kinds of BindingTypes directly to schema yet. * * However, in the future, we hope to make it powerful enough to do so, * so that most of the hand-coded binding betwen Java and XML can go away. * This class, and all the mechanisms that use it, should go away too. */ class KindRegistry { private Map registryClassFromType = new HashMap(); private Map registryTypeFromClass = new HashMap(); synchronized void registerClassAndType(Class bindingTypeClass, SchemaType bindingTypeSchemaType) { registryClassFromType.put(bindingTypeSchemaType, bindingTypeClass); registryTypeFromClass.put(bindingTypeClass, bindingTypeSchemaType); } synchronized Class classForType(SchemaType type) { return (Class)registryClassFromType.get(type); } synchronized SchemaType typeForClass(Class clazz) { return (SchemaType)registryTypeFromClass.get(clazz); } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/ParticleProperty.java Index: ParticleProperty.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; public class ParticleProperty extends BindingProperty { public ParticleProperty(BindingLoader bFile) { super(bFile); } public ParticleProperty(BindingLoader bFile, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty node) { super(bFile, node); } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/PathBindingLoader.java Index: PathBindingLoader.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 2, 2003 */ package org.apache.xmlbeans.impl.binding; import java.util.ArrayList; import java.util.List; import java.util.Iterator; import java.util.IdentityHashMap; import java.util.Collections; import java.util.Collection; public class PathBindingLoader extends BindingLoader { private final Collection loaderPath; public static final PathBindingLoader EMPTY_LOADER = new PathBindingLoader(Collections.EMPTY_LIST); public static BindingLoader forPath(BindingLoader[] pathArray) { IdentityHashMap seen = new IdentityHashMap(); List path = new ArrayList(pathArray.length); for (int i = 0; i < pathArray.length; i++) addToPath(path, seen, pathArray[i]); if (path.size() == 0) return EMPTY_LOADER; if (path.size() == 1) return (BindingLoader)path.get(0); return new PathBindingLoader(path); } private static void addToPath(List path, IdentityHashMap seen, BindingLoader loader) { if (seen.containsKey(loader)) return; if (loader instanceof PathBindingLoader) for (Iterator j = ((PathBindingLoader)path).loaderPath.iterator(); j.hasNext(); ) addToPath(path, seen, (BindingLoader)j.next()); else path.add(loader); } private PathBindingLoader(List path) { loaderPath = Collections.unmodifiableList(path); } public BindingType getBindingType(JavaName jName, XmlName xName) { BindingType result = null; for (Iterator i = loaderPath.iterator(); i.hasNext(); ) { result = ((BindingLoader)i.next()).getBindingType(jName, xName); if (result != null) return result; } return null; } public BindingType getBindingTypeForXmlPojo(XmlName xName) { BindingType result = null; for (Iterator i = loaderPath.iterator(); i.hasNext(); ) { result = ((BindingLoader)i.next()).getBindingTypeForXmlPojo(xName); if (result != null) return result; } return null; } public BindingType getBindingTypeForXmlObj(XmlName xName) { BindingType result = null; for (Iterator i = loaderPath.iterator(); i.hasNext(); ) { result = ((BindingLoader)i.next()).getBindingTypeForXmlObj(xName); if (result != null) return result; } return null; } public BindingType getBindingTypeForJava(JavaName jName) { BindingType result = null; for (Iterator i = loaderPath.iterator(); i.hasNext(); ) { result = ((BindingLoader)i.next()).getBindingTypeForJava(jName); if (result != null) return result; } return null; } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/QNameProperty.java Index: QNameProperty.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; import javax.xml.namespace.QName; public class QNameProperty extends BindingProperty { private QName theName; private boolean isAttribute; private boolean isMultiple; private boolean isOptional; private boolean isNillable; public QNameProperty(BindingLoader bFile) { super(bFile); } public QNameProperty(BindingLoader bFile, org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty node) { super(bFile, node); org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty qpNode = (org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty)node; theName = qpNode.getQname(); isAttribute = qpNode.getAttribute(); isMultiple = qpNode.getMultiple(); isNillable = qpNode.getNillable(); isOptional = qpNode.getOptional(); } /** * This function copies an instance back out to the relevant part of the XML file. * * Subclasses should override and call super.write first. */ protected org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty write(org.apache.xmlbeans.x2003.x09.bindingConfig.BindingProperty node) { node = super.write(node); org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty qpNode = (org.apache.xmlbeans.x2003.x09.bindingConfig.QnameProperty)node; qpNode.setQname(theName); if (isAttribute) qpNode.setAttribute(true); if (isMultiple) qpNode.setMultiple(true); if (isOptional) qpNode.setOptional(true); if (isNillable) qpNode.setNillable(true); return qpNode; } public QName getQName() { return theName; } public void setQName(QName theName) { this.theName = theName; } public boolean isAttribute() { return isAttribute; } public void setAttribute(boolean attribute) { isAttribute = attribute; } public boolean isMultiple() { return isMultiple; } public void setMultiple(boolean multiple) { isMultiple = multiple; } public boolean isOptional() { return isOptional; } public void setOptional(boolean optional) { isOptional = optional; } public boolean isNillable() { return isNillable; } public void setNillable(boolean nillable) { isNillable = nillable; } } 1.1 xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/XmlName.java Index: XmlName.java =================================================================== /** * XBeans implementation. * Author: David Bau * Date: Oct 1, 2003 */ package org.apache.xmlbeans.impl.binding; import org.apache.xmlbeans.impl.common.XMLChar; import javax.xml.namespace.QName; /** * An XmlName is a way of uniquely identifying any * logical component in a schema. * * For a diagram of the kinds of components that can be referenced, * see http://www.w3.org/TR/xmlschema-1/components.gif * * A signature looks like this: * * a-name1|t|e=name2|p.3|s|p.5|c|p.0|t|e=name3@my-namespace * * This reads as: * The attribute declaration called "name1" (unqualified) inside * the anonymous type of * the element declaration called "name2" (qualified) which is * the third particle of * the sequence which is * the fifth particle of * the choice which is * the zeroth particle of * the anonymous type of * the element named name3 (qualified) in * the namespace my-namespace. * * Hyphens (-) introduce unqualified names * Equals (=) introduce qualified names * Dot (.) introduce numbers * Anonymous components are just single-letters. * * There are these types of components * * n = Notations (named, global only) * e = Element decls (named, global or inside t or p) * Identity constraint defs * k = key/unique/keyref (named, in elts only) * g = Model group defs (named, global only) * Model group compositors: * l = All compositors (anon, inside p or g) * s = Sequence compositors (anon, inside p or g) * c = Choice compositors (anon, inside p or g) * p = Particles (numbered, inside t or l or s or c) * w = Wildcards (anon, inside p only) * v = Attribute Uses (named, in type only, inside t) * a = Attribute Declarations (named, global or inside t or v) * r = Attribute group definitions (named, global only) * t = Type definitions (name when global, or anon inside i, m, e, a, t) * * Not part of the spec, but we treat as components: * d = document type definition (named, global only) * b = attribute-container type definition (named, global only) * m = union member definition (numbered, inside t only) * y = soap array of dimension n (numbered, referencing global t or another y only) * * A canonical signature will shortcut the following: * * - global elements do not need to be explicitly nested inside their * containing document types (e=name|d=name@namespace -> e=name@namespace) * - global attributes do not need to be explicitly nested inside their * containing attribute types (e=name|d=name@namespace -> e=name@namespace) * - an element of a type, if its name is unique, may be referenced without the * intervening particle path. (e.g., e=name2|p.3|s|p.5|c|p.0|t can be * reduced to e=name2|t) * - an attribute of a type may be referenced without explicitly putting it * inside an attribute use (e.g., a-name1|v-name1|t -> a-name1|t) * * Notice SOAP arrays are included in the naming schema, as follows: * * A soap array type written like this: * x:drg[,,,][,][,,,] * * Has the following signature: * y.3|y.2|y.4|t=drg@foobar */ public class XmlName { private String namespace; private String path; public static final int NOTATION = 'n'; public static final int ELEMENT = 'e'; public static final int ID_CONSTRAINT = 'k'; public static final int MODEL_GROUP = 'g'; public static final int ALL = 'l'; public static final int SEQUENCE = 's'; public static final int CHOICE = 'c'; public static final int PARTICLE = 'p'; public static final int WILDCARD = 'w'; public static final int ATTRIBUTE_USE = 'v'; public static final int ATTRIBUTE = 'a'; public static final int ATTRIBUTE_GROUP = 'r'; public static final int TYPE = 't'; public static final int DOCUMENT_TYPE = 'd'; public static final int ATTRIBUTE_TYPE = 'b'; public static final int MEMBER = 'm'; public static final int SOAP_ARRAY = 'y'; /** * This function is used to see if a path is valid or not. */ public boolean valid() { XmlName outerComponent = null; int outerType = 0; String localName = internalGetStringName(); boolean hasNumber = internalGetNumber() >= 0; boolean hasName = (localName != null); boolean isAnonymous = internalIsAnonymous(); boolean isQualified = internalIsQualified(); boolean isGlobal = !isNestedComponent(); if (!isGlobal) { outerComponent = getOuterComponent(); outerType = outerComponent.getComponentType(); } boolean result; if (localName != null && !XMLChar.isValidNCName(localName)) return false; switch (getComponentType()) { case NOTATION: result = (isGlobal && hasName && isQualified); case ELEMENT: result = (hasName && (isGlobal && isQualified || outerType == TYPE || outerType == PARTICLE)); case ID_CONSTRAINT: result = (hasName && outerType == ELEMENT); case MODEL_GROUP: result = (hasName && isGlobal); case ALL: case SEQUENCE: case CHOICE: result = (isAnonymous && (outerType == PARTICLE || outerType == MODEL_GROUP)); case PARTICLE: result = (hasNumber && (outerType == SEQUENCE || outerType == CHOICE || outerType == ALL || outerType == TYPE)); case WILDCARD: result = (isAnonymous && (outerType == PARTICLE || outerType == TYPE || outerType == ATTRIBUTE_GROUP)); case ATTRIBUTE_USE: result = (hasName && (outerType == TYPE || outerType == ATTRIBUTE_GROUP)); case ATTRIBUTE: result = (hasName && (isGlobal && isQualified || outerType == TYPE || outerType == ATTRIBUTE_USE)); case ATTRIBUTE_GROUP: result = (hasName && isQualified && isGlobal); case TYPE: result = ((hasName && isQualified && isGlobal) || (isAnonymous && outerType == TYPE || outerType == ELEMENT || outerType == ATTRIBUTE || outerType == MEMBER)); case DOCUMENT_TYPE: result = (hasName && isQualified && isGlobal); case ATTRIBUTE_TYPE: result = (hasName && isQualified && isGlobal); case MEMBER: result = (isAnonymous && outerType == TYPE); case SOAP_ARRAY: result
{'source': 'Apache Software Foundation Public Mail Archives'}