[pkg-java] r3898 - in trunk/jaxme: . jaxme jaxme/ant jaxme/debian jaxme/etc jaxme/etc/maven2 jaxme/prerequisites jaxme/src/documentation jaxme/src/documentation/content/xdocs jaxme/src/documentation/manual jaxme/src/jaxme/org/apache/ws/jaxme jaxme/src/jaxme/org/apache/ws/jaxme/examples/misc/address jaxme/src/jaxme/org/apache/ws/jaxme/generator jaxme/src/jaxme/org/apache/ws/jaxme/generator/impl jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg jaxme/src/jaxme/org/apache/ws/jaxme/generator/types jaxme/src/jaxme/org/apache/ws/jaxme/generator/util jaxme/src/jaxme/org/apache/ws/jaxme/impl jaxme/src/jaxme/org/apache/ws/jaxme/junit jaxme/src/jaxme/org/apache/ws/jaxme/util jaxme/src/js/org/apache/ws/jaxme/js jaxme/src/js/org/apache/ws/jaxme/js/junit jaxme/src/js/org/apache/ws/jaxme/js/pattern jaxme/src/pm/org/apache/ws/jaxme/pm/generator/jdbc jaxme/src/pm/org/apache/ws/jaxme/pm/ino/api4j jaxme/src/test/jaxb jaxme/src/test/jaxb/bindings jaxme/src/test/jaxb/jira jaxme/src/xs/org/apache/ws/jaxme/xs jaxme/src/xs/org/apache/ws/jaxme/xs/impl jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl jaxme/src/xs/org/apache/ws/jaxme/xs/junit jaxme/src/xs/org/apache/ws/jaxme/xs/parser jaxme/src/xs/org/apache/ws/jaxme/xs/util jaxme/src/xs/org/apache/ws/jaxme/xs/xml
mkoch at alioth.debian.org
mkoch at alioth.debian.org
Sat Jul 21 08:19:32 UTC 2007
Author: mkoch
Date: 2007-07-21 08:19:31 +0000 (Sat, 21 Jul 2007)
New Revision: 3898
Added:
trunk/jaxme/jaxme/etc/maven2/
trunk/jaxme/jaxme/etc/maven2/jaxme2-rt.pom
trunk/jaxme/jaxme/etc/maven2/jaxme2.pom
trunk/jaxme/jaxme/etc/maven2/jaxmeapi.pom
trunk/jaxme/jaxme/etc/maven2/jaxmejs.pom
trunk/jaxme/jaxme/etc/maven2/jaxmepm.pom
trunk/jaxme/jaxme/etc/maven2/jaxmexs.pom
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXMixedElementParser.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BindingsTest.java
trunk/jaxme/jaxme/src/test/jaxb/bindings/
trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.jxb
trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.xsd
trunk/jaxme/jaxme/src/test/jaxb/bindings/imported.xsi
trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-83.xsd
trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-84.xsd
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java
trunk/jaxme/jaxme_0.5.2+dfsg.orig.tar.gz
Removed:
trunk/jaxme/jaxme/src/documentation/release-0.3.tar.bz2
trunk/jaxme/jaxme/src/documentation/release-0.4.tar.bz2
trunk/jaxme/jaxme_0.5.1+dfsg.orig.tar.gz
Modified:
trunk/jaxme/jaxme/
trunk/jaxme/jaxme/ant/jm.xml
trunk/jaxme/jaxme/ant/js.xml
trunk/jaxme/jaxme/build.xml
trunk/jaxme/jaxme/debian/
trunk/jaxme/jaxme/debian/changelog
trunk/jaxme/jaxme/debian/control
trunk/jaxme/jaxme/debian/rules
trunk/jaxme/jaxme/prerequisites/LICENSE-DOM.html
trunk/jaxme/jaxme/prerequisites/LICENSE-tomcat.txt
trunk/jaxme/jaxme/prerequisites/README
trunk/jaxme/jaxme/src/documentation/content/xdocs/downloads.ehtml
trunk/jaxme/jaxme/src/documentation/content/xdocs/news.xml
trunk/jaxme/jaxme/src/documentation/content/xdocs/release.xml
trunk/jaxme/jaxme/src/documentation/manual/xjctask.xml
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMMarshaller.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMPI.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMUnmarshaller.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMValidator.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observable.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observer.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/ValidationEvents.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/examples/misc/address/AddressPrinter.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/Generator.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/SchemaException.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/XJCTask.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/impl/Inliner.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/Context.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/GroupSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/SGFactory.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/GlobalContext.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBAttributeSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBComplexTypeSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBObjectSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSGFactory.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSchemaSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSimpleContentTypeSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBTypeSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg/GroupHandlerSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/AtomicTypeSGImpl.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DateTimeSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DecimalSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/ListTypeSGImpl.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/PrimitiveTypeSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/QNameSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/StringSG.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/UnionTypeSGImpl.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/DateFilter.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/ReflectResolver.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/Configuration.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JAXBContextImpl.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMControllerImpl.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMMarshallerImpl.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXElementParser.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BaseTestCase.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JaxbTest.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JiraTest.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/MarshallerTest.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/ParserTest.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/ClassLoader.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/Configurator.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMBuilder.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMSerializer.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceResolver.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceSupport.java
trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceUser.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/AbstractJavaMethod.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IncreasingTarget.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngine.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngineImpl.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaQNameImpl.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaSourceFactory.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/WriterTarget.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/MultipleInheritanceTest.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/TypesafeEnumerationTest.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/create.sql
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/Ant.java
trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/TypesafeEnumerationGenerator.java
trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/generator/jdbc/JaxMeJdbcSG.java
trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/ino/api4j/TaminoAPI4JPm.java
trunk/jaxme/jaxme/src/test/jaxb/build.xml
trunk/jaxme/jaxme/src/test/jaxb/nestedGroups.xsd
trunk/jaxme/jaxme/src/test/jaxb/types.xsd
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSComplexType.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSElement.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSParser.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/DOMSerializer.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSElementImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBAppinfoImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBClassImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavaTypeImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavadocImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBPropertyImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBSchemaBindingsImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBTypesafeEnumClassImpl.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/FormatTest.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/JiraTest.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTestBase.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/parser/DOMBuilder.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/XsDateTimeFormat.java
trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/xml/XsNamespaceList.java
trunk/jaxme/jaxme/status.xml
Log:
jaxme (0.5.2+dfsg-1) unstable; urgency=low
* New upstream release. Closes: #429523.
* Added myself to Uploaders.
-- Michael Koch <konqueror at gmx.de> Mon, 16 Jul 2007 19:24:29 +0200
Property changes on: trunk/jaxme/jaxme
___________________________________________________________________
Name: svn:ignore
+ build
build-stamp
dist
Modified: trunk/jaxme/jaxme/ant/jm.xml
===================================================================
--- trunk/jaxme/jaxme/ant/jm.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/ant/jm.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -207,8 +207,7 @@
<runtests reportsdir="${build.jm.reports}" classpathref="jaxme.junit.path">
<tests>
<fileset dir="${src.jm}"
- includes="org/apache/ws/jaxme/junit/**/*Test.java"
- excludes="org/apache/ws/jaxme/junit/MarshallerTest.java"/>
+ includes="org/apache/ws/jaxme/junit/**/*Test.java"/>
</tests>
</runtests>
</target>
Modified: trunk/jaxme/jaxme/ant/js.xml
===================================================================
--- trunk/jaxme/jaxme/ant/js.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/ant/js.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -17,6 +17,7 @@
-->
<project name="JS" default="all">
<import file="clover.xml"/>
+ <import file="api.xml"/>
<property name="build.js" location="${build}/js"/>
<property name="build.js.src" location="${build.js}/src"/>
@@ -38,6 +39,7 @@
<pathelement location="${preqs}/ant.jar"/>
<pathelement location="${preqs}/junit.jar"/>
<pathelement location="${preqs}/antlr.jar"/>
+ <pathelement location="${dist}/jaxmeapi-${version}.jar"/>
</path>
<path id="js.test.path">
@@ -54,16 +56,17 @@
<target name="dirs">
<mkdir dir="${build.js.classes}"/>
<mkdir dir="${build.js.src}"/>
- <mkdir dir="${build.js.src}/org/apache/ws/jaxme/js/jparser"/>
<mkdir dir="${build.js.test.classes}"/>
</target>
<target name="JS.antlr" depends="dirs">
- <antlr
- outputdirectory="${build.js.src}/org/apache/ws/jaxme/js/jparser"
- target="${src.js}/org/apache/ws/jaxme/js/jparser/java15.g">
- <classpath refid="js.class.path"/>
- </antlr>
+ <java classname="antlr.Tool" failonerror="true">
+ <classpath>
+ <pathelement location="/usr/share/java/antlr.jar"/>
+ </classpath>
+ <arg line="-o ${build.js.src}/org/apache/ws/jaxme/js/jparser"/>
+ <arg file="${src.js}/org/apache/ws/jaxme/js/jparser/java15.g"/>
+ </java>
</target>
<target name="JS.compile" depends="JS.antlr,init">
@@ -124,7 +127,8 @@
url="${jdbc.url}"
userid="${jdbc.user}"
password="${jdbc.password}"
- classpathref="js.test.path"/>
+ classpathref="js.test.path"
+ autocommit="true"/>
</target>
<target name="JS.generate.version" depends="JS.generate.db">
@@ -162,7 +166,7 @@
</javac>
</target>
- <target name="JS.generate" depends="JS.generate.compile"/>
+ <target name="JS.generate" depends="API.all,JS.generate.compile"/>
<target name="all" depends="JS.generate"/>
Modified: trunk/jaxme/jaxme/build.xml
===================================================================
--- trunk/jaxme/jaxme/build.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/build.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -14,7 +14,7 @@
* limitations under the License.
-->
<project name="JaxMe" default="all">
- <property name="version" value="0.5.1"/>
+ <property name="version" value="0.5.2"/>
<property name="debug" value="true"/>
<property name="optimize" value="false"/>
@@ -79,10 +79,18 @@
<param name="build.online.site" value="true"/>
</antcall>
<delete>
- <fileset dir="${ws.site.dir}" excludes="**/CVS/*.*"/>
+ <fileset dir="${ws.site.dir}">
+ <exclude name="**/CVS/*.*"/>
+ <exclude name="mp/**/*"/>
+ <exclude name="release-0.3/**/*"/>
+ <exclude name="release-0.4/**/*"/>
+ </fileset>
</delete>
- <copy todir="${ws.site.dir}">
- <fileset dir="${build.site}"/>
+ <copy todir="${ws.site.dir}" preservelastmodified="true">
+ <fileset dir="${build.site}">
+ <exclude name="release-0.3/**/*"/>
+ <exclude name="release-0.4/**/*"/>
+ </fileset>
</copy>
</target>
</project>
Property changes on: trunk/jaxme/jaxme/debian
___________________________________________________________________
Name: svn:ignore
+ files
libjaxme-java
*.debhelper
Modified: trunk/jaxme/jaxme/debian/changelog
===================================================================
--- trunk/jaxme/jaxme/debian/changelog 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/debian/changelog 2007-07-21 08:19:31 UTC (rev 3898)
@@ -1,3 +1,10 @@
+jaxme (0.5.2+dfsg-1) unstable; urgency=low
+
+ * New upstream release. Closes: #429523.
+ * Added myself to Uploaders.
+
+ -- Michael Koch <konqueror at gmx.de> Mon, 16 Jul 2007 19:24:29 +0200
+
jaxme (0.5.1+dfsg-1) unstable; urgency=low
* Initial release. (Closes: #296117)
Modified: trunk/jaxme/jaxme/debian/control
===================================================================
--- trunk/jaxme/jaxme/debian/control 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/debian/control 2007-07-21 08:19:31 UTC (rev 3898)
@@ -2,7 +2,7 @@
Section: libs
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Marcus Better <marcus at better.se>
+Uploaders: Marcus Better <marcus at better.se>, Michael Koch <konqueror at gmx.de>
Build-Depends: debhelper (>= 5.0.0), ant, ant-optional
Build-Depends-Indep: antlr, java-gcj-compat-dev, junit, liblog4j1.2-java, libxerces2-java, libxalan2-java, libcommons-codec-java, libhsqldb-java
Standards-Version: 3.7.2
@@ -10,7 +10,7 @@
Package: libjaxme-java
Section: libs
Architecture: all
-Depends: kaffe | java1-runtime | java2-runtime, liblog4j1.2-java, libcommons-codec-java
+Depends: java-gcj-compat | java1-runtime | java2-runtime, liblog4j1.2-java, libcommons-codec-java
Suggests: java-virtual-machine
Description: implementation of the JAXB specification for Java/XML binding
A Java/XML binding compiler takes as input a schema description. The output
Modified: trunk/jaxme/jaxme/debian/rules
===================================================================
--- trunk/jaxme/jaxme/debian/rules 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/debian/rules 2007-07-21 08:19:31 UTC (rev 3898)
@@ -6,7 +6,7 @@
DEB_JARS_BASE := /usr/share/java
JAVACMD := $(JAVA_HOME)/bin/java
-DEB_JARS := ant ant-launcher ant-junit ant-antlr junit xalan2
+DEB_JARS := ant ant-launcher ant-junit ant-antlr junit xalan2 antlr
DEB_CLASSPATH = $(shell for jar in $(DEB_JARS); do \
if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; \
Added: trunk/jaxme/jaxme/etc/maven2/jaxme2-rt.pom
===================================================================
--- trunk/jaxme/jaxme/etc/maven2/jaxme2-rt.pom (rev 0)
+++ trunk/jaxme/jaxme/etc/maven2/jaxme2-rt.pom 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxme2-rt</artifactId>
+ <name>JaxMe 2 Runtime</name>
+ <version>0.5.2-SNAPSHOT</version>
+ <url>http://ws.apache.org/jaxme</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <repositories>
+ <repository>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ </repository>
+ </repositories>
+ <distributionManagement>
+ <repository>
+ <id>apache-maven</id>
+ <name>Apache Maven Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+ </repository>
+ <snapshotRepository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
+ </snapshotRepository>
+ </distributionManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmeapi</artifactId>
+ <version>0.5.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmexs</artifactId>
+ <version>0.5.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmejs</artifactId>
+ <version>0.5.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Added: trunk/jaxme/jaxme/etc/maven2/jaxme2.pom
===================================================================
--- trunk/jaxme/jaxme/etc/maven2/jaxme2.pom (rev 0)
+++ trunk/jaxme/jaxme/etc/maven2/jaxme2.pom 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxme2</artifactId>
+ <name>JaxMe 2</name>
+ <version>0.5.2-SNAPSHOT</version>
+ <url>http://ws.apache.org/jaxme</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmeapi</artifactId>
+ <version>0.5.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmexs</artifactId>
+ <version>0.5.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmejs</artifactId>
+ <version>0.5.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ </repository>
+ </repositories>
+ <distributionManagement>
+ <repository>
+ <id>apache-maven</id>
+ <name>Apache Maven Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+ </repository>
+ <snapshotRepository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
Added: trunk/jaxme/jaxme/etc/maven2/jaxmeapi.pom
===================================================================
--- trunk/jaxme/jaxme/etc/maven2/jaxmeapi.pom (rev 0)
+++ trunk/jaxme/jaxme/etc/maven2/jaxmeapi.pom 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmeapi</artifactId>
+ <name>JaxMe API</name>
+ <version>0.5.2-SNAPSHOT</version>
+ <url>http://ws.apache.org/jaxme</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <repositories>
+ <repository>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ </repository>
+ </repositories>
+ <distributionManagement>
+ <repository>
+ <id>apache-maven</id>
+ <name>Apache Maven Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+ </repository>
+ <snapshotRepository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
Added: trunk/jaxme/jaxme/etc/maven2/jaxmejs.pom
===================================================================
--- trunk/jaxme/jaxme/etc/maven2/jaxmejs.pom (rev 0)
+++ trunk/jaxme/jaxme/etc/maven2/jaxmejs.pom 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmejs</artifactId>
+ <name>JaxMe Java Source framework</name>
+ <version>0.5.2-SNAPSHOT</version>
+ <url>http://ws.apache.org/jaxme</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <repositories>
+ <repository>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ </repository>
+ </repositories>
+ <distributionManagement>
+ <repository>
+ <id>apache-maven</id>
+ <name>Apache Maven Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+ </repository>
+ <snapshotRepository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
Added: trunk/jaxme/jaxme/etc/maven2/jaxmepm.pom
===================================================================
--- trunk/jaxme/jaxme/etc/maven2/jaxmepm.pom (rev 0)
+++ trunk/jaxme/jaxme/etc/maven2/jaxmepm.pom 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmepm</artifactId>
+ <name>JaxMe Persistence Management</name>
+ <version>0.5.2-SNAPSHOT</version>
+ <url>http://ws.apache.org/jaxme</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxme2</artifactId>
+ <version>0.5.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ </repository>
+ </repositories>
+ <distributionManagement>
+ <repository>
+ <id>apache-maven</id>
+ <name>Apache Maven Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+ </repository>
+ <snapshotRepository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
Added: trunk/jaxme/jaxme/etc/maven2/jaxmexs.pom
===================================================================
--- trunk/jaxme/jaxme/etc/maven2/jaxmexs.pom (rev 0)
+++ trunk/jaxme/jaxme/etc/maven2/jaxmexs.pom 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ws.jaxme</groupId>
+ <artifactId>jaxmexs</artifactId>
+ <name>JaxMe parser for XML Schema</name>
+ <version>0.5.2-SNAPSHOT</version>
+ <url>http://ws.apache.org/jaxme</url>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <repositories>
+ <repository>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ </repository>
+ </repositories>
+ <distributionManagement>
+ <repository>
+ <id>apache-maven</id>
+ <name>Apache Maven Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+ </repository>
+ <snapshotRepository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>apache-maven-snapshots</id>
+ <name>Apache Maven Snapshot Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
Modified: trunk/jaxme/jaxme/prerequisites/LICENSE-DOM.html
===================================================================
--- trunk/jaxme/jaxme/prerequisites/LICENSE-DOM.html 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/prerequisites/LICENSE-DOM.html 2007-07-21 08:19:31 UTC (rev 3898)
@@ -1,4 +1,4 @@
-<!-- $Id: LICENSE-DOM.html 231575 2003-10-08 08:43:39Z jochen $ -->
+<!-- $Id: LICENSE-DOM.html 231575 2003-10-08 10:43:39 +0200 (Wed, 08 Oct 2003) jochen $ -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
Modified: trunk/jaxme/jaxme/prerequisites/LICENSE-tomcat.txt
===================================================================
--- trunk/jaxme/jaxme/prerequisites/LICENSE-tomcat.txt 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/prerequisites/LICENSE-tomcat.txt 2007-07-21 08:19:31 UTC (rev 3898)
@@ -55,7 +55,7 @@
* *
* ========================================================================= */
-/* CVS information: $Revision: 231694 $ $Date: 2003-12-27 23:09:02 +0100 (Sa, 27 Dez 2003) $
+/* CVS information: $Revision: 231694 $ $Date: 2003-12-27 23:09:02 +0100 (Sat, 27 Dec 2003) $
* $Source$
* $Author: jochen $
*/
Modified: trunk/jaxme/jaxme/prerequisites/README
===================================================================
--- trunk/jaxme/jaxme/prerequisites/README 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/prerequisites/README 2007-07-21 08:19:31 UTC (rev 3898)
@@ -4,8 +4,15 @@
Files required at run time and build time:
-xml-apis.jar This is the Xerces XML Parser, as distributed with
-xercesImpl.jar Xerces 2.6.2. At runtime, you may replace this XML
+xml-apis-1.3.02.jar This is the JAXP API 1.3.02, as distributed with
+ Java 5. In other words, you do not need this, unless
+ you are using Java 1.4 or lower. Even more, in general
+ JAXP 1.1 (as distributed with JDK 1.4) is completely
+ sufficient. As of this writing, the only exception
+ is the use of external binding files with JaxMe.
+
+xercesImpl.jar This is the Xerces XML Parser, as distributed with
+ Xerces 2.6.2. At runtime, you may replace this XML
parser with any JAXP 1.2 compliant XML Parser. At
built time, you may choose to use another XML Parser
as well, however, you need to adjust the build scripts
Modified: trunk/jaxme/jaxme/src/documentation/content/xdocs/downloads.ehtml
===================================================================
--- trunk/jaxme/jaxme/src/documentation/content/xdocs/downloads.ehtml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/documentation/content/xdocs/downloads.ehtml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -90,8 +90,8 @@
Please check the MD5 sums for any releases you download from the mirrors:
</p>
<ul>
- <li>ws-jaxme-0.5-bin.tar.gz: <strong>d9e3151576fee5fc4f8af907a71f9096</strong></li>
- <li>ws-jaxme-0.5-src.tar.gz: <strong>59991a2ecdfada900ad836f9cc581a1e</strong></li>
+ <li>ws-jaxme-0.5.1-bin.tar.gz: <strong>cc571bbf47d261fb7b8ae3d5d22f70d8</strong></li>
+ <li>ws-jaxme-0.5.1-src.tar.gz: <strong>673db466c6ccc9e6fb6616d0404de6d6</strong></li>
</ul>
</body>
</html>
Modified: trunk/jaxme/jaxme/src/documentation/content/xdocs/news.xml
===================================================================
--- trunk/jaxme/jaxme/src/documentation/content/xdocs/news.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/documentation/content/xdocs/news.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -23,6 +23,8 @@
</header>
<body>
<dl>
+ <dt>2006-Oct-24: JaxMe 0.5.2 released</dt>
+ <dd>Bug fix release, mainly dedicated to composition of multiple schemas</dd>
<dt>2006-Jan-06: JaxMe 0.5.1 released</dt>
<dd>Patch release, adding preliminary support for external binding files.</dd>
<dt>2005-Aug-09: JaxMe 0.5 released</dt>
Modified: trunk/jaxme/jaxme/src/documentation/content/xdocs/release.xml
===================================================================
--- trunk/jaxme/jaxme/src/documentation/content/xdocs/release.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/documentation/content/xdocs/release.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -80,7 +80,7 @@
<li>Build a new version of the online site. See the separate section
below.</li>
<li>Wait one day, until the Apache mirrors are in sync.</li>
- <li>Update the files mirrors.ehtml and news.xml in the directory
+ <li>Update the file news.xml in the directory
src/documentation/content/xdocs of the ws-site repository.</li>
<li>Announce the new release on <link href="ext:freshmeat">FreshMeat</link>.
There are three projects that might need notifications: JaxMe, JaxMeJS, and
Modified: trunk/jaxme/jaxme/src/documentation/manual/xjctask.xml
===================================================================
--- trunk/jaxme/jaxme/src/documentation/manual/xjctask.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/documentation/manual/xjctask.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -296,7 +296,17 @@
(a subclass of JAXBSchemaReader with JaxMe specific extensions).</entry>
<entry>JaxMe</entry>
<entry>0..1</entry>
- </row>
+ </row>
+ <row>
+ <entry>xmlCatalog</entry>
+ <entry>Adds an XML catalog, which is being used to resolve
+ external entities and URI's. See the
+ <ulink url="http://ant.apache.org/manual/CoreTypes/xmlcatalog.html">
+ Ant documentation</ulink> for details on XML catalogs.
+ </entry>
+ <entry>JaxMe</entry>
+ <entry>0..Unbounded</entry>
+ </row>
</tbody>
</tgroup>
</table>
Deleted: trunk/jaxme/jaxme/src/documentation/release-0.3.tar.bz2
===================================================================
(Binary files differ)
Deleted: trunk/jaxme/jaxme/src/documentation/release-0.4.tar.bz2
===================================================================
(Binary files differ)
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMMarshaller.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMMarshaller.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMMarshaller.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -25,7 +25,7 @@
/** <p>JaxMe's private extension of a JAXB Marshaller.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JMMarshaller.java 231785 2004-02-17 00:39:59 +0100 (Di, 17 Feb 2004) jochen $
+ * @version $Id: JMMarshaller.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JMMarshaller extends Marshaller {
/** <p>Sets the JAXBContext that created this marshaller.</p>
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMPI.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMPI.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMPI.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -19,7 +19,7 @@
/** <p>The JaxMe variant of a processing instruction.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JMPI.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JMPI.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JMPI {
/** <p>Returns the PI's target.</p>
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMUnmarshaller.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMUnmarshaller.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMUnmarshaller.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -25,7 +25,7 @@
/** <p>JaxMe's private extension of a JAXB Unmarshaller.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JMUnmarshaller.java 231785 2004-02-17 00:39:59 +0100 (Di, 17 Feb 2004) jochen $
+ * @version $Id: JMUnmarshaller.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JMUnmarshaller extends Unmarshaller {
/** <p>Sets the JAXBContext that created this unmarshaller.</p>
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMValidator.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMValidator.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/JMValidator.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -24,7 +24,7 @@
/** <p>JaxMe's private extension of a JAXB Validator.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JMValidator.java 231785 2004-02-17 00:39:59 +0100 (Di, 17 Feb 2004) jochen $
+ * @version $Id: JMValidator.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JMValidator extends Validator {
/** <p>Sets the JAXBContext that created this validator.</p>
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observable.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observable.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observable.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -24,7 +24,7 @@
* observers <code>setObservableState()</code> method.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: Observable.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: Observable.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface Observable {
/** <p>Sets the Observer.</p>
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observer.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observer.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/Observer.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -23,7 +23,7 @@
* Observers <code>setObservableState()</code> method.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: Observer.java 231881 2004-07-23 07:18:09Z jochen $
+ * @version $Id: Observer.java 231881 2004-07-23 09:18:09 +0200 (Fri, 23 Jul 2004) jochen $
*/
public interface Observer {
/** <p>The Observable indicates that its state has
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/ValidationEvents.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/ValidationEvents.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/ValidationEvents.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -19,7 +19,7 @@
/** <p>List of error codes, being used in validation events.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: ValidationEvents.java 232063 2005-03-04 10:41:53Z jochen $
+ * @version $Id: ValidationEvents.java 232063 2005-03-04 11:41:53 +0100 (Fri, 04 Mar 2005) jochen $
*/
public interface ValidationEvents {
/** More than one alternative in a choice group have
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/examples/misc/address/AddressPrinter.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/examples/misc/address/AddressPrinter.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/examples/misc/address/AddressPrinter.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: AddressPrinter.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: AddressPrinter.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class AddressPrinter {
public static Address getAddress(InputSource pSource) throws JAXBException {
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/Generator.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/Generator.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/Generator.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -71,7 +71,7 @@
* </ul></p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: Generator.java 358956 2005-12-25 01:43:38 +0100 (So, 25 Dez 2005) jochen $
+ * @version $Id: Generator.java 358956 2005-12-25 01:43:38 +0100 (Sun, 25 Dec 2005) jochen $
*/
public interface Generator extends PropertySource {
/** <p>Sets the SchemaReader to use.</p>
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/SchemaException.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/SchemaException.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/SchemaException.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -21,7 +21,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: SchemaException.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: SchemaException.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class SchemaException extends Exception {
private Throwable inner;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/XJCTask.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/XJCTask.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/XJCTask.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -46,6 +46,7 @@
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.XMLCatalog;
import org.xml.sax.InputSource;
import org.xml.sax.SAXParseException;
@@ -239,6 +240,14 @@
* JDBC metadata.</td>
* <td>0 - Unbounded</td>
* </tr>
+ * <tr>
+ * <td>xmlCatalog</td>
+ * <td>Adds an XML catalog to our internal catalog, which is used
+ * to resolve external entities and URI's. See the
+ * <a href="http://ant.apache.org/manual/CoreTypes/xmlcatalog.html">
+ * Ant documentation</a> for details on XML catalogs.</td>
+ * <td>0 - Unbounded</td>
+ * </tr>
* </table>
* <p>By default, the JaxMe ant task will always run the generator and create new files. This
* is typically inappropriate for an ant script where your desire is to have as little
@@ -335,6 +344,7 @@
private ClassType schemaReader;
private List properties = new ArrayList();
private Dtd dtd;
+ private final XMLCatalog xmlCatalog = new XMLCatalog();
/** <p>Sets a property value. These properties may be used by the various source
* generators to configure the behaviour. For example, the JDBC schema reader uses
@@ -938,6 +948,23 @@
return null;
}
+ /**
+ * Initialize internal instance of XMLCatalog
+ */
+ public void init() {
+ super.init();
+ xmlCatalog.setProject(getProject());
+ }
+
+ /** Adds an XML catalog to our internal catalog. See the
+ * <a href="http://ant.apache.org/manual/CoreTypes/xmlcatalog.html">
+ * Ant documentation</a> for details on XML catalogs.
+ * @param xmlCatalog the XMLCatalog instance to use to look up DTDs
+ */
+ public void addConfiguredXMLCatalog(XMLCatalog pXmlCatalog) {
+ xmlCatalog.addConfiguredXMLCatalog(pXmlCatalog);
+ }
+
public void execute() {
java.lang.ClassLoader parent = Thread.currentThread().getContextClassLoader();
MyClassLoader cl = new MyClassLoader(parent == null ? getClass().getClassLoader() : parent);
@@ -969,6 +996,7 @@
Generator generator = new GeneratorImpl();
+ generator.setEntityResolver(xmlCatalog);
generator.setForcingOverwrite(isForce());
generator.setSettingReadOnly(isReadOnly());
generator.setValidating(isValidating());
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/impl/Inliner.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/impl/Inliner.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/impl/Inliner.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -15,25 +15,33 @@
*/
package org.apache.ws.jaxme.generator.impl;
+import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import javax.xml.parsers.DocumentBuilder;
+import javax.xml.XMLConstants;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
+import org.apache.ws.jaxme.util.DOMBuilder;
import org.apache.ws.jaxme.util.DOMSerializer;
import org.apache.ws.jaxme.xs.SchemaTransformer;
import org.apache.ws.jaxme.xs.XSParser;
import org.apache.ws.jaxme.xs.jaxb.impl.JAXBParser;
+import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
@@ -44,17 +52,11 @@
/** Performs the modifications on an XML schema file, as
* specified by an external binding file. This is based
- * on a suggestion from Ortwin Glück, see
+ * on a suggestion from Ortwin Glueck, see
* <a href="http://wiki.apache.org/ws/JaxMe/ExternalSchemaBindings">
* http://wiki.apache.org/ws/JaxMe/ExternalSchemaBindings</a>.
*/
public class Inliner implements SchemaTransformer {
- private static final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- static {
- dbf.setNamespaceAware(true);
- dbf.setValidating(false);
- }
-
private final Document[] bindings;
private XMLReader transformedXMLReader;
private InputSource transformedInputSource;
@@ -67,52 +69,189 @@
private Document read(InputSource pSource, XMLReader pReader)
throws SAXException, ParserConfigurationException, IOException {
- DocumentBuilder db = dbf.newDocumentBuilder();
- db.setEntityResolver(pReader.getEntityResolver());
- db.setErrorHandler(pReader.getErrorHandler());
- return db.parse(pSource);
+ SAXParserFactory spf = SAXParserFactory.newInstance();
+ spf.setNamespaceAware(true);
+ spf.setValidating(false);
+ XMLReader xr = spf.newSAXParser().getXMLReader();
+ xr.setEntityResolver(pReader.getEntityResolver());
+ xr.setErrorHandler(pReader.getErrorHandler());
+ DOMBuilder db = new DOMBuilder();
+ db.setPrefixMappingIsAttribute(true);
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setValidating(false);
+ dbf.setNamespaceAware(true);
+ Document doc = dbf.newDocumentBuilder().newDocument();
+ db.setDocument(doc);
+ db.setTarget(doc);
+ xr.setContentHandler(db);
+ xr.parse(pSource);
+ return doc;
}
- private void apply(Document pSchema, Document pBindings, String pURI) throws XPathExpressionException {
- for (Iterator iter = getBindingElements(pBindings, pURI); iter.hasNext(); ) {
- Element e = (Element) iter.next();
- String xpathQuery = e.getAttribute("node");
- XPathFactory xpathFactory = XPathFactory.newInstance();
- XPath xpath = xpathFactory.newXPath();
- NodeList nodes = (NodeList) xpath.evaluate(xpathQuery, e, XPathConstants.NODESET);
- for (int i = 0; i < nodes.getLength(); i++) {
- Node node = nodes.item(i);
- if (node.getNodeType() != Node.ELEMENT_NODE) {
- continue;
+ private boolean isURIMatching(String pURI, Element pBindings) {
+ final Attr schemaLocationAttr = pBindings.getAttributeNodeNS(null, "schemaLocation");
+ if (schemaLocationAttr == null) {
+ return true;
+ }
+ String value = schemaLocationAttr.getValue();
+ if (value.equals(pURI)) {
+ return true;
+ }
+ /* I'd prefer not to use the following. However, fact is that we do see the operating
+ * systems absolute path or a path relative to a projects base directory or stuff like
+ * that in most cases and not the URI, which the user specifies in its project.
+ */
+ if (pURI == null) {
+ return false;
+ }
+ if (pURI.endsWith("/" + value)) {
+ return true;
+ }
+ if (!File.separator.equals("/") && pURI.endsWith(File.separator + value)) {
+ return true;
+ }
+ return false;
+ }
+
+ private void apply(final Node pTarget, Element pBindings, String pURI)
+ throws XPathExpressionException, SAXException {
+ final Attr nodeAttr = pBindings.getAttributeNodeNS(null, "node");
+ if (!isURIMatching(pURI, pBindings)) {
+ return;
+ }
+ if (nodeAttr == null) {
+ importChilds(pTarget, pBindings, pURI);
+ } else {
+ final XPath xpath = XPathFactory.newInstance().newXPath();
+ NamespaceContext ctx = new NamespaceContext(){
+ public Iterator getPrefixes(String pURI) {
+ if (pURI == null) {
+ throw new IllegalArgumentException("The URI must not be null.");
+ }
+ if (XMLConstants.XML_NS_URI.equals(pURI)) {
+ return Collections.singletonList(XMLConstants.XML_NS_PREFIX).iterator();
+ }
+ if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(pURI)) {
+ return Collections.singletonList(XMLConstants.XMLNS_ATTRIBUTE).iterator();
+ }
+ List list = getPrefixDeclarations(pTarget);
+ List result = new ArrayList();
+ for (int i = 0; i < list.size(); i += 2) {
+ if (pURI.equals(list.get(i+1))) {
+ String prefix = (String) list.get(i);
+ if (!result.contains(prefix)) {
+ result.add(prefix);
+ }
+ }
+ }
+ return result.iterator();
}
- Element match = (Element) node;
- if (!XSParser.XML_SCHEMA_URI.equals(match.getNamespaceURI())) {
- continue;
+ public String getPrefix(String pURI) {
+ String result = null;
+ Iterator iter = getPrefixes(pURI);
+ if (iter.hasNext()) {
+ result = (String) iter.next();
+ } else {
+ if ("".equals(pURI)) {
+ result = XMLConstants.DEFAULT_NS_PREFIX;
+ }
+ }
+ return result;
}
- String prefix = match.getPrefix();
- Element annotationElement = getChild(match, prefix, "annotation");
- Element appInfoElement = getChild(annotationElement, prefix, "appInfo");
- for (Node child = e.getFirstChild(); child != null; child = child.getNextSibling()) {
- appInfoElement.appendChild(pSchema.importNode(child, true));
+ public String getNamespaceURI(String pPrefix) {
+ if (pPrefix == null) {
+ throw new IllegalArgumentException("The prefix must not be null.");
+ }
+ String result = null;
+ if (XMLConstants.XML_NS_PREFIX.equals(pPrefix)) {
+ result = XMLConstants.XML_NS_URI;
+ } else if (XMLConstants.XMLNS_ATTRIBUTE.equals(pPrefix)) {
+ result = XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
+ } else {
+ List list = getPrefixDeclarations(pTarget);
+ for (int i = 0; i < list.size(); i += 2) {
+ if (pPrefix.equals(list.get(i))) {
+ result = (String) list.get(i+1);
+ break;
+ }
+ }
+ if (result == null && pPrefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
+ result = "";
+ }
+ }
+ return result;
}
+ private List getPrefixDeclarations(Node pTarget) {
+ List list = new ArrayList();
+ addPrefixDeclarations(pTarget, list);
+ return list;
+ }
+ private void addPrefixDeclarations(Node pNode, List pList) {
+ if (pNode == null) {
+ return;
+ }
+ if (pNode.getNodeType() == Node.ELEMENT_NODE) {
+ Element e = (Element) pNode;
+ if (e.getNamespaceURI() == null || "".equals(e.getNamespaceURI())) {
+ pList.add(XMLConstants.DEFAULT_NS_PREFIX);
+ pList.add(e.getPrefix());
+ } else {
+ pList.add(e.getPrefix());
+ pList.add(e.getNamespaceURI());
+ }
+ NamedNodeMap attrs = e.getAttributes();
+ for (int i = 0; i < attrs.getLength(); i++) {
+ Attr attr = (Attr) attrs.item(i);
+ if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(attr.getNamespaceURI())) {
+ pList.add(attr.getPrefix());
+ pList.add(attr.getValue());
+ } else if (null == attr.getNamespaceURI() && XMLConstants.XMLNS_ATTRIBUTE.equals(attr.getLocalName())) {
+ pList.add(attr.getLocalName());
+ pList.add(attr.getValue());
+ }
+ }
+ }
+ addPrefixDeclarations(pNode.getParentNode(), pList);
+ }
+ };
+ xpath.setNamespaceContext(ctx);
+ final NodeList nodes = (NodeList) xpath.evaluate(nodeAttr.getValue(), pTarget, XPathConstants.NODESET);
+ for (int i = 0; i < nodes.getLength(); i++) {
+ final Node node = nodes.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE
+ && XSParser.XML_SCHEMA_URI.equals(node.getNamespaceURI())) {
+ importChilds(node, pBindings, pURI);
+ }
}
}
}
- private Iterator getBindingElements(Document pBindings, String pURI) {
- Element root = pBindings.getDocumentElement();
- List result = new ArrayList();
- for (Node child = root.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- Element e = (Element) child;
- if (JAXBParser.JAXB_SCHEMA_URI.equals(e.getNamespaceURI()) &&
- "bindings".equals(e.getLocalName()) &&
- pURI.equals(e.getAttribute("schemaLocation"))) {
- result.add(e);
+ private void importChilds(Node pTarget, Node pSource, String pURI)
+ throws XPathExpressionException, SAXException {
+ final Document doc = pTarget.getOwnerDocument();
+ Element appInfoElement = null;
+ for (Node child = pSource.getFirstChild(); child != null; child = child.getNextSibling()) {
+ if (child.getNodeType() != Node.ELEMENT_NODE) {
+ continue;
+ }
+ Element e = (Element) child;
+ if (JAXBParser.JAXB_SCHEMA_URI.equals(e.getNamespaceURI())
+ && "bindings".equals(e.getLocalName())) {
+ apply(pTarget, e, pURI);
+ } else {
+ if (appInfoElement == null) {
+ if (pTarget.getNodeType() != Node.ELEMENT_NODE) {
+ throw new SAXException("Attempt to import childs into a node of type " +
+ pTarget.getNodeType() + ", perhaps invalid XPath expression?");
+ }
+ Element targetElement = (Element) pTarget;
+ final String prefix = pTarget.getPrefix();
+ Element annotationElement = getChild(targetElement, prefix, "annotation");
+ appInfoElement = getChild(annotationElement, prefix, "appinfo");
}
+ appInfoElement.appendChild(doc.importNode(e, true));
}
}
- return result.iterator();
}
private Element getChild(Element pParent, String pPrefix, String pName) {
@@ -132,16 +271,22 @@
}
public void parse(InputSource pSource, XMLReader pReader) throws ParserConfigurationException, SAXException, IOException {
+ final String uri = pSource.getSystemId();
final Document schema = read(pSource, pReader);
- String uri = pSource.getSystemId();
- if (uri != null) {
- try {
- for (int i = 0; i < bindings.length; i++) {
- apply(schema, bindings[i], uri);
+ try {
+ for (int i = 0; i < bindings.length; i++) {
+ Element bindingsElement = bindings[i].getDocumentElement();
+ if (!JAXBParser.JAXB_SCHEMA_URI.equals(bindingsElement.getNamespaceURI())
+ || !"bindings".equals(bindingsElement.getLocalName())) {
+ throw new SAXException("Expected " +
+ new QName(JAXBParser.JAXB_SCHEMA_URI, "bindings") +
+ " as a binding files root element, got " +
+ new QName(bindingsElement.getNamespaceURI(), bindingsElement.getLocalName()));
}
- } catch (XPathExpressionException e) {
- throw new SAXException(e);
+ apply(schema.getDocumentElement(), bindingsElement, uri);
}
+ } catch (XPathExpressionException e) {
+ throw new SAXException(e);
}
transformedInputSource = new InputSource();
transformedXMLReader = new XMLFilterImpl(){
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/Context.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/Context.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/Context.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -1,5 +1,5 @@
/*
- * Copyright 2003, 2004 The Apache Software Foundation
+ * Copyright 2003-2006 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,14 +17,19 @@
package org.apache.ws.jaxme.generator.sg;
import org.apache.ws.jaxme.js.JavaQName;
+import org.apache.ws.jaxme.xs.xml.XsQName;
/** <p>A common base interface for items that may enclose a local
* type. This is used to construct inner class names.</p>
- *
- * @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
*/
public interface Context {
+ /**
+ * Returns the qualified name, from which Java class names
+ * have been derived.
+ */
+ public XsQName getName();
+
/** <p>Returns the contexts XML interface name.</p>
*/
public JavaQName getXMLInterfaceName();
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/GroupSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/GroupSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/GroupSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -15,12 +15,8 @@
*/
package org.apache.ws.jaxme.generator.sg;
-import org.apache.ws.jaxme.js.JavaSource;
import org.apache.ws.jaxme.xs.XSParticle;
import org.apache.ws.jaxme.xs.xml.XsQName;
-import org.apache.ws.jaxme.generator.sg.Context;
-import org.apache.ws.jaxme.generator.sg.ParticleSG;
-import org.apache.ws.jaxme.generator.sg.SGItem;
import org.xml.sax.SAXException;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/SGFactory.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/SGFactory.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/SGFactory.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -25,6 +25,7 @@
import org.apache.ws.jaxme.xs.XSParser;
import org.apache.ws.jaxme.xs.XSSchema;
import org.apache.ws.jaxme.xs.XSType;
+import org.apache.ws.jaxme.xs.jaxb.JAXBProperty;
import org.apache.ws.jaxme.xs.xml.XsObjectFactory;
import org.apache.ws.jaxme.xs.xml.XsQName;
import org.apache.ws.jaxme.generator.sg.Context;
@@ -136,12 +137,12 @@
* {@link org.apache.ws.jaxme.generator.sg.TypeSGChain}
* interface.</p>
*/
- public Object newTypeSG(XSType pType) throws SAXException;
+ public Object newTypeSG(XSType pType, JAXBProperty.BaseType pBaseType) throws SAXException;
/** <p>Returns a global instance of {@link TypeSG} generating
* the given type.</p>
*/
- public TypeSG getTypeSG(XSType pType) throws SAXException;
+ public TypeSG getTypeSG(XSType pType, JAXBProperty.BaseType pBaseType) throws SAXException;
/** <p>Creates a new, local instance of
* {@link org.apache.ws.jaxme.generator.sg.TypeSGChain},
@@ -154,12 +155,12 @@
* {@link org.apache.ws.jaxme.generator.sg.TypeSGChain}
* interface.</p>
*/
- public Object newTypeSG(XSType pType, Context pClassContext, XsQName pName) throws SAXException;
+ public Object newTypeSG(XSType pType, Context pClassContext, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException;
/** <p>Returns a local instance of {@link TypeSG} generating
* the given type within the given {@link Context}.</p>
*/
- public TypeSG getTypeSG(XSType pType, Context pClassContext, XsQName pName) throws SAXException;
+ public TypeSG getTypeSG(XSType pType, Context pClassContext, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException;
/** <p>Creates a new, local instance of
* {@link org.apache.ws.jaxme.generator.sg.TypeSGChain},
@@ -172,13 +173,13 @@
* {@link org.apache.ws.jaxme.generator.sg.TypeSGChain}
* interface.</p>
*/
- public Object newTypeSG(XSType pType, XsQName pName) throws SAXException;
+ public Object newTypeSG(XSType pType, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException;
/** <p>Returns a new instance of {@link TypeSG} generating
* the given type, as if it were a global type with the
* given name.</p>
*/
- public TypeSG getTypeSG(XSType pType, XsQName pName) throws SAXException;
+ public TypeSG getTypeSG(XSType pType, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException;
/** <p>Creates a new instance of {@link XSParser}.</p>
*/
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/GlobalContext.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/GlobalContext.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/GlobalContext.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -52,7 +52,6 @@
if (pQName == null) {
throw new NullPointerException("The XsQName argument must not be null.");
}
- setName(pQName);
if (pJAXBClassOwner == null) {
throw new NullPointerException("The XSObject argument must not be null.");
}
@@ -71,7 +70,11 @@
if (jaxbClass != null) {
className = jaxbClass.getName();
implementationName = jaxbClass.getImplClass();
+ if (className != null) {
+ pQName = new XsQName(pQName.getNamespaceURI(), className);
+ }
}
+ setName(pQName);
if (className == null) {
String prefix = null, suffix = null;
@@ -81,9 +84,6 @@
if (suffix == null) { suffix = pSuffix; }
if (suffix != null) className += suffix;
}
- if (className.equals("EmailDetailsType")) {
- throw new IllegalStateException();
- }
JavaQName xmlInterfaceName = JavaQNameImpl.getInstance(packageName, className);
setXMLInterfaceName(xmlInterfaceName);
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBAttributeSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBAttributeSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBAttributeSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -30,6 +30,8 @@
import org.apache.ws.jaxme.xs.XSAttribute;
import org.apache.ws.jaxme.xs.XSType;
import org.apache.ws.jaxme.xs.XSWildcard;
+import org.apache.ws.jaxme.xs.jaxb.JAXBProperty;
+import org.apache.ws.jaxme.xs.jaxb.JAXBPropertyOwner;
import org.apache.ws.jaxme.xs.xml.XsNamespaceList;
import org.apache.ws.jaxme.xs.xml.XsQName;
import org.apache.ws.jaxme.xs.xml.XsTWildcard;
@@ -62,13 +64,22 @@
if (type == null) {
throw new IllegalStateException("The attribute type must not be null.");
}
+
+ final JAXBProperty.BaseType baseType;
+ if (pAttribute instanceof JAXBPropertyOwner) {
+ JAXBProperty property = ((JAXBPropertyOwner) pAttribute).getJAXBProperty();
+ baseType = property == null ? null : property.getBaseType();
+ } else {
+ baseType = null;
+ }
+
if (type.isGlobal()) {
- typeSG = getFactory().getTypeSG(type);
+ typeSG = getFactory().getTypeSG(type, baseType);
if (typeSG == null) {
throw new IllegalStateException("Unknown global type: " + type.getName());
}
} else {
- typeSG = getFactory().getTypeSG(pAttribute.getType(), pClassContext, name);
+ typeSG = getFactory().getTypeSG(pAttribute.getType(), pClassContext, name, baseType);
}
isWildcard = false;
namespaceList = null;
@@ -113,7 +124,7 @@
public SchemaSG getSchema(AttributeSG pController) { return getSchema(); }
public Locator getLocator(AttributeSG pController) { return getLocator(); }
public XsQName getName(AttributeSG pController) { return name; }
-
+
public boolean isRequired(AttributeSG pAttrController) { return isRequired; }
public void forAllValues(AttributeSG pController, JavaMethod pMethod,
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBComplexTypeSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBComplexTypeSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBComplexTypeSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -42,6 +42,7 @@
import org.apache.ws.jaxme.generator.sg.impl.ccsg.SimpleContentHandlerSG;
import org.apache.ws.jaxme.impl.JMSAXDriver;
import org.apache.ws.jaxme.impl.JMSAXElementParser;
+import org.apache.ws.jaxme.impl.JMSAXMixedElementParser;
import org.apache.ws.jaxme.js.JavaQName;
import org.apache.ws.jaxme.js.JavaSource;
import org.apache.ws.jaxme.js.JavaSourceFactory;
@@ -292,7 +293,13 @@
}
private void createXMLHandler(ComplexTypeSG pController, JavaSource pJs) throws SAXException {
- pJs.addExtends(JMSAXElementParser.class);
+ final Class parserClass;
+ if (!pController.hasSimpleContent() && pController.getComplexContentSG().isMixed()) {
+ parserClass = JMSAXMixedElementParser.class;
+ } else {
+ parserClass = JMSAXElementParser.class;
+ }
+ pJs.addExtends(parserClass);
HandlerSG handlerSG = newHandlerSG(pController, pJs);
handlerSG.generate();
}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBObjectSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBObjectSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBObjectSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -39,6 +39,8 @@
import org.apache.ws.jaxme.xs.XSObject;
import org.apache.ws.jaxme.xs.XSSimpleContentType;
import org.apache.ws.jaxme.xs.XSType;
+import org.apache.ws.jaxme.xs.jaxb.JAXBProperty;
+import org.apache.ws.jaxme.xs.jaxb.JAXBPropertyOwner;
import org.apache.ws.jaxme.xs.xml.XsQName;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
@@ -102,17 +104,32 @@
if (useTypesContext) {
myClassContext = pClassContext;
} else {
- myClassContext = new GlobalContext(name, pObject, null, null, pSchema);
+ XSObject contextObject = pObject;
+ if (pObject instanceof XSElement) {
+ XSElement element = (XSElement) pObject;
+ if (element.isReference()) {
+ contextObject = pObject.getXSSchema().getElement(name);
+ }
+ }
+ myClassContext = new GlobalContext(name, contextObject, null, null, pSchema);
}
+ final JAXBProperty.BaseType baseType;
+ if (pObject instanceof JAXBPropertyOwner) {
+ JAXBProperty property = ((JAXBPropertyOwner) pObject).getJAXBProperty();
+ baseType = property == null ? null : property.getBaseType();
+ } else {
+ baseType = null;
+ }
+
if (isClassGlobal) {
if (type.isGlobal()) {
- typeSG = pFactory.getTypeSG(type);
+ typeSG = pFactory.getTypeSG(type, baseType);
} else {
- typeSG = pFactory.getTypeSG(type, name);
+ typeSG = pFactory.getTypeSG(type, myClassContext.getName(), baseType);
}
} else {
- typeSG = pFactory.getTypeSG(type, myClassContext, name);
+ typeSG = pFactory.getTypeSG(type, myClassContext, name, baseType);
}
if (useTypesContext) {
@@ -134,20 +151,6 @@
log.finest(mName, "<-", new Object[]{typeSG, classContext});
}
- /** <p>Creates a new instance of JAXBObjectSG generating the given simple
- * content <code>pContent</code> of the given complex type
- * <code>pComplexType</code>.</p>
- */
- public JAXBObjectSG(SGFactory pFactory, SchemaSG pSchema, TypeSG pComplexType,
- XSSimpleContentType pContainer, XSType pType) throws SAXException {
- super(pFactory, pSchema, pType);
- global = false;
- type = pType;
- name = null;
- classContext = pComplexType.getComplexTypeSG().getClassContext();
- typeSG = pFactory.getTypeSG(type, classContext, null);
- }
-
/** <p>Creates a new instance of JAXBObjectSG generating the given
* wildcard object.</p>
*/
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSGFactory.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSGFactory.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSGFactory.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -47,6 +47,7 @@
import org.apache.ws.jaxme.xs.XSParser;
import org.apache.ws.jaxme.xs.XSSchema;
import org.apache.ws.jaxme.xs.XSType;
+import org.apache.ws.jaxme.xs.jaxb.JAXBProperty;
import org.apache.ws.jaxme.xs.jaxb.impl.JAXBObjectFactoryImpl;
import org.apache.ws.jaxme.xs.jaxb.impl.JAXBParser;
import org.apache.ws.jaxme.xs.jaxb.impl.JAXBXsObjectFactoryImpl;
@@ -187,32 +188,34 @@
return new JAXBSchemaSG(pController, pSchema);
}
- public TypeSG getTypeSG(SGFactory pController, XSType pType) throws SAXException {
+ public TypeSG getTypeSG(SGFactory pController, XSType pType, JAXBProperty.BaseType pBaseType) throws SAXException {
final String mName = "getTypeSG(XSType)";
TypeSG result = (TypeSG) types.get(pType);
- if (result == null) {
+ if (result == null || pBaseType != null) {
log.finest(mName, "->", pType.getName());
- TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType);
+ TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType, pBaseType);
result = new TypeSGImpl(chain);
- types.put(pType, result);
- typesByOrder.add(result);
+ if (pBaseType == null) {
+ types.put(pType, result);
+ typesByOrder.add(result);
+ }
result.init();
log.finest(mName, "<-", new Object[]{chain, result});
}
return result;
}
- public Object newTypeSG(SGFactory pController, XSType pType) throws SAXException {
+ public Object newTypeSG(SGFactory pController, XSType pType, JAXBProperty.BaseType pBaseType) throws SAXException {
if (schemaSG == null) {
throw new IllegalStateException("A schema has not yet been created");
}
- return new JAXBTypeSG(pController, schemaSG, pType);
+ return new JAXBTypeSG(pController, schemaSG, pType, pBaseType);
}
- public TypeSG getTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName) throws SAXException {
+ public TypeSG getTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException {
final String mName = "getTypeSG(XSType,ClassContext)";
log.finest(mName, "->", new Object[]{pType, pClassContext});
- TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType, pClassContext, pName);
+ TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType, pClassContext, pName, pBaseType);
TypeSG result = new TypeSGImpl(chain);
typesByOrder.add(result);
result.init();
@@ -220,22 +223,24 @@
return result;
}
- public Object newTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName) throws SAXException {
+ public Object newTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName,
+ JAXBProperty.BaseType pBaseType) throws SAXException {
if (schemaSG == null) {
throw new IllegalStateException("A schema has not yet been created");
}
- return new JAXBTypeSG(pController, schemaSG, pType, pClassContext, pName);
+ return new JAXBTypeSG(pController, schemaSG, pType, pClassContext, pName, pBaseType);
}
- public Object newTypeSG(SGFactory pController, XSType pType, XsQName pName) throws SAXException {
+ public Object newTypeSG(SGFactory pController, XSType pType, XsQName pName,
+ JAXBProperty.BaseType pBaseType) throws SAXException {
if (schemaSG == null) {
throw new IllegalStateException("A schema has not yet been created");
}
- return new JAXBTypeSG(pController, schemaSG, pType, pName);
+ return new JAXBTypeSG(pController, schemaSG, pType, pName, pBaseType);
}
- public TypeSG getTypeSG(SGFactory pController, XSType pType, XsQName pName) throws SAXException {
- TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType, pName);
+ public TypeSG getTypeSG(SGFactory pController, XSType pType, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException {
+ TypeSGChain chain = (TypeSGChain) pController.newTypeSG(pType, pName, pBaseType);
TypeSG result = new TypeSGImpl(chain);
typesByOrder.add(result);
result.init();
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSchemaSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSchemaSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSchemaSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -153,7 +153,7 @@
if (type == null) {
return null;
}
- typeSG = pController.getFactory().getTypeSG(type);
+ typeSG = pController.getFactory().getTypeSG(type, null);
typesByName.put(pName, typeSG);
return typeSG;
}
@@ -462,12 +462,6 @@
JavaField jf = js.newJavaField("jaxbContext", JAXBContextImpl.class, "private");
JavaField properties = js.newJavaField("properties", Map.class, "private");
- JavaConstructor jcon = js.newJavaConstructor("public");
- jcon.addThrows(JAXBException.class);
- jcon.addLine(jf, " = (", JAXBContextImpl.class, ") ",
- JAXBContext.class, ".newInstance(",
- JavaSource.getQuoted(pPackageName), ");");
-
JavaMethod newInstanceMethod = js.newJavaMethod("newInstance", Object.class, "public");
newInstanceMethod.addThrows(JAXBException.class);
Parameter pElementInterface = newInstanceMethod.addParam(Class.class, "pElementInterface");
@@ -493,6 +487,8 @@
}
Set contextSet = new HashSet();
+ final Set packageNames = new HashSet();
+ packageNames.add(pPackageName);
for (Iterator iter = pContextList.iterator(); iter.hasNext(); ) {
Object o = iter.next();
TypeSG typeSG;
@@ -501,6 +497,7 @@
typeSG = objectSG.getTypeSG();
generateCreateMethod(js, null, objectSG.getClassContext());
//NB: we don't have to check for duplicate element names since that would violate the XSD spec
+ packageNames.add(objectSG.getClassContext().getXMLInterfaceName().getPackageName());
} else if (o instanceof TypeSG) {
typeSG = (TypeSG) o;
} else {
@@ -508,8 +505,21 @@
}
generateCreateMethod(js, contextSet, typeSG, null);
+
}
+ StringBuffer sb = new StringBuffer();
+ for (Iterator iter = packageNames.iterator(); iter.hasNext(); ) {
+ if (sb.length() > 0) {
+ sb.append(':');
+ }
+ sb.append(iter.next());
+ }
+ JavaConstructor jcon = js.newJavaConstructor("public");
+ jcon.addThrows(JAXBException.class);
+ jcon.addLine(jf, " = (", JAXBContextImpl.class, ") ",
+ JAXBContext.class, ".newInstance(",
+ JavaSource.getQuoted(sb.toString()), ");");
return js;
}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSimpleContentTypeSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSimpleContentTypeSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBSimpleContentTypeSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -40,7 +40,7 @@
xsType = pType;
typeSG = pComplexTypeSG.getTypeSG();
XSType theSimpleType = pType.getComplexType().getSimpleContent().getType();
- contentTypeSG = typeSG.getFactory().getTypeSG(theSimpleType, pComplexTypeSG.getClassContext(), null);
+ contentTypeSG = typeSG.getFactory().getTypeSG(theSimpleType, pComplexTypeSG.getClassContext(), null, null);
}
public Object newPropertySGChain(SimpleContentSG pController) throws SAXException {
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBTypeSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBTypeSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBTypeSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -67,6 +67,7 @@
import org.apache.ws.jaxme.xs.jaxb.JAXBEnumeration;
import org.apache.ws.jaxme.xs.jaxb.JAXBGlobalBindings;
import org.apache.ws.jaxme.xs.jaxb.JAXBJavaType;
+import org.apache.ws.jaxme.xs.jaxb.JAXBProperty;
import org.apache.ws.jaxme.xs.jaxb.JAXBSchema;
import org.apache.ws.jaxme.xs.jaxb.JAXBSchemaBindings;
import org.apache.ws.jaxme.xs.jaxb.JAXBSimpleType;
@@ -135,17 +136,19 @@
private final XsQName name;
private Map properties;
private final XsSchemaHeader schemaHeader;
+ private final JAXBProperty.BaseType baseType;
/** <p>Creates a new, global instance of JAXBTypeSG.</p>
*/
- protected JAXBTypeSG(SGFactory pFactory, SchemaSG pSchema, XSType pType)
+ protected JAXBTypeSG(SGFactory pFactory, SchemaSG pSchema, XSType pType, JAXBProperty.BaseType pBaseType)
throws SAXException {
- this(pFactory, pSchema, pType, null, pType.getName());
+ this(pFactory, pSchema, pType, null, pType.getName(), pBaseType);
isGlobalClass = true;
}
- protected JAXBTypeSG(SGFactory pFactory, SchemaSG pSchema, XSType pType, XsQName pName) throws SAXException {
- this(pFactory, pSchema, pType, null, pName);
+ protected JAXBTypeSG(SGFactory pFactory, SchemaSG pSchema, XSType pType, XsQName pName,
+ JAXBProperty.BaseType pBaseType) throws SAXException {
+ this(pFactory, pSchema, pType, null, pName, pBaseType);
isGlobalClass = true;
}
@@ -155,7 +158,7 @@
XsQName name = pReferencedType.getName();
TypeSG result;
if (pReferencedType.isGlobal()) {
- result = pFactory.getTypeSG(pReferencedType);
+ result = pFactory.getTypeSG(pReferencedType, null);
if (result == null) {
throw new SAXParseException("Unknown global type " + name,
pReferencingType.getLocator());
@@ -169,9 +172,11 @@
/** <p>Creates a new, local instance of JAXBTypeSG. Classes are generated
* into the given context.</p>
*/
- protected JAXBTypeSG(SGFactory pFactory, SchemaSG pSchema, XSType pType, Context pClassContext, XsQName pName)
+ protected JAXBTypeSG(SGFactory pFactory, SchemaSG pSchema, XSType pType, Context pClassContext, XsQName pName,
+ JAXBProperty.BaseType pBaseType)
throws SAXException {
super(pFactory, pSchema, pType);
+ baseType = pBaseType;
name = pName;
xsType = pType;
if (pType.isSimple()) {
@@ -628,6 +633,9 @@
private JAXBJavaType findJavaType(SchemaSG pSchema, XSType pType)
throws SAXException {
+ if (baseType != null && baseType.getJavaType() != null) {
+ return baseType.getJavaType();
+ }
JAXBJavaType[] globalJavaTypes = pSchema.getJAXBJavaTypes();
for (XSType currentType = pType; currentType != null; ) {
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg/GroupHandlerSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg/GroupHandlerSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/ccsg/GroupHandlerSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -129,6 +129,27 @@
}
}
+ private boolean isValidInnerClassName(JavaSource pSource, String pName) {
+ boolean isInnerClass = pSource.isInnerClass();
+ final String name;
+ if (isInnerClass) {
+ JavaInnerClass jic = (JavaInnerClass) pSource;
+ if (!isValidInnerClassName(jic.getOuterClass(), pName)) {
+ return false;
+ }
+ name = jic.getQName().getInnerClassName();
+ } else {
+ name = pSource.getQName().getClassName();
+ }
+ if (name.equals(pName)) {
+ return false;
+ }
+ if (pSource.getInnerClass(pName) != null) {
+ return false;
+ }
+ return true;
+ }
+
private GroupHandlerSG newGroupHandlerSG(ParticleSG pParticle) throws SAXException {
JavaSource js = getJavaSource();
String name = GroupUtil.getGroupName(pParticle.getGroupSG());
@@ -138,7 +159,7 @@
name += i;
}
n += "Handler";
- if (js.getInnerClass(n) == null) {
+ if (isValidInnerClassName(js, n)) {
GroupHandlerSG result = newGroupHandlerSG(pParticle, n);
result.newGetHandlerMethod(js);
return result;
@@ -205,9 +226,9 @@
ObjectSG oSG = pParticle.getObjectSG();
TypeSG tSG = oSG.getTypeSG();
if (tSG.isComplex()) {
- JavaQName elementInterfaceClass = pParticle.getObjectSG().getClassContext().getXMLInterfaceName();
Object[] o, h;
if (oSG.getClassContext().isGlobal()) {
+ JavaQName elementInterfaceClass = pParticle.getObjectSG().getClassContext().getXMLInterfaceName();
LocalJavaField manager = pJm.newJavaField(JMManager.class);
manager.addLine("getHandler().getJMUnmarshaller().getJAXBContextImpl().getManagerS(",
elementInterfaceClass, ".class)");
@@ -305,6 +326,14 @@
return result;
}
+ public JavaMethod newIsFinishedMethod() throws SAXException {
+ JavaMethod jm = super.newIsFinishedMethod();
+ if (isMixed) {
+ jm.addLine("normalize();");
+ }
+ return jm;
+ }
+
private void handleEndElementState(JavaMethod pJm, LocalJavaField pElement,
ParticleSG pParticle) throws SAXException {
if (pParticle.isElement()) {
@@ -396,33 +425,26 @@
if (!isMixed) {
return null;
}
+ if (ccSG != null) {
+ return null;
+ }
JavaMethod jm = getJavaSource().newJavaMethod("addText", void.class, JavaSource.PUBLIC);
Parameter buffer = jm.addParam(char[].class, "pBuffer");
Parameter offset = jm.addParam(int.class, "pOffset");
Parameter length = jm.addParam(int.class, "pLength");
- if (ccSG == null) {
- jm.addLine(outerHandler.getJavaSource().getQName(), ".this.addText(",
- buffer, ", ", offset, ", ", length, ");");
- } else {
- JavaQName elementInterface = ctSG.getClassContext().getXMLInterfaceName();
- LocalJavaField element = jm.newJavaField(elementInterface);
- element.addLine("(", elementInterface, ") result");
- Object s = new Object[]{"new ", String.class, "(", buffer, ", ",
- offset, ", ", length, ")"};
- LocalJavaField list = jm.newJavaField(List.class);
- list.addLine(element, ".getContent()");
- jm.addIf(list, ".size() > 0");
- LocalJavaField o = jm.newJavaField(Object.class);
- o.addLine(list, ".get(", list, ".size()-1)");
- jm.addIf(o, " instanceof ", String.class);
- jm.addLine(list, ".set(", list, ".size()-1, ",
- "((", String.class, ") ", o, ") + ", s, ");");
- jm.addLine("return;");
- jm.addEndIf();
- jm.addEndIf();
- jm.addLine(list, ".add(", s, ");");
- }
- return jm;
+ jm.addLine(outerHandler.getJavaSource().getQName(), ".this.addText(",
+ buffer, ", ", offset, ", ", length, ");");
+ return jm;
+ }
+
+ private JavaMethod newContentListMethod() {
+ if (!isMixed) {
+ return null;
+ }
+ JavaMethod jm = getJavaSource().newJavaMethod("getContentList", List.class, JavaSource.PROTECTED);
+ JavaQName elementInterface = ctSG.getClassContext().getXMLInterfaceName();
+ jm.addLine("return ((", elementInterface, ") result).getContent();");
+ return jm;
}
private JavaMethod newGetHandlerMethod(JavaSource pOuter) throws SAXException {
@@ -435,6 +457,7 @@
super.generate();
newAddTextMethod();
newIsMixedMethod();
+ newContentListMethod();
for (Iterator iter = groups.values().iterator(); iter.hasNext(); ) {
HandlerSG handler = (HandlerSG) iter.next();
handler.generate();
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/AtomicTypeSGImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/AtomicTypeSGImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/AtomicTypeSGImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -108,14 +108,10 @@
}
public TypedValue getCastToString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, DirectAccessible pData) {
- return getCastToString(pController, pValue, pData);
+ return new TypedValueImpl(new Object[]{pData, ".getDatatypeConverter().print" + getDatatypeName() + "(", pValue, ")"},
+ String.class);
}
- public TypedValue getCastToString(SimpleTypeSG pController, Object pValue, DirectAccessible pData) {
- return new TypedValueImpl(new Object[]{pData, ".getDatatypeConverter().print" + getDatatypeName() + "(", pValue, ")"},
- String.class);
- }
-
public Object getEqualsCheck(SimpleTypeSG pController, JavaMethod pMethod, Object pValue1, Object pValue2)
throws SAXException {
return new Object[]{pValue1, ".equals(", pValue2, ")"};
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DateTimeSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DateTimeSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DateTimeSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -118,7 +118,7 @@
}
}
- public TypedValue getCastToString(SimpleTypeSG pController, Object pValue, DirectAccessible pData) {
+ public final TypedValue getCastToString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, DirectAccessible pData) {
Object v = new Object[]{pData, ".getJMMarshaller().get" + getDatatypeName()
+ "Format().format(", pValue, ")"};
return new TypedValueImpl(v, StringSG.STRING_TYPE);
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DecimalSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DecimalSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/DecimalSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -22,7 +22,6 @@
import org.apache.ws.jaxme.generator.sg.SGlet;
import org.apache.ws.jaxme.generator.sg.SchemaSG;
import org.apache.ws.jaxme.generator.sg.SimpleTypeSG;
-import org.apache.ws.jaxme.impl.DatatypeConverterImpl;
import org.apache.ws.jaxme.js.JavaMethod;
import org.apache.ws.jaxme.js.JavaQName;
import org.apache.ws.jaxme.js.JavaQNameImpl;
@@ -33,6 +32,7 @@
import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
import org.xml.sax.SAXException;
+
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
*/
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/ListTypeSGImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/ListTypeSGImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/ListTypeSGImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -83,7 +83,7 @@
}
public void init(SimpleTypeSG pController) throws SAXException {
- itemType = getFactory().getTypeSG(listType.getItemType(), classContext, name);
+ itemType = getFactory().getTypeSG(listType.getItemType(), classContext, name, null);
}
protected TypeSG getItemType() {
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/PrimitiveTypeSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/PrimitiveTypeSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/PrimitiveTypeSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -57,11 +57,11 @@
return v;
}
- public TypedValue getCastToString(SimpleTypeSG pController, Object pValue, DirectAccessible pData) {
+ public TypedValue getCastToString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, DirectAccessible pData) {
if (pController.isNullable()) {
pValue = new Object[]{pValue, "." + getPrimitiveRuntimeType(pController).getClassName() +"Value()"};
}
- return super.getCastToString(pController, pValue, pData);
+ return super.getCastToString(pController, pMethod, pValue, pData);
}
public void forAllValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/QNameSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/QNameSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/QNameSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -67,8 +67,13 @@
".getNamespaceSupport())" }, QNAME_TYPE);
}
- public TypedValue getCastToString(SimpleTypeSG pController, Object pValue, DirectAccessible pData) {
- return new TypedValueImpl(new Object[]{ pData, ".getElementQName(this, ", pValue, ".getNamespaceURI(), ", pValue,
+ public TypedValue getCastToString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, DirectAccessible pData) {
+ if (!(pValue instanceof DirectAccessible)) {
+ LocalJavaField value = pMethod.newJavaField(QNAME_TYPE);
+ value.addLine(pValue);
+ pValue = value;
+ }
+ return new TypedValueImpl(new Object[]{ pData, ".getElementQName(this, ", pValue, ".getNamespaceURI(), ", pValue,
".getLocalPart())" }, String.class);
}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/StringSG.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/StringSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/StringSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -60,7 +60,7 @@
return new TypedValueImpl(pValue, STRING_TYPE);
}
- public TypedValue getCastToString(SimpleTypeSG pController, Object pValue, DirectAccessible pData) {
+ public TypedValue getCastToString(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, DirectAccessible pData) {
return new TypedValueImpl(pValue, STRING_TYPE);
}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/UnionTypeSGImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/UnionTypeSGImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/UnionTypeSGImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -57,7 +57,7 @@
XSType[] mTypes = unionType.getMemberTypes();
List members = new ArrayList();
for (int i = 0; i < mTypes.length; i++) {
- TypeSG typeSG = getFactory().getTypeSG(mTypes[i], pClassContext, pName);
+ TypeSG typeSG = getFactory().getTypeSG(mTypes[i], pClassContext, pName, null);
typeSG.getSimpleTypeSG().setNullable(true);
members.add(typeSG);
}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/DateFilter.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/DateFilter.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/DateFilter.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -40,7 +40,7 @@
* patterns. Used by the test suite.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: DateFilter.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: DateFilter.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class DateFilter {
private File fromFile, toFile;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/ReflectResolver.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/ReflectResolver.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/generator/util/ReflectResolver.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -19,7 +19,7 @@
/** <p>A helper class for <code>Reflect.assignBeanValue()</code>.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: ReflectResolver.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: ReflectResolver.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
* @see Reflect
*/
public interface ReflectResolver {
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/Configuration.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/Configuration.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/Configuration.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -33,7 +33,7 @@
* is located through the classpath.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: Configuration.java 232067 2005-03-10 11:14:08 +0100 (Do, 10 Mrz 2005) jochen $
+ * @version $Id: Configuration.java 232067 2005-03-10 11:14:08 +0100 (Thu, 10 Mar 2005) jochen $
*/
public class Configuration {
JAXBContextImpl context;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JAXBContextImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JAXBContextImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JAXBContextImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -54,7 +54,7 @@
/** <p>JaxMe's implementation of a JAXBContext.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBContextImpl.java 232067 2005-03-10 11:14:08 +0100 (Do, 10 Mrz 2005) jochen $
+ * @version $Id: JAXBContextImpl.java 437259 2006-08-27 02:25:00 +0200 (Sun, 27 Aug 2006) jochen $
*/
public class JAXBContextImpl extends JAXBContext {
/** The namespace of JaxMe's configuration files.
@@ -299,7 +299,6 @@
pm.init(manager);
return pm;
} catch (Exception e) {
- e.printStackTrace(System.err);
throw new PMException("Could not instantiate persistence manager class " +
c.getName(), e);
}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMControllerImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMControllerImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMControllerImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -34,7 +34,7 @@
* JMValidatorImpl.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JMControllerImpl.java 279090 2005-09-06 22:26:11 +0200 (Di, 06 Sep 2005) jochen $
+ * @version $Id: JMControllerImpl.java 279090 2005-09-06 22:26:11 +0200 (Tue, 06 Sep 2005) jochen $
*/
public abstract class JMControllerImpl {
/** Property prefix for users private settings:
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMMarshallerImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMMarshallerImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMMarshallerImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -43,7 +43,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JMMarshallerImpl.java 232067 2005-03-10 11:14:08 +0100 (Do, 10 Mrz 2005) jochen $
+ * @version $Id: JMMarshallerImpl.java 232067 2005-03-10 11:14:08 +0100 (Thu, 10 Mar 2005) jochen $
*/
public class JMMarshallerImpl extends JMControllerImpl implements JMMarshaller {
/** Default value for {@link Marshaller#JAXB_ENCODING}.
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXElementParser.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXElementParser.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXElementParser.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.ws.jaxme.impl;
import javax.xml.bind.ValidationEvent;
Added: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXMixedElementParser.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXMixedElementParser.java (rev 0)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/impl/JMSAXMixedElementParser.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ws.jaxme.impl;
+
+import java.util.List;
+
+
+/** A subclass of {@link org.apache.ws.jaxme.impl.JMSAXElementParser}
+ * for parsing complex elements.
+ */
+public abstract class JMSAXMixedElementParser extends JMSAXElementParser {
+ protected abstract List getContentList();
+
+ protected void normalize() {
+ List list = getContentList();
+ boolean previousIsString = false;
+ for (int i = list.size()-1; i >= 0; i--) {
+ Object o = list.get(i);
+ if (o instanceof StringBuffer) {
+ if (previousIsString) {
+ StringBuffer sb = (StringBuffer) o;
+ sb.append((String) list.remove(i+1));
+ }
+ list.set(i, o.toString());
+ previousIsString = true;
+ } else if (o instanceof String) {
+ if (previousIsString) {
+ list.set(i, (String) o + (String) list.remove(i+1));
+ }
+ previousIsString = true;
+ } else {
+ previousIsString = false;
+ }
+ }
+ }
+
+ public void addText(char[] pBuffer, int pOffset, int pLength) {
+ java.util.List list = getContentList();
+ StringBuffer sb = null;
+ if (list.size() > 0) {
+ java.lang.Object _3 = list.get(list.size()-1);
+ if (_3 instanceof StringBuffer) {
+ sb = (StringBuffer) _3;
+ }
+ }
+ if (sb == null) {
+ sb = new StringBuffer();
+ list.add(sb);
+ }
+ sb.append(pBuffer, pOffset, pLength);
+ }
+}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BaseTestCase.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BaseTestCase.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BaseTestCase.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -34,7 +34,7 @@
/** <p>A base class for JUnit tests.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: BaseTestCase.java 232102 2005-04-28 23:57:53Z jochen $
+ * @version $Id: BaseTestCase.java 453571 2006-10-06 14:18:17 +0200 (Fri, 06 Oct 2006) jochen $
*/
public abstract class BaseTestCase extends TestCase {
protected BaseTestCase() {
@@ -81,7 +81,7 @@
}
protected void unmarshalMarshalUnmarshal(Class pClass, String pXML, boolean pIndenting)
- throws Exception {
+ throws JAXBException {
Object o = unmarshal(pClass, pXML);
assertNotNull(o);
String s = marshal(o, pClass, pIndenting);
@@ -90,7 +90,7 @@
assertNotNull(comp);
}
- protected void unmarshalMarshalUnmarshal(Class pClass, String pXML) throws Exception {
+ protected void unmarshalMarshalUnmarshal(Class pClass, String pXML) throws JAXBException {
unmarshalMarshalUnmarshal(pClass, pXML, true);
}
Added: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BindingsTest.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BindingsTest.java (rev 0)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/BindingsTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ws.jaxme.junit;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.ws.jaxme.generator.Generator;
+import org.apache.ws.jaxme.generator.SchemaReader;
+import org.apache.ws.jaxme.generator.impl.GeneratorImpl;
+import org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader;
+import org.apache.ws.jaxme.test.bindings.imported.vo.ImpFooType;
+import org.apache.ws.jaxme.test.bindings.vo.FooType;
+import org.apache.ws.jaxme.test.bindings.vo.ObjectFactory;
+import org.apache.ws.jaxme.test.bindings.vo.YesNoTypeClass;
+import org.xml.sax.InputSource;
+
+
+/**
+ * Tests using external binding files.
+ */
+public class BindingsTest extends TestCase {
+ /**
+ * Tests running the generator with a binding file.
+ */
+ public void testBindingGenerator() throws Exception {
+ Generator g = new GeneratorImpl();
+ g.setTargetDirectory(new File("build/tests/binding/src"));
+ g.setResourceTargetDirectory(new File("build/tests/binding/src"));
+ g.addBindings(new InputSource(new File("src/test/jaxb/bindings/bindings.jxb").toURI().toURL().toExternalForm()));
+ SchemaReader sr = new JAXBSchemaReader();
+ sr.setGenerator(g);
+ g.setSchemaReader(sr);
+ g.generate(new File("src/test/jaxb/bindings/bindings.xsd"));
+ }
+
+ /**
+ * Tests, whether the binding has moved the schema to the proper
+ * package and whether the string constants have been created.
+ */
+ public void testBindings() throws Exception {
+ FooType foo = new ObjectFactory().createFoo();
+ foo.setBar(YesNoTypeClass.YES);
+ foo.setBool(Boolean.TRUE);
+ ImpFooType impFoo = new org.apache.ws.jaxme.test.bindings.imported.vo.ObjectFactory().createImpFoo();
+ impFoo.setXyz(org.apache.ws.jaxme.test.bindings.imported.vo.YesNoTypeClass.NO);
+ impFoo.setRequiredLong(1L);
+ impFoo.setOptionalLong(new Long(1));
+ }
+}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JaxbTest.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JaxbTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JaxbTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -21,7 +21,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JaxbTest.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JaxbTest.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class JaxbTest extends BaseTestCase {
public JaxbTest(String name) {
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JiraTest.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JiraTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/JiraTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -1,5 +1,6 @@
package org.apache.ws.jaxme.junit;
+import java.io.File;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.List;
@@ -33,7 +34,9 @@
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import com.softwareag.namespaces.de.s.xdws.soap_api.XdwsResponse;
+
/** Some excerpts from Jira bug reports.
*/
public class JiraTest extends BaseTestCase {
@@ -276,4 +279,15 @@
Jaxme72 jaxme72Clone = (Jaxme72) ctx.createUnmarshaller().unmarshal(new InputSource(new StringReader(sw.toString())));
assertEquals(jaxme72.getTest(),jaxme72Clone.getTest());
}
+
+ /** Test for <a href="http://issues.apache.org/jira/browse/JAXME-84">JAXME-84</a>.
+ */
+ public void testJAXME84() throws Exception {
+ final String xml =
+ "<xdws:xdwsResponse version=\"1\" xmlns:xdws=\"http://namespaces.softwareag.com/de/s/xDWS/soap-api\">\n"
+ + " <xdws:response rc=\"4\"/>\n"
+ + " <xdws:result rc=\"4\"/>\n"
+ + "</xdws:xdwsResponse>";
+ unmarshalMarshalUnmarshal(XdwsResponse.class, xml);
+ }
}
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/MarshallerTest.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/MarshallerTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/MarshallerTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -77,7 +77,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: MarshallerTest.java 279090 2005-09-06 22:26:11 +0200 (Di, 06 Sep 2005) jochen $
+ * @version $Id: MarshallerTest.java 279090 2005-09-06 22:26:11 +0200 (Tue, 06 Sep 2005) jochen $
*/
public class MarshallerTest extends BaseTestCase {
private JAXBContextImpl factory;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/ParserTest.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/ParserTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/junit/ParserTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -59,7 +59,7 @@
/** <p>Implements some basic tests for the Schema generator.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: ParserTest.java 232139 2005-07-13 19:58:16Z jochen $
+ * @version $Id: ParserTest.java 232139 2005-07-13 21:58:16 +0200 (Wed, 13 Jul 2005) jochen $
*/
public class ParserTest extends BaseTestCase {
public ParserTest(String arg) { super(arg); }
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/ClassLoader.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/ClassLoader.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/ClassLoader.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -20,7 +20,7 @@
/** <p>Helper class for working with class loaders.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: ClassLoader.java 231893 2004-07-27 11:19:25Z jochen $
+ * @version $Id: ClassLoader.java 231893 2004-07-27 13:19:25 +0200 (Tue, 27 Jul 2004) jochen $
*/
public class ClassLoader {
/** <p>Loads a class with the given name. First attempts to use
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/Configurator.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/Configurator.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/Configurator.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -49,7 +49,7 @@
* <code>setWhatever(int)</code>.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: Configurator.java 232067 2005-03-10 10:14:08Z jochen $
+ * @version $Id: Configurator.java 232067 2005-03-10 11:14:08 +0100 (Thu, 10 Mar 2005) jochen $
*/
public class Configurator implements ContentHandler, NamespaceResolver {
private static final Class[] zeroClasses = new Class[0];
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMBuilder.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMBuilder.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMBuilder.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -35,7 +35,7 @@
/** <p>Converts a stream of SAX events into a DOM node.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: DOMBuilder.java 231826 2004-04-18 19:15:30Z jochen $
+ * @version $Id: DOMBuilder.java 231826 2004-04-18 21:15:30 +0200 (Sun, 18 Apr 2004) jochen $
*/
public class DOMBuilder implements ContentHandler {
private Document document;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMSerializer.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMSerializer.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/DOMSerializer.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -28,7 +28,7 @@
/** <p>Serializes a DOM node into a stream of SAX events.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: DOMSerializer.java 232067 2005-03-10 10:14:08Z jochen $
+ * @version $Id: DOMSerializer.java 232067 2005-03-10 11:14:08 +0100 (Thu, 10 Mar 2005) jochen $
*/
public class DOMSerializer {
private boolean namespaceDeclarationAttribute;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceResolver.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceResolver.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceResolver.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -20,7 +20,7 @@
* into its namespace URI and local part.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: NamespaceResolver.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: NamespaceResolver.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface NamespaceResolver {
/** <p>Splits the XML name <code>pName</code> into its
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceSupport.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceSupport.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceSupport.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -28,7 +28,7 @@
* for marshalling and not for parsing XML.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: NamespaceSupport.java 232067 2005-03-10 10:14:08Z jochen $
+ * @version $Id: NamespaceSupport.java 232067 2005-03-10 11:14:08 +0100 (Thu, 10 Mar 2005) jochen $
*/
public class NamespaceSupport implements NamespaceContext {
List prefixList;
Modified: trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceUser.java
===================================================================
--- trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceUser.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/jaxme/org/apache/ws/jaxme/util/NamespaceUser.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -18,7 +18,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: NamespaceUser.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: NamespaceUser.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface NamespaceUser {
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/AbstractJavaMethod.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/AbstractJavaMethod.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/AbstractJavaMethod.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -164,7 +164,7 @@
public String[] getParamNames() {
String[] res = new String[params.size()];
for (int i = 0; i < params.size(); i++) {
- res[i++] = ((Parameter) params.get(i)).getName();
+ res[i] = ((Parameter) params.get(i)).getName();
}
return res;
}
@@ -177,7 +177,7 @@
public JavaQName[] getParamTypes() {
JavaQName[] res = new JavaQName[params.size()];
for (int i = 0; i < params.size(); i++) {
- res[i++] = ((Parameter) params.get(i)).getType();
+ res[i] = ((Parameter) params.get(i)).getType();
}
return res;
}
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IncreasingTarget.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IncreasingTarget.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IncreasingTarget.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -24,7 +24,7 @@
* level by 1.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: IncreasingTarget.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: IncreasingTarget.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class IncreasingTarget implements IndentationTarget {
private IndentationTarget actualTarget;
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngine.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngine.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngine.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -21,7 +21,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: IndentationEngine.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: IndentationEngine.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface IndentationEngine {
public static final Object NOTHING = "";
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngineImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngineImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngineImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -29,7 +29,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: IndentationEngineImpl.java 232093 2005-04-21 11:25:23Z mac $
+ * @version $Id: IndentationEngineImpl.java 232093 2005-04-21 13:25:23 +0200 (Thu, 21 Apr 2005) mac $
*/
public abstract class IndentationEngineImpl implements IndentationEngine {
private int level = 0;
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaQNameImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaQNameImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaQNameImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -25,7 +25,7 @@
*
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JavaQNameImpl.java 232162 2005-07-28 19:47:58Z jochen $
+ * @version $Id: JavaQNameImpl.java 232162 2005-07-28 21:47:58 +0200 (Thu, 28 Jul 2005) jochen $
*/
public class JavaQNameImpl {
private static final Map names = new HashMap();
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaSourceFactory.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaSourceFactory.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/JavaSourceFactory.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -63,7 +63,7 @@
* </ul>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JavaSourceFactory.java 358952 2005-12-24 22:48:25 +0100 (Sa, 24 Dez 2005) jochen $
+ * @version $Id: JavaSourceFactory.java 358952 2005-12-24 22:48:25 +0100 (Sat, 24 Dec 2005) jochen $
*/
public class JavaSourceFactory implements JavaSourceResolver {
private Logger logger = LoggerAccess.getLogger(JavaSourceFactory.class);
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/WriterTarget.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/WriterTarget.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/WriterTarget.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -22,7 +22,7 @@
/** <p>An IndentationTarget writing into a given Writer.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: WriterTarget.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: WriterTarget.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class WriterTarget implements IndentationTarget {
public static final String INDENTATION_STRING = " ";
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/MultipleInheritanceTest.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/MultipleInheritanceTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/MultipleInheritanceTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -34,7 +34,7 @@
* is added to the list.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: MultipleInheritanceTest.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: MultipleInheritanceTest.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class MultipleInheritanceTest extends TestCase implements Observer {
public class MyObservableList extends ObservableList {
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/TypesafeEnumerationTest.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/TypesafeEnumerationTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/TypesafeEnumerationTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -29,7 +29,7 @@
* is added to the list.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: TypesafeEnumerationTest.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: TypesafeEnumerationTest.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class TypesafeEnumerationTest extends TestCase {
public TypesafeEnumerationTest(String arg0) {
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/create.sql
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/create.sql 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/junit/create.sql 2007-07-21 08:19:31 UTC (rev 3898)
@@ -1,3 +1,4 @@
CREATE CACHED TABLE MAIN ( ID BIGINT NOT NULL, NAME VARCHAR(60) NOT NULL, VER INT NOT NULL, SIG BINARY(16) NOT NULL, DATE DATE NOT NULL, PRIMARY KEY (ID, VER));
CREATE CACHED TABLE SUB ( MTID BIGINT NOT NULL, MTVER INT NOT NULL, ADDRESS VARCHAR(60) NOT NULL, ID VARCHAR(32) NOT NULL, EMAIL VARCHAR(60), PRIMARY KEY (ID), FOREIGN KEY (MTID, MTVER) REFERENCES MAIN (ID, VER));
CREATE CACHED TABLE SUBSUB ( ID VARCHAR(32) NOT NULL, MTID BIGINT NOT NULL, MTVER INT NOT NULL, SSTID VARCHAR(32) NOT NULL, MTTS TIMESTAMP NOT NULL, PRIMARY KEY (ID), FOREIGN KEY (MTID, MTVER) REFERENCES MAIN (ID, VER), FOREIGN KEY (SSTID) REFERENCES SUB (ID));
+SHUTDOWN;
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/Ant.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/Ant.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/Ant.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -58,7 +58,7 @@
* pattern package.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: Ant.java 232162 2005-07-28 19:47:58Z jochen $
+ * @version $Id: Ant.java 232162 2005-07-28 21:47:58 +0200 (Thu, 28 Jul 2005) jochen $
*/
public class Ant {
protected abstract static class ReallyBasicAntTask extends Task {
Modified: trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/TypesafeEnumerationGenerator.java
===================================================================
--- trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/TypesafeEnumerationGenerator.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/js/org/apache/ws/jaxme/js/pattern/TypesafeEnumerationGenerator.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -39,7 +39,7 @@
* <p>Any instance has a name and a value. The name
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: TypesafeEnumerationGenerator.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: TypesafeEnumerationGenerator.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class TypesafeEnumerationGenerator {
public static class Item {
Modified: trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/generator/jdbc/JaxMeJdbcSG.java
===================================================================
--- trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/generator/jdbc/JaxMeJdbcSG.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/generator/jdbc/JaxMeJdbcSG.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -56,6 +56,7 @@
import org.apache.ws.jaxme.xs.XSObject;
import org.apache.ws.jaxme.xs.XSSchema;
import org.apache.ws.jaxme.xs.XSType;
+import org.apache.ws.jaxme.xs.jaxb.JAXBProperty;
import org.apache.ws.jaxme.xs.parser.XsObjectCreator;
import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
import org.apache.ws.jaxme.xs.types.XSBase64Binary;
@@ -544,16 +545,16 @@
}
}
- public Object newTypeSG(SGFactory pController, XSType pType) throws SAXException {
- return new JdbcTypeSG(this, (TypeSGChain) super.newTypeSG(pController, pType), pType);
+ public Object newTypeSG(SGFactory pController, XSType pType, JAXBProperty.BaseType pBaseType) throws SAXException {
+ return new JdbcTypeSG(this, (TypeSGChain) super.newTypeSG(pController, pType, pBaseType), pType);
}
- public Object newTypeSG(SGFactory pController, XSType pType, XsQName pName) throws SAXException {
- return new JdbcTypeSG(this, (TypeSGChain) super.newTypeSG(pController, pType, pName), pType);
+ public Object newTypeSG(SGFactory pController, XSType pType, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException {
+ return new JdbcTypeSG(this, (TypeSGChain) super.newTypeSG(pController, pType, pName, pBaseType), pType);
}
- public Object newTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName) throws SAXException {
- return new JdbcTypeSG(this, (TypeSGChain) super.newTypeSG(pController, pType, pClassContext, pName), pType);
+ public Object newTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName, JAXBProperty.BaseType pBaseType) throws SAXException {
+ return new JdbcTypeSG(this, (TypeSGChain) super.newTypeSG(pController, pType, pClassContext, pName, pBaseType), pType);
}
public Object newSchemaSG(SGFactory pController, XSSchema pSchema) throws SAXException {
Modified: trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/ino/api4j/TaminoAPI4JPm.java
===================================================================
--- trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/ino/api4j/TaminoAPI4JPm.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/pm/org/apache/ws/jaxme/pm/ino/api4j/TaminoAPI4JPm.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -106,6 +106,10 @@
protected abstract TConnection getTConnection() throws PMException;
public void select(Observer pObserver, String pQuery, PMParams pParams) throws PMException {
+ if (pParams != null) {
+ pQuery = super.parseQuery(pQuery, pParams);
+ }
+
TConnection conn = null;
try {
JAXBContextImpl c = getManager().getFactory();
Added: trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.jxb
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.jxb (rev 0)
+++ trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.jxb 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2003, 2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<jxb:bindings
+ version="1.0"
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <jxb:bindings schemaLocation="bindings.xsd" node="/xs:schema">
+ <jxb:schemaBindings>
+ <jxb:package name="org.apache.ws.jaxme.test.bindings.vo"/>
+ </jxb:schemaBindings>
+ <jxb:bindings node="xs:simpleType[@name='YesNoType']">
+ <jxb:typesafeEnumClass/>
+ </jxb:bindings>
+ <jxb:bindings node="xs:element[@name='foo']/xs:complexType/xs:attribute[@name='bool']">
+ <jxb:property>
+ <jxb:baseType>
+ <jxb:javaType name='java.lang.Boolean'/>
+ </jxb:baseType>
+ </jxb:property>
+ </jxb:bindings>
+ </jxb:bindings>
+
+ <jxb:bindings schemaLocation="imported.xsi" node="/xs:schema">
+ <jxb:schemaBindings>
+ <jxb:package name="org.apache.ws.jaxme.test.bindings.imported.vo"/>
+ </jxb:schemaBindings>
+ <jxb:bindings node="xs:simpleType[@name='YesNoType']">
+ <jxb:typesafeEnumClass/>
+ </jxb:bindings>
+ <jxb:bindings node="xs:element[@name='foo']">
+ <jxb:class name="ImpFoo"/>
+ <jxb:bindings node="xs:complexType/xs:attribute[@name='optionalLong']">
+ <jxb:property><jxb:baseType><jxb:javaType name="java.lang.Long"/></jxb:baseType></jxb:property>
+ </jxb:bindings>
+ </jxb:bindings>
+ </jxb:bindings>
+</jxb:bindings>
Added: trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.xsd
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.xsd (rev 0)
+++ trunk/jaxme/jaxme/src/test/jaxb/bindings/bindings.xsd 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2003, 2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://ws.apache.org/jaxme/test/bindings"
+ xmlns:bnd="http://ws.apache.org/jaxme/test/bindings"
+ xmlns:imp="http://ws.apache.org/jaxme/test/bindings/imported"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+ <xs:import namespace="http://ws.apache.org/jaxme/test/bindings/imported" schemaLocation="imported.xsi"/>
+
+ <xs:element name="foo">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="imp:blubb"/>
+ </xs:sequence>
+ <xs:attribute name="bar" type="bnd:YesNoType"/>
+ <xs:attribute name="blabb" type="imp:YesNoType"/>
+ <xs:attribute name="bool" type="xs:boolean"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="YesNoType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="YES"/>
+ <xs:enumeration value="NO"/>
+ </xs:restriction>
+ </xs:simpleType>
+</xs:schema>
Added: trunk/jaxme/jaxme/src/test/jaxb/bindings/imported.xsi
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/bindings/imported.xsi (rev 0)
+++ trunk/jaxme/jaxme/src/test/jaxb/bindings/imported.xsi 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2003, 2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://ws.apache.org/jaxme/test/bindings/imported"
+ xmlns:imp="http://ws.apache.org/jaxme/test/bindings/imported"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+ <xs:element name="blubb">
+ <xs:complexType>
+ <xs:attribute name="blabb" type="imp:YesNoType"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="YesNoType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="YES"/>
+ <xs:enumeration value="NO"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="foo">
+ <xs:complexType>
+ <xs:attribute name="xyz" type="imp:YesNoType"/>
+ <xs:attribute name="requiredLong" type="xs:long" use="required"/>
+ <xs:attribute name="optionalLong" type="xs:long" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Modified: trunk/jaxme/jaxme/src/test/jaxb/build.xml
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/build.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/test/jaxb/build.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -126,6 +126,11 @@
<produces dir="${srcdir}" includes="org/apache/ws/jaxme/test/misc/enumeration/*"/>
<produces dir="${srcdir}" includes="org/apache/ws/jaxme/test/misc/wildcards/*"/>
</xjc>
+ <xjc target="${srcdir}">
+ <schema dir="${basedir}/bindings" includes="*.xsd"/>
+ <binding dir="${basedir}/bindings" includes="*.jxb"/>
+ <produces dir="${srcdir}" includes="org/apache/ws/jaxme/test/bindings/**/*"/>
+ </xjc>
</target>
<target name="compile" depends="generate">
Added: trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-83.xsd
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-83.xsd (rev 0)
+++ trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-83.xsd 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,19 @@
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://ws.apache.org/jaxme/test/jira/elementref"
+ targetNamespace="http://ws.apache.org/jaxme/test/jira/elementref"
+ elementFormDefault="qualified">
+ <xs:element name="Dcr">
+ <xs:complexType>
+ <xs:attribute name="id"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="DcrLoadResult">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="Dcr"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Added: trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-84.xsd
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-84.xsd (rev 0)
+++ trunk/jaxme/jaxme/src/test/jaxb/jira/jaxme-84.xsd 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,32 @@
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://namespaces.softwareag.com/de/s/xDWS/soap-api"
+ xmlns:xdws="http://namespaces.softwareag.com/de/s/xDWS/soap-api"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+ <xs:complexType name="xdwsResultInfo">
+ <xs:attribute name="rc" type="xs:int" use="required"/>
+ <xs:attribute name="message" type="xs:string" use="optional"/>
+ <xs:attribute name="details" type="xs:string" use="optional"/>
+ </xs:complexType>
+ <xs:element name="xdwsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="response" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xdws:xdwsResultInfo">
+ <xs:choice minOccurs="0">
+ <xs:element name="a" type="xs:string"/>
+ <xs:element name="b" type="xs:string"/>
+ </xs:choice>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="result" type="xdws:xdwsResultInfo"/>
+ </xs:sequence>
+ <xs:attribute name="version" type="xs:int" use="required" />
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
Modified: trunk/jaxme/jaxme/src/test/jaxb/nestedGroups.xsd
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/nestedGroups.xsd 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/test/jaxb/nestedGroups.xsd 2007-07-21 08:19:31 UTC (rev 3898)
@@ -166,4 +166,48 @@
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
+
+
+ <xs:complexType name="PathComponent">
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="status" type="xs:int" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="Container">
+ <xs:sequence>
+ <xs:element name="container" type="ng:PathComponent" />
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="DocumentType">
+ <xs:complexContent>
+ <xs:extension base="ng:Container">
+ <xs:sequence>
+ <xs:element name="documentType" type="ng:PathComponent" />
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="Document">
+ <xs:complexContent>
+ <xs:extension base="ng:DocumentType">
+ <xs:sequence>
+ <xs:element name="document" type="ng:PathComponent" />
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="Version">
+ <xs:complexContent>
+ <xs:extension base="ng:Document">
+ <xs:sequence>
+ <xs:element name="version" type="ng:PathComponent" />
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="Ver" type="ng:Version"/>
</xs:schema>
Modified: trunk/jaxme/jaxme/src/test/jaxb/types.xsd
===================================================================
--- trunk/jaxme/jaxme/src/test/jaxb/types.xsd 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/test/jaxb/types.xsd 2007-07-21 08:19:31 UTC (rev 3898)
@@ -346,4 +346,14 @@
</xs:attribute>
</xs:complexType>
</xs:element>
+
+ <xs:element name="QNameListTest">
+ <xs:complexType>
+ <xs:attribute name="qnames" use="optional">
+ <xs:simpleType>
+ <xs:list itemType="xs:QName"/>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
</xs:schema>
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSComplexType.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSComplexType.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSComplexType.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -17,6 +17,7 @@
package org.apache.ws.jaxme.xs;
import org.apache.ws.jaxme.xs.xml.*;
+import org.xml.sax.SAXException;
/** <p>Details of a complex type.</p>
@@ -50,7 +51,7 @@
* @see #isElementOnly()
* @see #isMixed()
*/
- public XsComplexContentType getComplexContentType();
+ public XsComplexContentType getComplexContentType() throws SAXException;
/** <p>If the element hasn't simple content: Returns whether the
* elements content is empty. Shortcut for
@@ -59,7 +60,7 @@
* complex content
* @see XsComplexContentType#EMPTY
*/
- public boolean isEmpty();
+ public boolean isEmpty() throws SAXException;
/** <p>If the element hasn't simple content: Returns whether the
* elements content is elementOnly. Shortcut for
@@ -68,7 +69,7 @@
* complex content
* @see XsComplexContentType#ELEMENT_ONLY
*/
- public boolean isElementOnly();
+ public boolean isElementOnly() throws SAXException;
/** <p>If the element hasn't simple content: Returns whether the
* elements content is mixed. Shortcut for
@@ -77,26 +78,26 @@
* complex content
* @see XsComplexContentType#MIXED
*/
- public boolean isMixed();
+ public boolean isMixed() throws SAXException;
/** <p>If the element hasn't simple content: Returns the complex
* elements particle.</p>
* @throws IllegalStateException The element has simple content
*/
- public XSParticle getParticle();
+ public XSParticle getParticle() throws SAXException;
/** <p>Returns the complex types attributes.</p>
*/
- public XSAttributable[] getAttributes();
+ public XSAttributable[] getAttributes() throws SAXException;
/** <p>Returns whether the element is a extension of another element.</p>
*/
- public boolean isExtension();
+ public boolean isExtension() throws SAXException;
/** <p>If the element is an extension: Returns the extended type.</p>
* @throws IllegalStateException The element is no extension.
*/
- public XSType getExtendedType();
+ public XSType getExtendedType() throws SAXException;
/** <p>Returns whether the element is a restriction of another element.</p>
*/
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSElement.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSElement.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSElement.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -96,4 +96,9 @@
* Fetch all of the keyref's declared by this element.
*/
public XSKeyRef[] getKeyRefs();
+
+ /**
+ * Returns, whether the element is created by referencing another element.
+ */
+ public boolean isReference();
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSParser.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSParser.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/XSParser.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -16,8 +16,11 @@
*/
package org.apache.ws.jaxme.xs;
+import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
@@ -26,6 +29,7 @@
import org.apache.ws.jaxme.xs.parser.XSContext;
import org.apache.ws.jaxme.xs.parser.XsSAXParser;
import org.apache.ws.jaxme.xs.parser.impl.XSContextImpl;
+import org.apache.ws.jaxme.xs.util.LoggingContentHandler;
import org.apache.ws.jaxme.xs.xml.XsESchema;
import org.apache.ws.jaxme.xs.xml.XsObjectFactory;
import org.w3c.dom.Node;
@@ -37,7 +41,7 @@
/** <p>The XML schema parser.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: XSParser.java 232099 2005-04-27 19:42:55Z jochen $
+ * @version $Id: XSParser.java 437259 2006-08-27 00:25:00Z jochen $
*/
public class XSParser {
/** <p>The XML Schema URI: <code>http://www.w3.org/2001/XMLSchema</code></p>
@@ -116,18 +120,36 @@
* representation.</p>
* @see #parse(InputSource)
*/
- public XsESchema parseSyntax(InputSource pSource) throws ParserConfigurationException, SAXException, IOException {
+ public XsESchema parseSyntax(final InputSource pSource) throws ParserConfigurationException, SAXException, IOException {
XSContext context = getContext();
parser.set(this);
+ FileOutputStream fos = null;
try {
XsObjectFactory factory = context.getXsObjectFactory();
XsSAXParser xsSAXParser = factory.newXsSAXParser();
context.setCurrentContentHandler(xsSAXParser);
XMLReader xr = factory.newXMLReader(isValidating());
+ String logDir = System.getProperty("org.apache.ws.jaxme.xs.logDir");
+ if (logDir != null) {
+ File tmpFile = File.createTempFile("jaxmexs", ".xsd", new File(logDir));
+ fos = new FileOutputStream(tmpFile);
+ LoggingContentHandler lch = new LoggingContentHandler(fos);
+ lch.setParent(xr);
+ xr = lch;
+ String msg = "Read from " + pSource.getPublicId() + ", " + pSource.getSystemId() + " at " + new Date();
+ lch.comment(msg.toCharArray(), 0, msg.length());
+ }
xr.setContentHandler(xsSAXParser);
xr.parse(pSource);
+ if (fos != null) {
+ fos.close();
+ fos = null;
+ }
return (XsESchema) xsSAXParser.getBean();
- } finally {
+ } finally {
+ if (fos != null) {
+ try { fos.close(); } catch (Throwable ignore) {}
+ }
context.setCurrentContentHandler(null);
parser.set(null);
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/DOMSerializer.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/DOMSerializer.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/DOMSerializer.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -33,7 +33,7 @@
* JaxMe.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: DOMSerializer.java 231934 2004-08-27 01:03:17Z jochen $
+ * @version $Id: DOMSerializer.java 231934 2004-08-27 03:03:17 +0200 (Fri, 27 Aug 2004) jochen $
*/
public class DOMSerializer {
private boolean namespaceDeclarationAttribute;
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSElementImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSElementImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSElementImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -67,7 +67,7 @@
return (XsTElement) getXsObject();
}
- protected boolean isReference() {
+ public boolean isReference() {
return getXsTElement().getRef() != null;
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSLogicalParser.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -17,10 +17,12 @@
package org.apache.ws.jaxme.xs.impl;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -39,6 +41,7 @@
import org.apache.ws.jaxme.xs.parser.XSContext;
import org.apache.ws.jaxme.xs.parser.XsSAXParser;
import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.util.LoggingContentHandler;
import org.apache.ws.jaxme.xs.xml.XsAnyURI;
import org.apache.ws.jaxme.xs.xml.XsEAnnotation;
import org.apache.ws.jaxme.xs.xml.XsEImport;
@@ -60,11 +63,13 @@
import org.apache.ws.jaxme.xs.xml.XsTSimpleExplicitGroup;
import org.apache.ws.jaxme.xs.xml.XsTTopLevelElement;
import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.LocatorImpl;
/** <p>Implementation of a logical parser.</p>
@@ -283,7 +288,51 @@
parseSyntax(pLocator, pSchemaLocation, result);
return result;
}
-
+
+ private void runContentHandler(XMLReader pReader, ContentHandler pHandler, InputSource pSource)
+ throws SAXException, IOException {
+ String logDir = System.getProperty("org.apache.ws.jaxme.xs.logDir");
+ FileOutputStream fos = null;
+ try {
+ SchemaTransformer transformer = getData().getXSObjectFactory().getSchemaTransformer();
+ if (transformer != null) {
+ transformer.parse(pSource, pReader);
+ final InputSource newSource = transformer.getTransformedInputSource();
+ newSource.setSystemId(pSource.getSystemId());
+ newSource.setPublicId(pSource.getPublicId());
+ pSource = newSource;
+ pReader = transformer.getTransformedXMLReader();
+ }
+ if (logDir != null) {
+ File tmpFile = File.createTempFile("jaxmexs", ".xsd", new File(logDir));
+ fos = new FileOutputStream(tmpFile);
+ LoggingContentHandler lch = new LoggingContentHandler(fos);
+ lch.setParent(pReader);
+ pReader = lch;
+ String msg = "Read from " + pSource.getPublicId() + ", " + pSource.getSystemId() + " at " + new Date();
+ lch.comment(msg.toCharArray(), 0, msg.length());
+ }
+ pReader.setContentHandler(pHandler);
+ LocatorImpl loc = new LocatorImpl();
+ loc.setSystemId(pSource.getSystemId());
+ loc.setPublicId(pSource.getPublicId());
+ loc.setLineNumber(-1);
+ loc.setColumnNumber(-1);
+ pHandler.setDocumentLocator(loc);
+ pReader.parse(pSource);
+ if (fos != null) {
+ fos.close();
+ fos = null;
+ }
+ } catch (ParserConfigurationException e) {
+ throw new SAXException(e);
+ } finally {
+ if (fos != null) {
+ try { fos.close(); } catch (Throwable ignore) {}
+ }
+ }
+ }
+
protected void parseSyntax(Locator pLocator, String pSchemaLocation,
XsESchema pSchema)
throws SAXException, IOException, ParserConfigurationException {
@@ -305,8 +354,7 @@
addSyntaxSchema(pSchema);
try {
data.setCurrentContentHandler(xsSAXParser);
- xr.setContentHandler(xsSAXParser);
- xr.parse(schemaSource);
+ runContentHandler(xr, xsSAXParser, schemaSource);
} finally {
removeSyntaxSchema();
}
@@ -394,15 +442,15 @@
/** <p>Handles xs:include.</p>
*/
protected void includeSchema(XsESchema pIncludingSchema,
- XsEInclude pInclude)
+ XsEInclude pInclude, Locator pLocator,
+ String pSchemaLocation)
throws SAXException, IOException, ParserConfigurationException {
final XsAnyURI schemaLocation = pInclude.getSchemaLocation();
if (schemaLocation == null) {
throw new LocSAXException("Invalid include: Missing 'schemaLocation' attribute.",
pInclude.getLocator());
}
- Locator locator = pInclude.getLocator();
- XsESchema includedSchema = parseSyntax(locator, schemaLocation.toString());
+ XsESchema includedSchema = parseSyntax(pLocator, schemaLocation.toString());
XsAnyURI incNamespace = includedSchema.getTargetNamespace();
if (incNamespace == null) {
if (pIncludingSchema.getTargetNamespace() != null) {
@@ -417,7 +465,7 @@
pInclude.getLocator());
}
}
- parse(includedSchema, schemaLocation.toString());
+ parse(includedSchema, pSchemaLocation);
}
private void checkValidImportSchema(XsESchema pImportingSchema, String pNamespace,
@@ -493,7 +541,7 @@
XsESchema importedSchema = parseSyntax(pNode);
importSchema(pImportingSchema, pNamespace, importedSchema, null, pSchemaLocation);
}
-
+
/** <p>Parses the given {@link InputSource} syntactically and
* converts the objects that it finds into logical objects.
* These logical objects are added to the given {@link XSSchema}.</p>
@@ -520,11 +568,15 @@
addSyntaxSchema(pSyntaxSchema);
try {
Object[] childs = pSyntaxSchema.getChilds();
-
+
for (int i = 0; i < childs.length; i++) {
Object o = childs[i];
if (o instanceof XsEInclude) {
- includeSchema(pSyntaxSchema, (XsEInclude) o);
+ XsEInclude xsEInclude = (XsEInclude) o;
+ XsAnyURI schemaLocation = xsEInclude.getSchemaLocation();
+ includeSchema(pSyntaxSchema, xsEInclude,
+ getImportLocator(xsEInclude, pSchemaLocation),
+ schemaLocation == null ? null : schemaLocation.toString());
} else if (o instanceof XsERedefine) {
redefineSchema(pSyntaxSchema, (XsERedefine) o);
} else if (o instanceof XsEImport) {
@@ -533,7 +585,7 @@
XsAnyURI schemaLocation = xsEImport.getSchemaLocation();
importSchema(pSyntaxSchema, namespace == null ? null : namespace.toString(),
schemaLocation == null ? null : schemaLocation.toString(),
- xsEImport.getLocator());
+ getImportLocator(xsEImport, pSchemaLocation));
} else {
add(pSyntaxSchema, childs[i]);
}
@@ -542,20 +594,30 @@
removeSyntaxSchema();
}
}
+
+ private Locator getImportLocator(XsObject pObject, String pSchemaLocation) {
+ Locator result = pObject.getLocator();
+ if (result == null && pSchemaLocation != null) {
+ LocatorImpl loc = new LocatorImpl();
+ loc.setSystemId(pSchemaLocation);
+ result = loc;
+ }
+ return result;
+ }
private static class SubstitutionGroup {
private final List members = new ArrayList();
private final XSElement head;
- public SubstitutionGroup(XSElement pHead) {
+ SubstitutionGroup(XSElement pHead) {
head = pHead;
}
- public XSElement getHead() { return head; }
- public XSElement[] getMembers() {
+ XSElement getHead() { return head; }
+ XSElement[] getMembers() {
return (XSElement[]) members.toArray(new XSElement[members.size()]);
}
- public void addMember(XSElement pElement) {
+ void addMember(XSElement pElement) {
members.add(pElement);
}
}
@@ -655,18 +717,11 @@
* @see #getXSContentHandler()
*/
public XSSchema parse(InputSource pSource)
- throws ParserConfigurationException, SAXException, IOException {
+ throws ParserConfigurationException, SAXException, IOException {
XSContentHandler contentHandler = getXSContentHandler(pSource.getSystemId());
XSContext data = getData();
XMLReader xr = data.getXsObjectFactory().newXMLReader(isValidating());
- xr.setContentHandler(contentHandler);
- SchemaTransformer transformer = data.getXSObjectFactory().getSchemaTransformer();
- if (transformer != null) {
- transformer.parse(pSource, xr);
- pSource = transformer.getTransformedInputSource();
- xr = transformer.getTransformedXMLReader();
- }
- xr.parse(pSource);
+ runContentHandler(xr, contentHandler, pSource);
return getSchema();
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -44,7 +44,7 @@
public abstract class XSComplexTypeImpl implements XSComplexType {
protected final XSType owner;
private final XsTComplexType myComplexType;
- protected XSType extendedType, restrictedType;
+ protected XSType restrictedType;
public XSComplexTypeImpl(XSType pOwner, XsTComplexType pType) {
owner = pOwner;
@@ -62,20 +62,17 @@
throw new IllegalStateException("This complex type doesn't have simple content.");
}
public boolean hasComplexContent() { return false; }
- public boolean isEmpty() { return XsComplexContentType.EMPTY.equals(getComplexContentType()); }
- public boolean isElementOnly() { return XsComplexContentType.ELEMENT_ONLY.equals(getComplexContentType()); }
- public boolean isMixed() { return XsComplexContentType.MIXED.equals(getComplexContentType()); }
+ public boolean isEmpty() throws SAXException { return XsComplexContentType.EMPTY.equals(getComplexContentType()); }
+ public boolean isElementOnly() throws SAXException { return XsComplexContentType.ELEMENT_ONLY.equals(getComplexContentType()); }
+ public boolean isMixed() throws SAXException { return XsComplexContentType.MIXED.equals(getComplexContentType()); }
public void validate() throws SAXException {
}
- public boolean isExtension() { return extendedType != null; }
- public XSType getExtendedType() {
- if (extendedType == null) {
+ public boolean isExtension() throws SAXException { return false; }
+ public XSType getExtendedType() throws SAXException {
throw new IllegalStateException("This type is no extension.");
- }
- return extendedType;
}
public boolean isRestriction() { return restrictedType != null; }
@@ -91,12 +88,24 @@
private final XsESimpleContent simpleContent;
private final XSSimpleContentType simpleContentType;
private final XSAttributable[] attributes;
+ private final XSType extendedType;
public boolean isElementOnly() { return false; }
public boolean isEmpty() { return false; }
public boolean isMixed() { return false; }
- public XSSimpleContentImpl(XSType pOwner, XsTComplexType pType, XsESimpleContent pSimpleContent)
+ public XSType getExtendedType() throws SAXException {
+ if (extendedType == null) {
+ super.getExtendedType();
+ }
+ return extendedType;
+ }
+
+ public boolean isExtension() throws SAXException {
+ return extendedType != null;
+ }
+
+ public XSSimpleContentImpl(XSType pOwner, XsTComplexType pType, XsESimpleContent pSimpleContent)
throws SAXException {
super(pOwner, pType);
simpleContent = pSimpleContent;
@@ -169,201 +178,261 @@
}
}
- public class XSComplexContentImpl extends XSComplexTypeImpl {
- private final XsEComplexContent complexContent;
- private final XSParticle complexContentParticle;
- private final XsComplexContentType complexContentType;
- private final XSAttributable[] attributes;
+ public class XSComplexContentImpl extends XSComplexTypeImpl {
+ private final XsEComplexContent complexContent;
+ private final XSType owner;
+ private boolean complexContentInitialized;
+ private XSParticle complexContentParticle2;
+ private XsComplexContentType complexContentType2;
+ private XSAttributable[] attributes2;
+ private XSType extendedType;
- protected XsEComplexContent getComplexContent() {
- return complexContent;
- }
+ protected XsEComplexContent getComplexContent() {
+ return complexContent;
+ }
- protected XSGroup getGroupByParticle(XsTTypeDefParticle pParticle) throws SAXException {
- XSGroup result;
- XSType myOwner = getOwner();
- XSObjectFactory factory = myOwner.getXSSchema().getXSObjectFactory();
- if (pParticle == null) {
- return null;
- } else if (pParticle instanceof XsEChoice) {
- XsEChoice choice = (XsEChoice) pParticle;
- result = factory.newXSGroup(myOwner, choice);
- } else if (pParticle instanceof XsESequence) {
- XsESequence sequence = (XsESequence) pParticle;
- result = factory.newXSGroup(myOwner, sequence);
- } else if (pParticle instanceof XsTAll) {
- XsTAll all = (XsTAll) pParticle;
- result = factory.newXSGroup(myOwner, all);
- } else if (pParticle instanceof XsTGroupRef) {
- XsTGroupRef groupRef = (XsTGroupRef) pParticle;
- result = factory.newXSGroup(myOwner, groupRef);
- } else {
- throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
- }
- result.validate();
- return result;
- }
+ private int getMinOccursByParticle(XsTTypeDefParticle pParticle) throws SAXException {
+ if (pParticle instanceof XsEChoice) {
+ return ((XsEChoice) pParticle).getMinOccurs();
+ } else if (pParticle instanceof XsESequence) {
+ return ((XsESequence) pParticle).getMinOccurs();
+ } else if (pParticle instanceof XsTAll) {
+ return ((XsTAll) pParticle).getMinOccurs();
+ } else if (pParticle instanceof XsTGroupRef) {
+ return ((XsTGroupRef) pParticle).getMinOccurs();
+ } else {
+ throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+ }
+ }
- protected XsComplexContentType getContentTypeByParticle(XsTTypeDefParticle pParticle, XSGroup pGroup)
- throws SAXException {
- if (pParticle == null) {
- return XsComplexContentType.EMPTY;
- } else if (pParticle instanceof XsEChoice) {
- if (pGroup.getParticles().length == 0) {
- XsEChoice choice = (XsEChoice) pParticle;
- if (choice.getMinOccurs() == 0) {
- return XsComplexContentType.EMPTY;
- } else {
- throw new LocSAXException("Invalid choice: Neither child elements, nor 'minOccurs'=0", choice.getLocator());
- }
- } else {
+ private int getMaxOccursByParticle(XsTTypeDefParticle pParticle) throws SAXException {
+ if (pParticle instanceof XsEChoice) {
+ return ((XsEChoice) pParticle).getMaxOccurs();
+ } else if (pParticle instanceof XsESequence) {
+ return ((XsESequence) pParticle).getMaxOccurs();
+ } else if (pParticle instanceof XsTAll) {
+ return ((XsTAll) pParticle).getMaxOccurs();
+ } else if (pParticle instanceof XsTGroupRef) {
+ return ((XsTGroupRef) pParticle).getMaxOccurs();
+ } else {
+ throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+ }
}
- } else if (pParticle instanceof XsESequence) {
- if (pGroup.getParticles().length == 0) {
- return XsComplexContentType.EMPTY;
+
+ protected XSGroup getGroupByParticle(XsTTypeDefParticle pParticle) throws SAXException {
+ XSGroup result;
+ XSType myOwner = getOwner();
+ XSObjectFactory factory = myOwner.getXSSchema().getXSObjectFactory();
+ if (pParticle == null) {
+ return null;
+ } else if (pParticle instanceof XsEChoice) {
+ XsEChoice choice = (XsEChoice) pParticle;
+ result = factory.newXSGroup(myOwner, choice);
+ } else if (pParticle instanceof XsESequence) {
+ XsESequence sequence = (XsESequence) pParticle;
+ result = factory.newXSGroup(myOwner, sequence);
+ } else if (pParticle instanceof XsTAll) {
+ XsTAll all = (XsTAll) pParticle;
+ result = factory.newXSGroup(myOwner, all);
+ } else if (pParticle instanceof XsTGroupRef) {
+ XsTGroupRef groupRef = (XsTGroupRef) pParticle;
+ result = factory.newXSGroup(myOwner, groupRef);
+ } else {
+ throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+ }
+ result.validate();
+ return result;
}
- } else if (pParticle instanceof XsTAll) {
- if (pGroup.getParticles().length == 0) {
- return XsComplexContentType.EMPTY;
+
+ protected XsComplexContentType getContentTypeByParticle(XsTTypeDefParticle pParticle, XSGroup pGroup)
+ throws SAXException {
+ if (pParticle == null) {
+ return XsComplexContentType.EMPTY;
+ } else if (pParticle instanceof XsEChoice) {
+ if (pGroup.getParticles().length == 0) {
+ XsEChoice choice = (XsEChoice) pParticle;
+ if (choice.getMinOccurs() == 0) {
+ return XsComplexContentType.EMPTY;
+ } else {
+ throw new LocSAXException("Invalid choice: Neither child elements, nor 'minOccurs'=0", choice.getLocator());
+ }
+ } else {
+ }
+ } else if (pParticle instanceof XsESequence) {
+ if (pGroup.getParticles().length == 0) {
+ return XsComplexContentType.EMPTY;
+ }
+ } else if (pParticle instanceof XsTAll) {
+ if (pGroup.getParticles().length == 0) {
+ return XsComplexContentType.EMPTY;
+ }
+ } else if (pParticle instanceof XsTGroupRef) {
+ } else {
+ throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
+ }
+ boolean isMixed;
+ if (complexContent.isMixed() == null) {
+ isMixed = ((XsTComplexType) getXsObject()).isMixed();
+ } else {
+ isMixed = complexContent.isMixed().booleanValue();
+ }
+ return isMixed ? XsComplexContentType.MIXED : XsComplexContentType.ELEMENT_ONLY;
}
- } else if (pParticle instanceof XsTGroupRef) {
- } else {
- throw new IllegalStateException("Unknown TypeDefParticle type: " + pParticle.getClass().getName());
- }
- boolean isMixed;
- if (complexContent.isMixed() == null) {
- isMixed = ((XsTComplexType) getXsObject()).isMixed();
- } else {
- isMixed = complexContent.isMixed().booleanValue();
- }
- return isMixed ? XsComplexContentType.MIXED : XsComplexContentType.ELEMENT_ONLY;
- }
- private class ExtensionGroup implements XSGroup {
- private final XSObject parent;
- private final XSParticle[] particles;
- private ExtensionGroup(XSObject pParent, XSParticle[] pParticles) {
- parent = pParent;
- particles = pParticles;
- }
- public boolean isTopLevelObject() { return false; }
- public boolean isGlobal() { return false; }
- public XsQName getName() { return null; }
- public XSSchema getXSSchema() { return XSTypeImpl.this.getXSSchema(); }
- public Locator getLocator() { return getComplexContent().getLocator(); }
- public XSObjectFactory getXSObjectFactory() { return getXSObjectFactory(); }
- public void validate() throws SAXException {}
- public XSModelGroup.Compositor getCompositor() { return XSModelGroup.SEQUENCE; }
- public boolean isSequence() { return true; }
- public boolean isChoice() { return false; }
- public boolean isAll() { return false; }
- public XSParticle[] getParticles() { return particles; }
- public XSAnnotation[] getAnnotations() { return new XSAnnotation[0]; }
- public void setGlobal(boolean pGlobal) {
- if (pGlobal) {
- throw new IllegalStateException("An extensions model group cannot be made global.");
+ private class ExtensionGroup implements XSGroup {
+ private final XSObject parent;
+ private final XSParticle[] particles;
+ private ExtensionGroup(XSObject pParent, XSParticle[] pParticles) {
+ parent = pParent;
+ particles = pParticles;
+ }
+ public boolean isTopLevelObject() { return false; }
+ public boolean isGlobal() { return false; }
+ public XsQName getName() { return null; }
+ public XSSchema getXSSchema() { return XSTypeImpl.this.getXSSchema(); }
+ public Locator getLocator() { return getComplexContent().getLocator(); }
+ public void validate() throws SAXException {}
+ public XSModelGroup.Compositor getCompositor() { return XSModelGroup.SEQUENCE; }
+ public boolean isSequence() { return true; }
+ public boolean isChoice() { return false; }
+ public boolean isAll() { return false; }
+ public XSParticle[] getParticles() { return particles; }
+ public XSAnnotation[] getAnnotations() { return new XSAnnotation[0]; }
+ public void setGlobal(boolean pGlobal) {
+ if (pGlobal) {
+ throw new IllegalStateException("An extensions model group cannot be made global.");
+ }
+ }
+ public XSObject getParentObject() { return parent; }
+ public Attributes getOpenAttributes() { return null; }
}
- }
- public XSObject getParentObject() { return parent; }
- public Attributes getOpenAttributes() { return null; }
- }
- public XSComplexContentImpl(XSType pOwner, XsTComplexType pType, XsEComplexContent pComplexContent)
- throws SAXException {
- super(pOwner, pType);
- complexContent = pComplexContent;
- XsTExtensionType extension = complexContent.getExtension();
- if (extension == null) {
- XsTComplexRestrictionType restriction = complexContent.getRestriction();
- if (restriction == null) {
- // TODO: Restriction of the ur-type
- throw new LocSAXException("Neither of extension or restriction, aka restriction of the ur-type: Not implemented",
- complexContent.getLocator());
+ public XSComplexContentImpl(XSType pOwner, XsTComplexType pType, XsEComplexContent pComplexContent)
+ throws SAXException {
+ super(pOwner, pType);
+ complexContent = pComplexContent;
+ owner = pOwner;
}
- XsQName base = restriction.getBase();
- if (base == null) {
- throw new LocSAXException("Invalid 'restriction': Missing 'base' attribute", getLocator());
+
+ public XSType getExtendedType() throws SAXException {
+ initContent();
+ if (extendedType == null) {
+ super.getExtendedType();
+ }
+ return extendedType;
}
- XSType type = getXSSchema().getType(base);
- if (type == null) {
- throw new LocSAXException("Invalid 'restriction': Unknown base type " + base, getLocator());
+
+ public boolean isExtension() throws SAXException {
+ initContent();
+ return extendedType != null;
}
- if (type.isSimple()) {
- throw new LocSAXException("Invalid 'restriction': The base type " + getName() + " is simple.", getLocator());
+
+ public boolean hasComplexContent() { return true; }
+
+ private void initContent() throws SAXException {
+ if (complexContentInitialized) {
+ return;
+ }
+ XsTExtensionType extension = complexContent.getExtension();
+ if (extension == null) {
+ XsTComplexRestrictionType restriction = complexContent.getRestriction();
+ if (restriction == null) {
+ // TODO: Restriction of the ur-type
+ throw new LocSAXException("Neither of extension or restriction, aka restriction of the ur-type: Not implemented",
+ complexContent.getLocator());
+ }
+ XsQName base = restriction.getBase();
+ if (base == null) {
+ throw new LocSAXException("Invalid 'restriction': Missing 'base' attribute", getLocator());
+ }
+ XSType type = getXSSchema().getType(base);
+ if (type == null) {
+ throw new LocSAXException("Invalid 'restriction': Unknown base type " + base, getLocator());
+ }
+ if (type.isSimple()) {
+ throw new LocSAXException("Invalid 'restriction': The base type " + getName() + " is simple.", getLocator());
+ }
+ XsTTypeDefParticle particle = restriction.getTypeDefParticle();
+
+ XSGroup group = getGroupByParticle(particle);
+ if (group == null) {
+ // TODO: Restriction of the ur-type
+ complexContentParticle2 = null;
+ } else {
+ complexContentParticle2 = new XSParticleImpl(group);
+ }
+ complexContentType2 = getContentTypeByParticle(particle, group);
+ attributes2 = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, restriction);
+ restrictedType = type;
+ } else {
+ XsQName base = extension.getBase();
+ if (base == null) {
+ throw new LocSAXException("Invalid 'extension': Missing 'base' attribute", getLocator());
+ }
+ XSType type = getXSSchema().getType(base);
+ if (type == null) {
+ throw new LocSAXException("Invalid 'extension': Unknown base type " + base, getLocator());
+ }
+ if (type.isSimple()) {
+ throw new LocSAXException("Invalid 'extension': The base type " + base + " is simple.", getLocator());
+ }
+ XSComplexType extendedComplexType = type.getComplexType();
+ if (extendedComplexType.hasSimpleContent()) {
+ throw new LocSAXException("Invalid 'extension': The base type " + base + " has simple content.",
+ getLocator());
+ }
+ XsTTypeDefParticle particle = extension.getTypeDefParticle();
+
+ XSGroup group = getGroupByParticle(particle);
+ XsComplexContentType groupType = getContentTypeByParticle(particle, group);
+ if (XsComplexContentType.EMPTY.equals(groupType)) {
+ if (type == XSAnyType.getInstance()) {
+ complexContentType2 = null;
+ complexContentParticle2 = null;
+ } else {
+ complexContentType2 = extendedComplexType.getComplexContentType();
+ complexContentParticle2 = extendedComplexType.getParticle();
+ }
+ } else if (extendedComplexType.isEmpty()) {
+ complexContentType2 = groupType;
+ XSParticleImpl particleImpl = new XSParticleImpl(group);
+ particleImpl.setMinOccurs(getMinOccursByParticle(particle));
+ particleImpl.setMaxOccurs(getMaxOccursByParticle(particle));
+ complexContentParticle2 = particleImpl;
+ } else {
+ XSGroup sequenceGroup = new ExtensionGroup(owner, new XSParticle[]{extendedComplexType.getParticle(), new XSParticleImpl(group)});
+ complexContentParticle2 = new XSParticleImpl(sequenceGroup);
+ complexContentType2 = groupType;
+ }
+
+ XSAttributable[] inheritedAttributes = extendedComplexType.getAttributes();
+ XSAttributable[] myAttributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, extension);
+ attributes2 = new XSAttributable[inheritedAttributes.length + myAttributes.length];
+ System.arraycopy(inheritedAttributes, 0, attributes2, 0, inheritedAttributes.length);
+ System.arraycopy(myAttributes, 0, attributes2, inheritedAttributes.length, myAttributes.length);
+ extendedType = type;
+ }
+
+ complexContentInitialized = true;
}
- XsTTypeDefParticle particle = restriction.getTypeDefParticle();
- XSGroup group = getGroupByParticle(particle);
- if (group == null) {
- // TODO: Restriction of the ur-type
- complexContentParticle = null;
- } else {
- complexContentParticle = new XSParticleImpl(group);
+ public XsComplexContentType getComplexContentType() throws SAXException {
+ initContent();
+ return complexContentType2;
}
- complexContentType = getContentTypeByParticle(particle, group);
- attributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, restriction);
- restrictedType = type;
- } else {
- XsQName base = extension.getBase();
- if (base == null) {
- throw new LocSAXException("Invalid 'extension': Missing 'base' attribute", getLocator());
+
+ public XSParticle getParticle() throws SAXException {
+ initContent();
+ return complexContentParticle2;
}
- XSType type = getXSSchema().getType(base);
- if (type == null) {
- throw new LocSAXException("Invalid 'extension': Unknown base type " + base, getLocator());
- }
- if (type.isSimple()) {
- throw new LocSAXException("Invalid 'extension': The base type " + base + " is simple.", getLocator());
- }
- XSComplexType extendedComplexType = type.getComplexType();
- if (extendedComplexType.hasSimpleContent()) {
- throw new LocSAXException("Invalid 'extension': The base type " + base + " has simple content.",
- getLocator());
- }
- XsTTypeDefParticle particle = extension.getTypeDefParticle();
- XSGroup group = getGroupByParticle(particle);
- XsComplexContentType groupType = getContentTypeByParticle(particle, group);
- if (XsComplexContentType.EMPTY.equals(groupType)) {
- if (type == XSAnyType.getInstance()) {
- complexContentType = null;
- complexContentParticle = null;
- } else {
- complexContentType = extendedComplexType.getComplexContentType();
- complexContentParticle = extendedComplexType.getParticle();
- }
- } else if (extendedComplexType.isEmpty()) {
- complexContentType = groupType;
- complexContentParticle = new XSParticleImpl(group);
- } else {
- XSGroup sequenceGroup = new ExtensionGroup(pOwner, new XSParticle[]{extendedComplexType.getParticle(), new XSParticleImpl(group)});
- complexContentParticle = new XSParticleImpl(sequenceGroup);
- complexContentType = groupType;
+ public XSAttributable[] getAttributes() throws SAXException {
+ initContent();
+ return attributes2;
}
-
- XSAttributable[] inheritedAttributes = extendedComplexType.getAttributes();
- XSAttributable[] myAttributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, extension);
- attributes = new XSAttributable[inheritedAttributes.length + myAttributes.length];
- System.arraycopy(inheritedAttributes, 0, attributes, 0, inheritedAttributes.length);
- System.arraycopy(myAttributes, 0, attributes, inheritedAttributes.length, myAttributes.length);
- extendedType = type;
- }
}
- public boolean hasComplexContent() { return true; }
- public XsComplexContentType getComplexContentType() {
- return complexContentType;
- }
-
- public XSParticle getParticle() {
- return complexContentParticle;
- }
-
- public XSAttributable[] getAttributes() { return attributes; }
- }
-
-
public abstract class XSBasicComplexTypeImpl extends XSComplexTypeImpl {
private final XSAttributable[] attributes;
private XSParticle particle;
@@ -615,121 +684,125 @@
}
public void validate() throws SAXException {
- if (isValidated()) {
- return;
- } else {
- isValidated = true;
- }
+ if (isValidated()) {
+ return;
+ } else {
+ isValidated = true;
+ }
- if (xsAnnotation == null) {
- annotations = new XSAnnotation[0];
- } else {
- XSAnnotation result = getXSSchema().getXSObjectFactory().newXSAnnotation(this, xsAnnotation);
- result.validate();
- annotations = new XSAnnotation[]{result};
- }
+ if (xsAnnotation == null) {
+ annotations = new XSAnnotation[0];
+ } else {
+ XSAnnotation result = getXSSchema().getXSObjectFactory().newXSAnnotation(this, xsAnnotation);
+ result.validate();
+ annotations = new XSAnnotation[]{result};
+ }
- if (isSimple()) {
- XSSimpleType mySimpleType;
- Object baseObject = getXsObject();
- if (baseObject instanceof XsTSimpleType) {
- XsTSimpleType myXsTSimpleType = (XsTSimpleType) baseObject;
- XsEList list = myXsTSimpleType.getList();
- if (list == null) {
- XsEUnion union = myXsTSimpleType.getUnion();
- if (union == null) {
- XsERestriction restriction = myXsTSimpleType.getRestriction();
- if (restriction == null) {
- throw new LocSAXException("Either of the 'list', 'union', or 'restriction' child elements must be set.",
- myXsTSimpleType.getLocator());
- }
- XsQName myName = restriction.getBase();
- XSType restrictedType;
- if (myName == null) {
- XsTLocalSimpleType baseType = restriction.getSimpleType();
- if (baseType == null) {
- throw new LocSAXException("Neither the 'base' attribute nor an inner 'simpleType' element are present",
- restriction.getLocator());
- } else {
- restrictedType = getXSSchema().getXSObjectFactory().newXSType(this, baseType);
- }
- } else {
- restrictedType = getXSSchema().getType(myName);
- if (restrictedType == null) {
- throw new LocSAXException("Unknown base type: " + myName,
- restriction.getLocator());
- }
- }
- restrictedType.validate();
- if (!restrictedType.isSimple()) {
- throw new LocSAXException("The restricted type " + myName + " is complex.",
- restriction.getLocator());
- }
- XSSimpleType baseType = restrictedType.getSimpleType();
- if (baseType.isAtomic()) {
- mySimpleType = getXSSchema().getXSObjectFactory().newXSAtomicType(this, restrictedType, restriction);
- } else if (baseType.isList()) {
- mySimpleType = getXSSchema().getXSObjectFactory().newXSListType(this, restrictedType, restriction);
- } else if (baseType.isUnion()) {
- mySimpleType = getXSSchema().getXSObjectFactory().newXSUnionType(this, restrictedType, restriction);
- } else {
- throw new LocSAXException("Unknown restriction type: " + baseType, restriction.getLocator());
- }
- } else {
- mySimpleType = getXSSchema().getXSObjectFactory().newXSUnionType(this, union);
- }
- } else {
- mySimpleType = getXSSchema().getXSObjectFactory().newXSListType(this, list);
- }
+ if (isSimple()) {
+ XSSimpleType mySimpleType;
+ Object baseObject = getXsObject();
+ if (baseObject instanceof XsTSimpleType) {
+ XsTSimpleType myXsTSimpleType = (XsTSimpleType) baseObject;
+ XsEList list = myXsTSimpleType.getList();
+ if (list == null) {
+ XsEUnion union = myXsTSimpleType.getUnion();
+ if (union == null) {
+ XsERestriction restriction = myXsTSimpleType.getRestriction();
+ if (restriction == null) {
+ throw new LocSAXException("Either of the 'list', 'union', or 'restriction' child elements must be set.",
+ myXsTSimpleType.getLocator());
+ }
+ XsQName myName = restriction.getBase();
+ XSType restrictedType;
+ if (myName == null) {
+ XsTLocalSimpleType baseType = restriction.getSimpleType();
+ if (baseType == null) {
+ throw new LocSAXException("Neither the 'base' attribute nor an inner 'simpleType' element are present",
+ restriction.getLocator());
+ } else {
+ restrictedType = getXSSchema().getXSObjectFactory().newXSType(this, baseType);
+ }
+ } else {
+ restrictedType = getXSSchema().getType(myName);
+ if (restrictedType == null) {
+ throw new LocSAXException("Unknown base type: " + myName,
+ restriction.getLocator());
+ }
+ }
+ restrictedType.validate();
+ if (!restrictedType.isSimple()) {
+ throw new LocSAXException("The restricted type " + myName + " is complex.",
+ restriction.getLocator());
+ }
+ XSSimpleType baseType = restrictedType.getSimpleType();
+ if (baseType.isAtomic()) {
+ mySimpleType = getXSSchema().getXSObjectFactory().newXSAtomicType(this, restrictedType, restriction);
+ } else if (baseType.isList()) {
+ mySimpleType = getXSSchema().getXSObjectFactory().newXSListType(this, restrictedType, restriction);
+ } else if (baseType.isUnion()) {
+ mySimpleType = getXSSchema().getXSObjectFactory().newXSUnionType(this, restrictedType, restriction);
+ } else {
+ throw new LocSAXException("Unknown restriction type: " + baseType, restriction.getLocator());
+ }
+ } else {
+ mySimpleType = getXSSchema().getXSObjectFactory().newXSUnionType(this, union);
+ }
+ } else {
+ mySimpleType = getXSSchema().getXSObjectFactory().newXSListType(this, list);
+ }
+ }
+ else {
+ mySimpleType = getSimpleType();
+ }
+
+ this.simpleType = mySimpleType;
+ } else {
+ validateComplexType();
}
- else {
- mySimpleType = getSimpleType();
- }
-
- this.simpleType = mySimpleType;
- } else {
- XSComplexTypeImpl myComplexType;
- XsTComplexType myXsTComplexType = (XsTComplexType) getXsObject();
- XsESimpleContent simpleContent = myXsTComplexType.getSimpleContent();
- if (simpleContent == null) {
- XsEComplexContent complexContent = myXsTComplexType.getComplexContent();
- if (complexContent == null) {
- XsTTypeDefParticle particle = myXsTComplexType.getTypeDefParticle();
- if (particle == null) {
- myComplexType = new XSSequenceComplexTypeImpl(this, myXsTComplexType);
- } else if (particle instanceof XsESequence) {
- myComplexType = new XSSequenceComplexTypeImpl(this, myXsTComplexType, (XsESequence) particle);
- } else if (particle instanceof XsEChoice) {
- myComplexType = new XSChoiceComplexTypeImpl(this, myXsTComplexType, (XsEChoice) particle);
- } else if (particle instanceof XsTAll) {
- myComplexType = new XSAllComplexTypeImpl(this, myXsTComplexType, (XsTAll) particle);
- } else if (particle instanceof XsTGroupRef) {
- XsTGroupRef groupRef = (XsTGroupRef) particle;
- XsQName myName = groupRef.getRef();
- if (myName == null) {
- throw new LocSAXException("Missing 'ref' attribute", groupRef.getLocator());
+ }
+
+ private void validateComplexType() throws SAXException, LocSAXException {
+ XSComplexTypeImpl myComplexType;
+ XsTComplexType myXsTComplexType = (XsTComplexType) getXsObject();
+ XsESimpleContent simpleContent = myXsTComplexType.getSimpleContent();
+ if (simpleContent == null) {
+ XsEComplexContent complexContent = myXsTComplexType.getComplexContent();
+ if (complexContent == null) {
+ XsTTypeDefParticle particle = myXsTComplexType.getTypeDefParticle();
+ if (particle == null) {
+ myComplexType = new XSSequenceComplexTypeImpl(this, myXsTComplexType);
+ } else if (particle instanceof XsESequence) {
+ myComplexType = new XSSequenceComplexTypeImpl(this, myXsTComplexType, (XsESequence) particle);
+ } else if (particle instanceof XsEChoice) {
+ myComplexType = new XSChoiceComplexTypeImpl(this, myXsTComplexType, (XsEChoice) particle);
+ } else if (particle instanceof XsTAll) {
+ myComplexType = new XSAllComplexTypeImpl(this, myXsTComplexType, (XsTAll) particle);
+ } else if (particle instanceof XsTGroupRef) {
+ XsTGroupRef groupRef = (XsTGroupRef) particle;
+ XsQName myName = groupRef.getRef();
+ if (myName == null) {
+ throw new LocSAXException("Missing 'ref' attribute", groupRef.getLocator());
+ }
+ XSGroup group = getXSSchema().getGroup(myName);
+ if (group == null) {
+ throw new LocSAXException("Unknown group: " + myName, getLocator());
+ }
+ group.validate();
+ myComplexType = new XSGroupComplexTypeImpl(this, myXsTComplexType, group, groupRef);
+ } else {
+ throw new IllegalStateException("Invalid particle: " + particle.getClass().getName());
+ }
+ } else {
+ XSComplexContentImpl complexContentImpl = new XSComplexContentImpl(this, myXsTComplexType, complexContent);
+ myComplexType = complexContentImpl;
}
- XSGroup group = getXSSchema().getGroup(myName);
- if (group == null) {
- throw new LocSAXException("Unknown group: " + myName, getLocator());
- }
- group.validate();
- myComplexType = new XSGroupComplexTypeImpl(this, myXsTComplexType, group, groupRef);
- } else {
- throw new IllegalStateException("Invalid particle: " + particle.getClass().getName());
- }
} else {
- XSComplexContentImpl complexContentImpl = new XSComplexContentImpl(this, myXsTComplexType, complexContent);
- myComplexType = complexContentImpl;
+ XSSimpleContentImpl simpleContentImpl = new XSSimpleContentImpl(this, myXsTComplexType, simpleContent);
+ myComplexType = simpleContentImpl;
}
- } else {
- XSSimpleContentImpl simpleContentImpl = new XSSimpleContentImpl(this, myXsTComplexType, simpleContent);
- myComplexType = simpleContentImpl;
- }
- this.complexType = myComplexType;
- myComplexType.validate();
+ this.complexType = myComplexType;
+ myComplexType.validate();
}
- }
public XSSimpleType getSimpleType() throws SAXException {
validate();
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBClass.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -22,7 +22,7 @@
/** <p>This interface implements the JAXB class bindings.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBClass.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBClass.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JAXBClass extends XsObject {
/** <p>Returns the classes name, without the package. The package
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBGlobalBindings.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -22,7 +22,7 @@
/** <p>This interface implements the JAXB global bindings.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBGlobalBindings.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBGlobalBindings.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JAXBGlobalBindings {
/** <p>Enumeration class holding possible values for {@link JAXBGlobalBindings#getUnderscoreBinding()}.</p>
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavaType.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -23,7 +23,7 @@
/** <p>This interface implements the JAXB javaType bindings.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBJavaType.java 231996 2004-09-30 00:09:30Z jochen $
+ * @version $Id: JAXBJavaType.java 231996 2004-09-30 02:09:30 +0200 (Thu, 30 Sep 2004) jochen $
*/
public interface JAXBJavaType extends XsObject {
public interface JAXBGlobalJavaType extends JAXBJavaType {
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBJavadoc.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -23,7 +23,7 @@
* element.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBJavadoc.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBJavadoc.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JAXBJavadoc extends XsObject {
/** <p>Returns the text contained in the Javadoc element.</p>
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBProperty.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -22,7 +22,7 @@
/** <p>This interface implements the JAXB property bindings.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBProperty.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBProperty.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JAXBProperty extends XsObject {
public interface BaseType extends XsObject {
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBSchemaBindings.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -22,7 +22,7 @@
/** <p>This interface implements the JAXB schema bindings.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBSchemaBindings.java 231789 2004-02-22 00:52:34Z jochen $
+ * @version $Id: JAXBSchemaBindings.java 231789 2004-02-22 01:52:34 +0100 (Sun, 22 Feb 2004) jochen $
*/
public interface JAXBSchemaBindings {
/** <p>Configures the package that is used in this schema.</p>
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/JAXBTypesafeEnumClass.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -22,7 +22,7 @@
/** <p>This interface implements the JAXB typesafeEnumClass bindings.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBTypesafeEnumClass.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBTypesafeEnumClass.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public interface JAXBTypesafeEnumClass {
/** <p>Returns the enumeration classes name, without any package
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBAppinfoImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBAppinfoImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBAppinfoImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -98,9 +98,6 @@
return jaxbTypesafeEnumClass;
}
}
- System.err.println("this = " + this);
- System.err.println("AnnotationParent = " + annotationParent);
- System.err.println("annotationParent.parent = " + annotationParent.getParentObject());
throw new LocSAXException("The declaration of a typesafeEnumClass is only allowed in xs:simpleType/xs:annotation/xs:appinfo.", getLocator());
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBClassImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBClassImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBClassImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -23,7 +23,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBClassImpl.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBClassImpl.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class JAXBClassImpl extends JAXBXsObjectImpl implements JAXBClass {
/** <p>Creates a new instance of ClassImpl.</p>
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavaTypeImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavaTypeImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavaTypeImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -26,7 +26,7 @@
/**
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBJavaTypeImpl.java 231996 2004-09-30 00:09:30Z jochen $
+ * @version $Id: JAXBJavaTypeImpl.java 231996 2004-09-30 02:09:30 +0200 (Thu, 30 Sep 2004) jochen $
*/
public class JAXBJavaTypeImpl extends XsObjectImpl implements JAXBJavaType {
public static class JAXBGlobalJavaTypeImpl extends JAXBJavaTypeImpl implements JAXBJavaType.JAXBGlobalJavaType {
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavadocImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavadocImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBJavadocImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -24,7 +24,7 @@
/** <p>Implementation of the Javadoc interface.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBJavadocImpl.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBJavadocImpl.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class JAXBJavadocImpl extends XsObjectImpl implements JAXBJavadoc {
/** <p>Creates a new instance of JAXBJavadocImpl.</p>
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBPropertyImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBPropertyImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBPropertyImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -26,7 +26,7 @@
/** <p>Implementation of the Property interface.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBPropertyImpl.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBPropertyImpl.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class JAXBPropertyImpl extends JAXBXsObjectImpl implements JAXBProperty {
public static class BaseTypeImpl extends JAXBXsObjectImpl implements JAXBProperty.BaseType {
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBSchemaBindingsImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBSchemaBindingsImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBSchemaBindingsImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -29,7 +29,7 @@
/** <p>Implementation of the SchemaBindings interface.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBSchemaBindingsImpl.java 231789 2004-02-22 00:52:34Z jochen $
+ * @version $Id: JAXBSchemaBindingsImpl.java 231789 2004-02-22 01:52:34 +0100 (Sun, 22 Feb 2004) jochen $
*/
public class JAXBSchemaBindingsImpl extends JAXBXsObjectImpl implements JAXBSchemaBindings {
private Package myPackage;
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBTypesafeEnumClassImpl.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBTypesafeEnumClassImpl.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/jaxb/impl/JAXBTypesafeEnumClassImpl.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -31,7 +31,7 @@
/** <p>Implementation of the TypesafeEnumClass interface.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: JAXBTypesafeEnumClassImpl.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: JAXBTypesafeEnumClassImpl.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class JAXBTypesafeEnumClassImpl extends JAXBXsObjectImpl implements JAXBTypesafeEnumClass {
private String name;
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/FormatTest.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/FormatTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/FormatTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -16,6 +16,7 @@
*/
package org.apache.ws.jaxme.xs.junit;
+import java.text.Format;
import java.text.ParseException;
import java.util.Calendar;
import java.util.TimeZone;
@@ -182,4 +183,18 @@
Calendar got = (Calendar) format.parseObject(dateTime);
assertEqualTime(expect, got);
}
+
+ /** Tests, whether e zero as suffix matters in milliseconds.
+ */
+ public void testZeroSuffix() throws Exception {
+ Format format = new XsDateTimeFormat();
+ Calendar c1 = (Calendar) format.parseObject("2006-05-03T15:29:17.15Z");
+ Calendar c2 = (Calendar) format.parseObject("2006-05-03T15:29:17.150Z");
+ assertEquals(c1, c2);
+
+ format = new XsTimeFormat();
+ c1 = (Calendar) format.parseObject("15:29:17.15Z");
+ c2 = (Calendar) format.parseObject("15:29:17.150Z");
+ assertEquals(c1, c2);
+ }
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/JiraTest.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/JiraTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/JiraTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -204,4 +204,56 @@
assertEquals(1, particle.getMinOccurs());
assertEquals(-1, particle.getMaxOccurs());
}
+
+ /** Test for <a href="http://issues.apache.org/jira/browse/JAXME-84">JAXME-84</a>.
+ */
+ public void testJAXME84() throws Exception {
+ final String xml =
+ "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://namespaces.softwareag.com/de/s/xDWS/soap-api'\n"
+ + " xmlns:xdws='http://namespaces.softwareag.com/de/s/xDWS/soap-api' elementFormDefault='qualified'\n"
+ + " attributeFormDefault='unqualified'>\n"
+ + " <xs:complexType name='xdwsResultInfo'>\n"
+ + " <xs:attribute name='rc' type='xs:int' use='required'/>\n"
+ + " <xs:attribute name='message' type='xs:string' use='optional'/>\n"
+ + " <xs:attribute name='details' type='xs:string' use='optional'/>\n"
+ + " </xs:complexType>\n"
+ + " <xs:element name='xdwsResponse'>\n"
+ + " <xs:complexType>\n"
+ + " <xs:sequence>\n"
+ + " <xs:element name='response' minOccurs='0' maxOccurs='unbounded'>\n"
+ + " <xs:complexType>\n"
+ + " <xs:complexContent>\n"
+ + " <xs:extension base='xdws:xdwsResultInfo'>\n"
+ + " <xs:choice minOccurs='0'>\n"
+ + " <xs:element name='a' type='xs:string'/>\n"
+ + " <xs:element name='b' type='xs:string'/>\n"
+ + " </xs:choice>\n"
+ + " </xs:extension>\n"
+ + " </xs:complexContent>\n"
+ + " </xs:complexType>\n"
+ + " </xs:element>\n"
+ + " <xs:element name='result' type='xdws:xdwsResultInfo'/>\n"
+ + " </xs:sequence>\n"
+ + " <xs:attribute name='version' type='xs:int' use='required' />\n"
+ + " </xs:complexType>\n"
+ + " </xs:element>\n"
+ + "</xs:schema>\n";
+ XSSchema schema = parse(xml, "jaxme84.xsd");
+ XSElement[] elements = schema.getElements();
+ assertEquals(1, elements.length);
+ XSElement xdwsResponseElement = elements[0];
+ XSParticle[] xdwsResponseParticles = assertGroup(assertComplexContent(assertComplexType(xdwsResponseElement.getType()))).getParticles();
+ assertEquals(2, xdwsResponseParticles.length);
+ XSElement responseElement = assertElement(xdwsResponseParticles[0]);
+ XSComplexType responseType = assertComplexType(responseElement.getType());
+ XSParticle particle = responseType.getParticle();
+ assertEquals(0, particle.getMinOccurs());
+ assertEquals(1, particle.getMaxOccurs());
+ XSParticle[] particles = assertGroup(particle).getParticles();
+ assertEquals(2, particles.length);
+ XSElement a = assertElement(particles[0]);
+ assertEquals(new XsQName("http://namespaces.softwareag.com/de/s/xDWS/soap-api", "a"), a.getName());
+ XSElement b = assertElement(particles[1]);
+ assertEquals(new XsQName("http://namespaces.softwareag.com/de/s/xDWS/soap-api", "b"), b.getName());
+ }
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -1551,4 +1551,41 @@
testGroupMultiplicity(newXSParser());
testGroupMultiplicity(newJAXBParser());
}
+
+ private void testComplexTypeConsideredSimple(XSParser pParser) throws Exception {
+ final String schemaSource
+ = "<xs:schema xmlns='www.fgm.com/services/fgm/1.1'\n"
+ + " xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
+ + " targetNamespace='www.fgm.com/services/fgm/1.1'\n"
+ + " elementFormDefault='qualified'>\n"
+ + " <xs:complexType name='BaseObject'/>\n"
+ + " <xs:complexType name='BrokenObject'>\n"
+ + " <xs:complexContent>\n"
+ + " <xs:extension base='BaseObject'>\n"
+ + " <xs:sequence>\n"
+ + " <xs:choice minOccurs='0' maxOccurs='unbounded'>\n"
+ + " <xs:element name='Choice' type='ExtendedBrokenObject'\n"
+ + " minOccurs='0' maxOccurs='unbounded'/>\n"
+ + " </xs:choice>\n"
+ + " </xs:sequence>\n"
+ + " </xs:extension>\n"
+ + " </xs:complexContent>\n"
+ + " </xs:complexType>\n"
+ + " <xs:complexType name='ExtendedBrokenObject'>\n"
+ + " <xs:complexContent>\n"
+ + " <xs:extension base='BrokenObject'/>\n"
+ + " </xs:complexContent>\n"
+ + " </xs:complexType>\n"
+ + "</xs:schema>\n";
+ InputSource isource = new InputSource(new StringReader(schemaSource));
+ isource.setSystemId("testComplexTypeConsideredSimple.xsd");
+ pParser.parse(isource);
+ }
+
+ /** Test for http://marc.theaimsgroup.com/?l=jaxme-dev&m=115945460223201&w=2
+ */
+ public void testComplexTypeConsideredSimple() throws Exception {
+ testComplexTypeConsideredSimple(newXSParser());
+ testComplexTypeConsideredSimple(newJAXBParser());
+ }
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTestBase.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTestBase.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTestBase.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -158,7 +158,7 @@
return result;
}
- protected XSParticle assertComplexContent(XSComplexType pType) {
+ protected XSParticle assertComplexContent(XSComplexType pType) throws SAXException {
assertTrue(!pType.hasSimpleContent());
XSParticle result = pType.getParticle();
assertNotNull(result);
@@ -230,7 +230,7 @@
return result;
}
- protected XSSimpleContentType assertSimpleContent(XSComplexType pType) {
+ protected XSSimpleContentType assertSimpleContent(XSComplexType pType) throws SAXException {
assertTrue(pType.hasSimpleContent());
XSSimpleContentType result = pType.getSimpleContent();
assertNotNull(result);
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/parser/DOMBuilder.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/parser/DOMBuilder.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/parser/DOMBuilder.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -35,7 +35,7 @@
/** <p>Converts a stream of SAX events into a DOM node.</p>
*
* @author <a href="mailto:joe at ispsoft.de">Jochen Wiedmann</a>
- * @version $Id: DOMBuilder.java 231785 2004-02-16 23:39:59Z jochen $
+ * @version $Id: DOMBuilder.java 231785 2004-02-17 00:39:59 +0100 (Tue, 17 Feb 2004) jochen $
*/
public class DOMBuilder implements ContentHandler {
private Node currentNode;
Added: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java (rev 0)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/LoggingContentHandler.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -0,0 +1,138 @@
+package org.apache.ws.jaxme.xs.util;
+
+import java.io.OutputStream;
+import java.io.Writer;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.XMLFilterImpl;
+
+
+/**
+ * A content handler, which may be used to log a stream of SAX events.
+ */
+public class LoggingContentHandler extends XMLFilterImpl implements LexicalHandler {
+ private final TransformerHandler th;
+
+ /**
+ * Creates a new instance, which is logging to the given
+ * output stream.
+ */
+ public LoggingContentHandler(OutputStream pStream) throws SAXException {
+ this(new StreamResult(pStream));
+ }
+
+ /**
+ * Creates a new instance, which is logging to the given writer.
+ * @param pResult
+ * @throws SAXException
+ */
+ public LoggingContentHandler(Writer pWriter) throws SAXException {
+ this(new StreamResult(pWriter));
+ }
+
+ private LoggingContentHandler(Result pResult) throws SAXException {
+ try {
+ th = ((SAXTransformerFactory) TransformerFactory.newInstance()).newTransformerHandler();
+ } catch (TransformerException e) {
+ throw new SAXException(e);
+ }
+ th.setResult(pResult);
+ }
+
+ public void characters(char[] arg0, int arg1, int arg2) throws SAXException {
+ th.characters(arg0, arg1, arg2);
+ super.characters(arg0, arg1, arg2);
+ }
+
+ public void endDocument() throws SAXException {
+ th.endDocument();
+ super.endDocument();
+ }
+
+ public void endElement(String arg0, String arg1, String arg2) throws SAXException {
+ th.endElement(arg0, arg1, arg2);
+ super.endElement(arg0, arg1, arg2);
+ }
+
+ public void endPrefixMapping(String arg0) throws SAXException {
+ th.endPrefixMapping(arg0);
+ super.endPrefixMapping(arg0);
+ }
+
+ public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException {
+ th.ignorableWhitespace(arg0, arg1, arg2);
+ super.ignorableWhitespace(arg0, arg1, arg2);
+ }
+
+ public void notationDecl(String arg0, String arg1, String arg2) throws SAXException {
+ th.notationDecl(arg0, arg1, arg2);
+ super.notationDecl(arg0, arg1, arg2);
+ }
+
+ public void processingInstruction(String arg0, String arg1) throws SAXException {
+ th.processingInstruction(arg0, arg1);
+ super.processingInstruction(arg0, arg1);
+ }
+
+ public void skippedEntity(String arg0) throws SAXException {
+ th.skippedEntity(arg0);
+ super.skippedEntity(arg0);
+ }
+
+ public void startDocument() throws SAXException {
+ th.startDocument();
+ super.startDocument();
+ }
+
+ public void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {
+ th.startElement(arg0, arg1, arg2, arg3);
+ super.startElement(arg0, arg1, arg2, arg3);
+ }
+
+ public void startPrefixMapping(String arg0, String arg1) throws SAXException {
+ th.startPrefixMapping(arg0, arg1);
+ super.startPrefixMapping(arg0, arg1);
+ }
+
+ public void unparsedEntityDecl(String arg0, String arg1, String arg2, String arg3) throws SAXException {
+ th.unparsedEntityDecl(arg0, arg1, arg2, arg3);
+ super.unparsedEntityDecl(arg0, arg1, arg2, arg3);
+ }
+
+ public void comment(char[] arg0, int arg1, int arg2) throws SAXException {
+ th.comment(arg0, arg1, arg2);
+ }
+
+ public void endCDATA() throws SAXException {
+ th.endCDATA();
+ }
+
+ public void endDTD() throws SAXException {
+ th.endDTD();
+ }
+
+ public void endEntity(String arg0) throws SAXException {
+ th.endEntity(arg0);
+ }
+
+ public void startCDATA() throws SAXException {
+ th.startCDATA();
+ }
+
+ public void startDTD(String arg0, String arg1, String arg2) throws SAXException {
+ th.startDTD(arg0, arg1, arg2);
+ }
+
+ public void startEntity(String arg0) throws SAXException {
+ th.startEntity(arg0);
+ }
+}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/XsDateTimeFormat.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/XsDateTimeFormat.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/util/XsDateTimeFormat.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -172,6 +172,13 @@
offset = parseInt(pString, offset, digits);
if (digits.length() > 0) {
millis = Integer.parseInt(digits.toString());
+ if (millis > 999) {
+ pParsePosition.setErrorIndex(offset);
+ return null;
+ }
+ for (int i = digits.length(); i < 3; i++) {
+ millis *= 10;
+ }
} else {
millis = 0;
}
Modified: trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/xml/XsNamespaceList.java
===================================================================
--- trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/xml/XsNamespaceList.java 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/src/xs/org/apache/ws/jaxme/xs/xml/XsNamespaceList.java 2007-07-21 08:19:31 UTC (rev 3898)
@@ -16,10 +16,9 @@
*/
package org.apache.ws.jaxme.xs.xml;
+import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Set;
+import java.util.List;
import java.util.StringTokenizer;
@@ -113,28 +112,33 @@
}
}
+ /**
+ * Default implementation of {@link XsNamespaceList}.
+ */
public static class Basic extends XsNamespaceList {
- private final XsAnyURI targetNamespace;
private final XsAnyURI[] uris;
private final String toStr;
protected Basic(String pValue, XsAnyURI pTargetNamespace) {
- targetNamespace = pTargetNamespace;
toStr = pValue;
- Set set = new HashSet();
+ List list = new ArrayList();
if (pTargetNamespace == null) {
pTargetNamespace = new XsAnyURI("");
}
for (StringTokenizer st = new StringTokenizer(pValue); st.hasMoreTokens(); ) {
- String s = st.nextToken();
+ String s = st.nextToken();
+ final XsAnyURI uri;
if ("##targetNamespace".equals(s)) {
- set.add(pTargetNamespace);
+ uri = pTargetNamespace;
} else if ("##local".equals(pTargetNamespace)) {
- set.add(new XsAnyURI(""));
+ uri = new XsAnyURI("");
} else {
- set.add(new XsAnyURI(s));
+ uri = new XsAnyURI(s);
}
+ if (!list.contains(uri)) {
+ list.add(uri);
+ }
}
- uris = (XsAnyURI[]) set.toArray(new XsAnyURI[set.size()]);
+ uris = (XsAnyURI[]) list.toArray(new XsAnyURI[list.size()]);
}
/** @return false
*/
Modified: trunk/jaxme/jaxme/status.xml
===================================================================
--- trunk/jaxme/jaxme/status.xml 2007-07-20 23:48:21 UTC (rev 3897)
+++ trunk/jaxme/jaxme/status.xml 2007-07-21 08:19:31 UTC (rev 3898)
@@ -30,6 +30,68 @@
</todo>
<changes>
+ <release version="0.5.2" date="Unpublished">
+ <action dev="JW" type="enhancement" context="generator">
+ Added the "xmlCatalog" element to the JaxMe Ant task.
+ </action>
+ <action dev="JW" type="fix" context="pm">
+ The TaminoAPI4JPM wasn't supporting query parameters.
+ (Theo Straeten, theo.straeten at softwareag.com)
+ </action>
+ <action dev="JW" type="fix" context="xs">
+ The classes XsDateTimeFormat, and XsTimeFormat have been parsing the milliseconds wrong,
+ if the string contained less than three digits.
+ </action>
+ <action dev="JW" type="fix" context="js">
+ The methods AbstractJavaMethod.getParamNames() and getParamTypes()
+ are throwing an ArrayIndexOutOfBoundsException.
+ </action>
+ <action dev="JW" type="fix" context="generator">
+ Fixed a serious performance problem, if mixed content elements
+ had large embedded text segments.
+ </action>
+ <action dev="JW" type="fix" context="js">
+ Fixed a build problem with hsqldb, when the database was already in use.
+ (Boris Gruschke, boris at gruschke.de, JAXME-81)
+ </action>
+ <action dev="JW" type="add" context="generator">
+ External schema bindings are now supported recursively.
+ </action>
+ <action dev="JW" type="fix" context="generator">
+ The GroupHandlerSG was generating invalid class names in some cases.
+ </action>
+ <action dev="JW" type="fix" context="generator">
+ The jaxb:class customization wasn't honoured by anonymous types.
+ </action>
+ <action dev="JW" type="fix" context="generator">
+ The element jaxb:property/jaxb:baseType/jaxb:javaType wasn't honured.
+ </action>
+ <action dev="JW" type="fix" context="xs">
+ Eliminated a runtime dependency, which caused the test suite to fail
+ on JRE 1.6.
+ </action>
+ <action dev="JW" type="fix" context="generator">
+ A jaxb:baseType definition was ignored, if it modified a global type,
+ which has already been in use.
+ </action>
+ <action dev="JW" type="fix" context="generator">
+ Invalid code was generated for an xs:list with item type xs:QName.
+ </action>
+ <action dev="JW" type="fix" context="generator">
+ The object factory wasn't properly initialized, if a schema was using
+ multiple package names.
+ </action>
+ <action dev="JW" type="fix" context="xs">
+ If an extending types content was reduced to the extending types
+ content particle (in other words, if the extended type had empty
+ content), then the content particles minOccurs and maxOccurs
+ values haven't been inherited. (JAXME-84)
+ </action>
+ <action dev="JW" type="fix" context="xs">
+ If an recursive type was an extension of another recursive type,
+ then the initialization could fail.
+ </action>
+ </release>
<release version="0.5.1" date="06-Jan-2006">
<action dev="JW" type="enhancement" context="js">
Added several methods for modifying and querying the
@@ -43,11 +105,11 @@
<action dev="JW" type="fix" context="generator">
The source distribution did not contain the necessary
build scripts. (JAXME-67, Boris Gruschke,
- <boris at gruschke.de>)
+ boris at gruschke.de)
</action>
<action dev="JW" type="fix" context="runtime">
It wasn't possible to set the properties JAXME_FORMAT_*.
- David Gilliland <dgilliland62 at users.sourceforge.net>
+ (David Gilliland, dgilliland62 at users.sourceforge.net)
</action>
<action dev="JW" type="fix" context="generator">
The generated marshallers didn't honor the JAXME_FORMAT_*.
Deleted: trunk/jaxme/jaxme_0.5.1+dfsg.orig.tar.gz
===================================================================
(Binary files differ)
Added: trunk/jaxme/jaxme_0.5.2+dfsg.orig.tar.gz
===================================================================
(Binary files differ)
Property changes on: trunk/jaxme/jaxme_0.5.2+dfsg.orig.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the pkg-java-commits
mailing list