servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r650577 [2/3] - in /servicemix/smx4/specs: ./ branches/ tags/ trunk/ trunk/jaxb-api/ trunk/jaxb-api/src/ trunk/jaxb-api/src/main/ trunk/jaxb-api/src/main/java/ trunk/jaxb-api/src/main/java/javax/ trunk/jaxb-api/src/main/java/javax/xml/ trun...
Date Tue, 22 Apr 2008 17:09:39 GMT
Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElements.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElements.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElements.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElements.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:14:29 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlElements {
+
+    XmlElement[] value();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnum.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnum.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnum.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnum.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:15:49 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface XmlEnum {
+
+    Class value();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnumValue.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnumValue.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnumValue.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnumValue.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:16:24 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface XmlEnumValue {
+
+    String value();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlID.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlID.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlID.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlID.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:16:50 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlID {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlIDREF.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlIDREF.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlIDREF.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlIDREF.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:17:08 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlIDREF {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlInlineBinaryData.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlInlineBinaryData.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlInlineBinaryData.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlInlineBinaryData.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:17:34 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
+public @interface XmlInlineBinaryData {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlList.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlList.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlList.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlList.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,19 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:18:05 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+public @interface XmlList {
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMimeType.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMimeType.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMimeType.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMimeType.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:18:29 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+public @interface XmlMimeType {
+
+    String value();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMixed.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMixed.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMixed.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMixed.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:19:00 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlMixed {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNs.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNs.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNs.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNs.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,22 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:19:17 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {})
+public @interface XmlNs {
+
+    String namespaceURI();
+
+    String prefix();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNsForm.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNsForm.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNsForm.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNsForm.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,16 @@
+package javax.xml.bind.annotation;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:01:53 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public enum XmlNsForm {
+
+    UNQUALIFIED,
+    QUALIFIED,
+    UNSET
+    
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRegistry.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRegistry.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRegistry.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:20:00 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface XmlRegistry {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRootElement.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRootElement.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRootElement.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRootElement.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,22 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:20:25 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface XmlRootElement {
+
+    String name() default "##default";
+
+    String namespace() default "##default";
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchema.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchema.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchema.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchema.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,26 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:21:08 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.PACKAGE)
+public @interface XmlSchema {
+
+    XmlNsForm attributFormDefault() default XmlNsForm.UNSET;
+
+    XmlNsForm elementFormDefault() default XmlNsForm.UNSET;
+
+    String namespace() default "";
+
+    XmlNs[] xmlns() default {};
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaType.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaType.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaType.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaType.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,27 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:22:32 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD, ElementType.PACKAGE})
+public @interface XmlSchemaType {
+
+    class DEFAULT {
+    }
+
+    String name();
+
+    String namespace() default "http://www.w3.org/2001/XMLSchema";
+
+    Class type() default DEFAULT.class;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaTypes.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaTypes.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaTypes.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaTypes.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:23:36 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.PACKAGE)
+public @interface XmlSchemaTypes {
+
+    XmlSchemaType[] value();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlTransient.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlTransient.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlTransient.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlTransient.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:24:11 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlTransient {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlType.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlType.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlType.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlType.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,31 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:24:30 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface XmlType {
+
+    class DEFAULT {
+    }
+
+    Class factoryClass() default DEFAULT.class;
+
+    String factoryMethod() default "";
+
+    String name() default "##default";
+
+    String namespace() default "##default";
+
+    String[] propOrder() default "";
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlValue.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlValue.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlValue.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlValue.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:26:14 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlValue {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,58 @@
+package javax.xml.bind.annotation.adapters;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 12:08:08 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class CollapsedStringAdapter extends XmlAdapter<String, String> {
+
+    public String marshal(String v) {
+        return v;
+    }
+
+    public String unmarshal(String v) {
+        if(v == null) {
+            return null;
+        }
+        int len = v.length();
+        int s;
+        for (s = 0; s < len && !isWhiteSpace(v.charAt(s)); s++);
+        if (s == len) {
+            return v;
+        }
+        StringBuffer result = new StringBuffer(len);
+        if (s != 0) {
+            for(int i = 0; i < s; i++) {
+                result.append(v.charAt(i));
+            }
+            result.append(' ');
+        }
+        boolean inStripMode = true;
+        for (int i = s + 1; i < len; i++) {
+            char ch = v.charAt(i);
+            boolean b = isWhiteSpace(ch);
+            if (inStripMode && b) {
+                continue;
+            }
+            inStripMode = b;
+            result.append(inStripMode ? ' ' : ch);
+        }
+        len = result.length();
+        if (len > 0 && result.charAt(len - 1) == ' ') {
+            result.setLength(len - 1);
+        }
+        return result.toString();
+    }
+
+    protected static boolean isWhiteSpace(char ch) {
+        if (ch > ' ') {
+            return false;
+        } else {
+            return ch == '\t' || ch == '\n' || ch == '\r' || ch == ' ';
+        }
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,21 @@
+package javax.xml.bind.annotation.adapters;
+
+import javax.xml.bind.DatatypeConverter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:38:25 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class HexBinaryAdapter extends XmlAdapter<String, byte[]> {
+
+    public String marshal(byte[] v) {
+        return DatatypeConverter.printHexBinary(v);
+    }
+
+    public byte[] unmarshal(String v) {
+        return DatatypeConverter.parseHexBinary(v);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,43 @@
+package javax.xml.bind.annotation.adapters;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:28:50 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class NormalizedStringAdapter extends XmlAdapter<String, String> {
+
+    public String marshal(String v) {
+        return v;
+    }
+
+    public String unmarshal(String v) {
+        if (v == null) {
+            return null;
+        }
+        int i;
+        for (i = v.length() - 1; i >= 0 && !isWhiteSpaceExceptSpace(v.charAt(i)); i--);
+        if (i < 0) {
+            return v;
+        }
+        char buf[] = v.toCharArray();
+        buf[i--] = ' ';
+        for(; i >= 0; i--) {
+            if(isWhiteSpaceExceptSpace(buf[i])) {
+                buf[i] = ' ';
+            }
+        }
+        return new String(buf);
+    }
+
+    protected static boolean isWhiteSpaceExceptSpace(char ch) {
+        if (ch >= ' ') {
+            return false;
+        } else {
+            return ch == '\t' || ch == '\n' || ch == '\r';
+        }
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlAdapter.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlAdapter.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlAdapter.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlAdapter.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation.adapters;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:10:25 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class XmlAdapter<ValueType, BoundType> {
+
+    protected XmlAdapter() {
+    }
+
+    public abstract ValueType marshal(BoundType v);
+
+    public abstract BoundType unmarshal(ValueType v);
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,25 @@
+package javax.xml.bind.annotation.adapters;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:26:54 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.PACKAGE, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER})
+public @interface XmlJavaTypeAdapter {
+
+    class DEFAULT {
+    }
+
+    Class<? extends XmlAdapter> value();
+
+    Class type() default DEFAULT.class;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation.adapters;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:28:17 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.PACKAGE})
+public @interface XmlJavaTypeAdapters {
+
+    XmlJavaTypeAdapter[] value();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentMarshaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentMarshaller.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentMarshaller.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentMarshaller.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,23 @@
+package javax.xml.bind.attachment;
+
+import javax.activation.DataHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:18:43 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class AttachmentMarshaller {
+
+    public abstract String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName);
+
+    public abstract String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName);
+
+    public abstract String addSwaRefAttachment(DataHandler data);
+
+    public boolean isXOPPackage() {
+        return false;
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentUnmarshaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentUnmarshaller.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentUnmarshaller.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentUnmarshaller.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,21 @@
+package javax.xml.bind.attachment;
+
+import javax.activation.DataHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:23:53 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class AttachmentUnmarshaller {
+
+    public abstract byte[] getAttachmentAsByteArray(String cid);
+
+    public abstract DataHandler getAttachmentAsDataHandler(String cid);
+
+    public boolean isXOPPackage() {
+        return false;
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractMarshallerImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractMarshallerImpl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractMarshallerImpl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractMarshallerImpl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,275 @@
+package javax.xml.bind.helpers;
+
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.PropertyException;
+import javax.xml.bind.ValidationEventHandler;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.bind.attachment.AttachmentMarshaller;
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.Result;
+import javax.xml.validation.Schema;
+
+import org.w3c.dom.Node;
+
+import org.xml.sax.ContentHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 12:11:11 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class AbstractMarshallerImpl implements Marshaller {
+
+    static String aliases[] = {
+            "UTF-8", "UTF8",
+            "UTF-16", "Unicode",
+            "UTF-16BE", "UnicodeBigUnmarked",
+            "UTF-16LE", "UnicodeLittleUnmarked",
+            "US-ASCII", "ASCII",
+            "TIS-620", "TIS620",
+            "ISO-10646-UCS-2", "Unicode",
+            "EBCDIC-CP-US", "cp037",
+            "EBCDIC-CP-CA", "cp037",
+            "EBCDIC-CP-NL", "cp037",
+            "EBCDIC-CP-WT", "cp037",
+            "EBCDIC-CP-DK", "cp277",
+            "EBCDIC-CP-NO", "cp277",
+            "EBCDIC-CP-FI", "cp278",
+            "EBCDIC-CP-SE", "cp278",
+            "EBCDIC-CP-IT", "cp280",
+            "EBCDIC-CP-ES", "cp284",
+            "EBCDIC-CP-GB", "cp285",
+            "EBCDIC-CP-FR", "cp297",
+            "EBCDIC-CP-AR1", "cp420",
+            "EBCDIC-CP-HE", "cp424",
+            "EBCDIC-CP-BE", "cp500",
+            "EBCDIC-CP-CH", "cp500",
+            "EBCDIC-CP-ROECE", "cp870",
+            "EBCDIC-CP-YU", "cp870",
+            "EBCDIC-CP-IS", "cp871",
+            "EBCDIC-CP-AR2", "cp918"
+    };
+
+    private ValidationEventHandler eventHandler = new DefaultValidationEventHandler();
+    private String encoding = "UTF-8";
+    private String schemaLocation;
+    private String noNSSchemaLocation;
+    private boolean formattedOutput;
+    private boolean fragment;
+
+    public final void marshal(Object obj, OutputStream os) throws JAXBException {
+        checkNotNull(obj, "obj", os, "os");
+        marshal(obj, new StreamResult(os));
+    }
+
+    public final void marshal(Object obj, Writer w) throws JAXBException {
+        checkNotNull(obj, "obj", w, "writer");
+        marshal(obj, new StreamResult(w));
+    }
+
+    public final void marshal(Object obj, ContentHandler handler) throws JAXBException {
+        checkNotNull(obj, "obj", handler, "handler");
+        marshal(obj, new SAXResult(handler));
+    }
+
+    public final void marshal(Object obj, Node node) throws JAXBException {
+        checkNotNull(obj, "obj", node, "node");
+        marshal(obj, new DOMResult(node));
+    }
+
+    public Node getNode(Object obj) throws JAXBException {
+        checkNotNull(obj, "obj", "foo", "bar");
+        throw new UnsupportedOperationException();
+    }
+
+    protected String getEncoding() {
+        return encoding;
+    }
+
+    protected void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    protected String getSchemaLocation() {
+        return schemaLocation;
+    }
+
+    protected void setSchemaLocation(String location) {
+        schemaLocation = location;
+    }
+
+    protected String getNoNSSchemaLocation() {
+        return noNSSchemaLocation;
+    }
+
+    protected void setNoNSSchemaLocation(String location) {
+        noNSSchemaLocation = location;
+    }
+
+    protected boolean isFormattedOutput() {
+        return formattedOutput;
+    }
+
+    protected void setFormattedOutput(boolean v) {
+        formattedOutput = v;
+    }
+
+    protected boolean isFragment() {
+        return fragment;
+    }
+
+    protected void setFragment(boolean v) {
+        fragment = v;
+    }
+
+    protected String getJavaEncoding(String encoding) throws UnsupportedEncodingException {
+        try {
+            "1".getBytes(encoding);
+            return encoding;
+        }
+        catch (UnsupportedEncodingException e) {
+        }
+        for (int i = 0; i < aliases.length; i += 2) {
+            if (encoding.equals(aliases[i])) {
+                "1".getBytes(aliases[i + 1]);
+                return aliases[i + 1];
+            }
+        }
+        throw new UnsupportedEncodingException(encoding);
+    }
+
+    public void setProperty(String name, Object value) throws PropertyException {
+        if (name == null) {
+            throw new IllegalArgumentException("name must not be null");
+        }
+        if (JAXB_ENCODING.equals(name)) {
+            checkString(name, value);
+            setEncoding((String) value);
+        } else if (JAXB_FORMATTED_OUTPUT.equals(name)) {
+            checkBoolean(name, value);
+            setFormattedOutput(((Boolean) value).booleanValue());
+        } else if (JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(name)) {
+            checkString(name, value);
+            setNoNSSchemaLocation((String) value);
+        } else if (JAXB_SCHEMA_LOCATION.equals(name)) {
+            checkString(name, value);
+            setSchemaLocation((String) value);
+        } else if (JAXB_FRAGMENT.equals(name)) {
+            checkBoolean(name, value);
+            setFragment(((Boolean) value).booleanValue());
+        } else {
+            throw new PropertyException(name, value);
+        }
+    }
+
+    public Object getProperty(String name) throws PropertyException {
+        if (name == null) {
+            throw new IllegalArgumentException("name must not be null");
+        }
+        if (JAXB_ENCODING.equals(name)) {
+            return getEncoding();
+        } else if (JAXB_FORMATTED_OUTPUT.equals(name)) {
+            return isFormattedOutput() ? Boolean.TRUE : Boolean.FALSE;
+        } else if (JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(name)) {
+            return getNoNSSchemaLocation();
+        } else if (JAXB_SCHEMA_LOCATION.equals(name)) {
+            return getSchemaLocation();
+        } else if (JAXB_FRAGMENT.equals(name)) {
+            return isFragment() ? Boolean.TRUE : Boolean.FALSE;
+        } else {
+            throw new PropertyException(name);
+        }
+    }
+
+    public ValidationEventHandler getEventHandler() throws JAXBException {
+        return eventHandler;
+    }
+
+    public void setEventHandler(ValidationEventHandler handler) throws JAXBException {
+        if (handler == null) {
+            eventHandler = new DefaultValidationEventHandler();
+        } else {
+            eventHandler = handler;
+        }
+    }
+
+    private void checkBoolean(String name, Object value) throws PropertyException {
+        if (!(value instanceof Boolean)) {
+            throw new PropertyException(name + " must be a boolean");
+        }
+    }
+
+    private void checkString(String name, Object value) throws PropertyException {
+        if (!(value instanceof String)) {
+            throw new PropertyException(name + " must be a string");
+        }
+    }
+
+    private void checkNotNull(Object o1, String o1Name, Object o2, String o2Name) {
+        if (o1 == null) {
+            throw new IllegalArgumentException(o1Name + " must not be null");
+        }
+        if (o2 == null) {
+            throw new IllegalArgumentException(o2Name + " must not be null");
+        }
+    }
+
+    public void marshal(Object obj, XMLEventWriter writer)
+            throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void marshal(Object obj, XMLStreamWriter writer) throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setSchema(Schema schema) {
+        throw new UnsupportedOperationException();
+    }
+
+    public Schema getSchema() {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setAdapter(XmlAdapter adapter) {
+        if (adapter == null) {
+            throw new IllegalArgumentException();
+        }
+        setAdapter(adapter.getClass(), adapter);
+    }
+
+    public void setAdapter(Class type, XmlAdapter adapter) {
+        throw new UnsupportedOperationException();
+    }
+
+    public XmlAdapter getAdapter(Class type) {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setAttachmentMarshaller(AttachmentMarshaller am) {
+        throw new UnsupportedOperationException();
+    }
+
+    public AttachmentMarshaller getAttachmentMarshaller() {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setListener(javax.xml.bind.Marshaller.Listener listener) {
+        throw new UnsupportedOperationException();
+    }
+
+    public javax.xml.bind.Marshaller.Listener getListener() {
+        throw new UnsupportedOperationException();
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,251 @@
+package javax.xml.bind.helpers;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Reader;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.ValidationEventHandler;
+import javax.xml.bind.UnmarshallerHandler;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.UnmarshalException;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.PropertyException;
+import javax.xml.bind.attachment.AttachmentUnmarshaller;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.validation.Schema;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.w3c.dom.Node;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 12:36:46 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class AbstractUnmarshallerImpl implements Unmarshaller {
+
+    protected boolean validating;
+    private ValidationEventHandler eventHandler;
+    private XMLReader reader;
+
+    protected UnmarshalException createUnmarshalException(SAXException e) {
+        Exception nested = e.getException();
+        if (nested instanceof UnmarshalException) {
+            return (UnmarshalException)nested;
+        } else if(nested instanceof RuntimeException) {
+            throw (RuntimeException)nested;
+        } else if (nested != null) {
+            return new UnmarshalException(nested);
+        } else {
+            return new UnmarshalException(e);
+        }
+    }
+
+    protected XMLReader getXMLReader() throws JAXBException {
+        if (reader == null) {
+            try {
+                SAXParserFactory parserFactory = SAXParserFactory.newInstance();
+                parserFactory.setNamespaceAware(true);
+                parserFactory.setValidating(false);
+                reader = parserFactory.newSAXParser().getXMLReader();
+            } catch(ParserConfigurationException e) {
+                throw new JAXBException(e);
+            } catch(SAXException e) {
+                throw new JAXBException(e);
+            }
+        }
+        return reader;
+    }
+
+    public <A extends XmlAdapter> A getAdapter(Class<A> type) {
+        throw new UnsupportedOperationException();
+    }
+
+    public AttachmentUnmarshaller getAttachmentUnmarshaller() {
+        throw new UnsupportedOperationException();
+    }
+
+    public ValidationEventHandler getEventHandler() {
+        return eventHandler;
+    }
+
+    public Listener getListener() {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object getProperty(String name) throws PropertyException {
+        if(name == null) {
+            throw new IllegalArgumentException("name must not be null");
+        }
+        throw new PropertyException(name);
+    }
+
+    public Schema getSchema() {
+        throw new UnsupportedOperationException();
+    }
+
+    public UnmarshallerHandler getUnmarshallerHandler() {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean isValidating() throws JAXBException {
+        return validating;
+    }
+
+    public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setAdapter(XmlAdapter adapter) {
+        if (adapter == null) {
+            throw new IllegalArgumentException();
+        }
+        setAdapter((Class<XmlAdapter>) adapter.getClass(), adapter);
+    }
+
+    public void setAttachmentUnmarshaller(AttachmentUnmarshaller au) {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setEventHandler(ValidationEventHandler handler) throws JAXBException {
+        if (handler == null) {
+            handler = new DefaultValidationEventHandler();
+        }
+        eventHandler = handler;
+    }
+
+    public void setListener(Listener listener) {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setProperty(String name, Object value) throws PropertyException {
+        if(name == null) {
+            throw new IllegalArgumentException("name must not be null");
+        }
+        throw new PropertyException(name, value);
+    }
+
+    public void setSchema(Schema schema) {
+        throw new UnsupportedOperationException();
+    }
+
+    public void setValidating(boolean validating) {
+        this.validating = validating;
+    }
+
+    public Object unmarshal(File file) throws JAXBException {
+        if (file == null) {
+            throw new IllegalArgumentException("file must not be null");
+        }
+        try
+        {
+            String path = file.getAbsolutePath();
+            if (File.separatorChar != '/') {
+                path = path.replace(File.separatorChar, '/');
+            }
+            if (!path.startsWith("/")) {
+                path = "/" + path;
+            }
+            if (!path.endsWith("/") && file.isDirectory()) {
+                path = path + "/";
+            }
+            return unmarshal(new URL("file", "", path));
+        }
+        catch(MalformedURLException e) {
+            throw new IllegalArgumentException(e.getMessage());
+        }
+    }
+
+    public Object unmarshal(InputSource source) throws JAXBException {
+        if (source == null) {
+            throw new IllegalArgumentException("source must not be null");
+        }
+        return unmarshal(getXMLReader(), source);
+    }
+
+    public Object unmarshal(InputStream is) throws JAXBException {
+        if (reader == null) {
+            throw new IllegalArgumentException("is must not be null");
+        }
+        return unmarshal(new InputSource(is));
+    }
+
+    public <T> JAXBElement<T> unmarshal(Node node, Class<T> declaredType) throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object unmarshal(Reader reader) throws JAXBException {
+        if (reader == null) {
+            throw new IllegalArgumentException("reader must not be null");
+        }
+        return unmarshal(new InputSource(reader));
+    }
+
+    public Object unmarshal(Source source) throws JAXBException {
+        if (source == null) {
+            throw new IllegalArgumentException("source must not be null");
+        } else if (source instanceof SAXSource) {
+            SAXSource saxSource = (SAXSource) source;
+            XMLReader reader = saxSource.getXMLReader();
+            if (reader == null) {
+                reader = getXMLReader();
+            }
+            return unmarshal(reader, saxSource.getInputSource());
+        } else if (source instanceof StreamSource) {
+            StreamSource ss = (StreamSource) source;
+            InputSource is = new InputSource();
+            is.setSystemId(ss.getSystemId());
+            is.setByteStream(ss.getInputStream());
+            is.setCharacterStream(ss.getReader());
+            return unmarshal(is);
+        } else if (source instanceof DOMSource)
+            return unmarshal(((DOMSource) source).getNode());
+        else
+            throw new IllegalArgumentException();
+    }
+
+    protected abstract Object unmarshal(XMLReader xmlreader, InputSource inputsource) throws JAXBException;
+
+    public <T> JAXBElement<T> unmarshal(Source source, Class<T> declaredType) throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object unmarshal(URL url) throws JAXBException {
+        if(url == null) {
+            throw new IllegalArgumentException("url must not be null");
+        }
+        return unmarshal(new InputSource(url.toExternalForm()));
+    }
+
+    public Object unmarshal(XMLEventReader reader) throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+
+    public <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> declaredType) throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object unmarshal(XMLStreamReader reader) throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+
+    public <T> JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> declaredType) throws JAXBException {
+        throw new UnsupportedOperationException();
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/DefaultValidationEventHandler.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/DefaultValidationEventHandler.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/DefaultValidationEventHandler.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/DefaultValidationEventHandler.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,73 @@
+package javax.xml.bind.helpers;
+
+import java.net.URL;
+
+import javax.xml.bind.ValidationEventHandler;
+import javax.xml.bind.ValidationEvent;
+import javax.xml.bind.ValidationEventLocator;
+
+import org.w3c.dom.Node;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 12:23:24 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class DefaultValidationEventHandler implements ValidationEventHandler {
+
+    public boolean handleEvent(ValidationEvent event) {
+        if (event == null) {
+            throw new IllegalArgumentException();
+        }
+        String severity = null;
+        boolean retVal = false;
+        switch(event.getSeverity()) {
+        case ValidationEvent.WARNING: // '\0'
+            severity = "[WARNING]: ";
+            retVal = true;
+            break;
+
+        case ValidationEvent.ERROR: // '\001'
+            severity = "[ERROR]: ";
+            retVal = false;
+            break;
+
+        case ValidationEvent.FATAL_ERROR: // '\002'
+            severity = "[FATAL_ERROR]: ";
+            retVal = false;
+            break;
+        }
+        String location = getLocation(event);
+        System.out.println("DefaultValidationEventHandler " + severity + " " + event.getMessage() + "\n     Location: " + location);
+        return retVal;
+    }
+
+    private String getLocation(ValidationEvent event) {
+        StringBuffer msg = new StringBuffer();
+        ValidationEventLocator locator = event.getLocator();
+        if (locator != null) {
+            URL url = locator.getURL();
+            Object obj = locator.getObject();
+            Node node = locator.getNode();
+            int line = locator.getLineNumber();
+            if(url != null || line != -1) {
+                msg.append("line ").append(line);
+                if(url != null) {
+                    msg.append(" of ").append(url);
+                }
+            } else {
+                if (obj != null) {
+                    msg.append(" obj: ").append(obj.toString());
+                } else if(node != null) {
+                    msg.append(" node: ").append(node.toString());
+                }
+            }
+        } else {
+            msg.append("unavailable");
+        }
+        return msg.toString();
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/NotIdentifiableEventImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/NotIdentifiableEventImpl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/NotIdentifiableEventImpl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/NotIdentifiableEventImpl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,22 @@
+package javax.xml.bind.helpers;
+
+import javax.xml.bind.NotIdentifiableEvent;
+import javax.xml.bind.ValidationEventLocator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:20:52 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class NotIdentifiableEventImpl extends ValidationEventImpl implements NotIdentifiableEvent {
+
+    public NotIdentifiableEventImpl(int severity, String message, ValidationEventLocator locator) {
+        super(severity, message, locator);
+    }
+
+    public NotIdentifiableEventImpl(int severity, String message, ValidationEventLocator locator, Throwable linkedException) {
+        super(severity, message, locator, linkedException);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ParseConversionEventImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ParseConversionEventImpl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ParseConversionEventImpl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ParseConversionEventImpl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,22 @@
+package javax.xml.bind.helpers;
+
+import javax.xml.bind.ParseConversionEvent;
+import javax.xml.bind.ValidationEventLocator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:21:45 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ParseConversionEventImpl extends ValidationEventImpl implements ParseConversionEvent {
+
+    public ParseConversionEventImpl(int severity, String message, ValidationEventLocator locator) { 
+        super(severity, message, locator);
+    }
+
+    public ParseConversionEventImpl(int severity, String message, ValidationEventLocator locator, Throwable linkedException) {
+        super(severity, message, locator, linkedException);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/PrintConversionEventImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/PrintConversionEventImpl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/PrintConversionEventImpl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/PrintConversionEventImpl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,22 @@
+package javax.xml.bind.helpers;
+
+import javax.xml.bind.PrintConversionEvent;
+import javax.xml.bind.ValidationEventLocator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:22:17 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class PrintConversionEventImpl extends ValidationEventImpl implements PrintConversionEvent {
+
+    public PrintConversionEventImpl(int severity, String message, ValidationEventLocator locator) {
+        super(severity, message, locator);
+    }
+
+    public PrintConversionEventImpl(int severity, String message, ValidationEventLocator locator, Throwable linkedException) {
+        super(severity, message, locator, linkedException);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventImpl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventImpl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventImpl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,85 @@
+package javax.xml.bind.helpers;
+
+import javax.xml.bind.ValidationEvent;
+import javax.xml.bind.ValidationEventLocator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:15:49 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ValidationEventImpl implements ValidationEvent {
+
+    private int severity;
+    private String message;
+    private Throwable linkedException;
+    private ValidationEventLocator locator;
+
+    public ValidationEventImpl(int severity, String message, ValidationEventLocator locator) {
+        this(severity, message, locator, null);
+    }
+
+    public ValidationEventImpl(int severity, String message, ValidationEventLocator locator, Throwable linkedException) {
+        setSeverity(severity);
+        this.message = message;
+        this.locator = locator;
+        this.linkedException = linkedException;
+    }
+
+    public int getSeverity() {
+        return severity;
+    }
+
+    public void setSeverity(int severity) {
+        if (severity != 0 && severity != 1 && severity != 2) {
+            throw new IllegalArgumentException("Illegal severity");
+        }
+        this.severity = severity;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public Throwable getLinkedException() {
+        return linkedException;
+    }
+
+    public void setLinkedException(Throwable linkedException) {
+        this.linkedException = linkedException;
+    }
+
+    public ValidationEventLocator getLocator() {
+        return locator;
+    }
+
+    public void setLocator(ValidationEventLocator locator) {
+        this.locator = locator;
+    }
+
+    public String toString() {
+        String s;
+        switch (getSeverity()) {
+            case WARNING:
+                s = "WARNING";
+                break;
+            case ERROR:
+                s = "ERROR";
+                break;
+            case FATAL_ERROR:
+                s = "FATAL_ERROR";
+                break;
+            default:
+                s = String.valueOf(getSeverity());
+                break;
+        }
+        return "[severity=" + s + ", message=" + getMessage() + ", locator=" + getLocator() + "]";
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventLocatorImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventLocatorImpl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventLocatorImpl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventLocatorImpl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,130 @@
+package javax.xml.bind.helpers;
+
+import java.net.URL;
+import java.net.MalformedURLException;
+
+import javax.xml.bind.ValidationEventLocator;
+
+import org.w3c.dom.Node;
+
+import org.xml.sax.SAXParseException;
+import org.xml.sax.Locator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:22:54 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ValidationEventLocatorImpl implements ValidationEventLocator {
+
+    private URL url;
+    private int offset = -1;
+    private int lineNumber = -1;
+    private int columnNumber = -1;
+    private Object object;
+    private Node node;
+
+    public ValidationEventLocatorImpl() {
+    }
+
+    public ValidationEventLocatorImpl(Locator loc) {
+        if (loc == null) {
+            throw new IllegalArgumentException("loc must not be null");
+        }
+        url = toURL(loc.getSystemId());
+        columnNumber = loc.getColumnNumber();
+        lineNumber = loc.getLineNumber();
+    }
+
+    public ValidationEventLocatorImpl(SAXParseException e) {
+        if (e == null) {
+            throw new IllegalArgumentException("e must not be null");
+        }
+        url = toURL(e.getSystemId());
+        columnNumber = e.getColumnNumber();
+        lineNumber = e.getLineNumber();
+    }
+
+    public ValidationEventLocatorImpl(Node node) {
+        if (node == null) {
+            throw new IllegalArgumentException("node must not be null");
+        }
+        this.node = node;
+    }
+
+    public ValidationEventLocatorImpl(Object object) {
+        if (object == null) {
+            throw new IllegalArgumentException("object must not be null");
+        }
+        this.object = object;
+    }
+
+    private static URL toURL(String systemId) {
+        try {
+            return new URL(systemId);
+        }
+        catch (MalformedURLException e) {
+            return null;
+        }
+    }
+
+    public URL getURL() {
+        return url;
+    }
+
+    public void setURL(URL _url) {
+        url = _url;
+    }
+
+    public int getOffset() {
+        return offset;
+    }
+
+    public void setOffset(int offset) {
+        this.offset = offset;
+    }
+
+    public int getLineNumber() {
+        return lineNumber;
+    }
+
+    public void setLineNumber(int lineNumber) {
+        this.lineNumber = lineNumber;
+    }
+
+    public int getColumnNumber() {
+        return columnNumber;
+    }
+
+    public void setColumnNumber(int columnNumber) {
+        this.columnNumber = columnNumber;
+    }
+
+    public Object getObject() {
+        return object;
+    }
+
+    public void setObject(Object object) {
+        this.object = object;
+    }
+
+    public Node getNode() {
+        return node;
+    }
+
+    public void setNode(Node node) {
+        this.node = node;
+    }
+
+    public String toString() {
+        return "[node=" + getNode() + ", " +
+                "object=" + getObject() + ", " +
+                "url=" + getURL() + ", " +
+                "line=" + String.valueOf(getLineNumber()) + "," +
+                "col=" + String.valueOf(getColumnNumber()) + "," +
+                "offset=" + String.valueOf(getOffset()) + "]";
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBResult.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBResult.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBResult.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBResult.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,41 @@
+package javax.xml.bind.util;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.bind.UnmarshallerHandler;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:31:11 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JAXBResult extends SAXResult {
+
+    private final UnmarshallerHandler unmarshallerHandler;
+
+    public JAXBResult(JAXBContext context) throws JAXBException {
+        if (context == null) {
+            throw new JAXBException("context must not be null");
+        }
+        unmarshallerHandler = context.createUnmarshaller().getUnmarshallerHandler();
+        super.setHandler(unmarshallerHandler);
+    }
+
+    public JAXBResult(Unmarshaller unmarshaller) throws JAXBException {
+        if (unmarshaller == null) {
+            throw new JAXBException("unmarshaller must not be null");
+        }
+        unmarshallerHandler = unmarshaller.getUnmarshallerHandler();
+        super.setHandler(unmarshallerHandler);
+    }
+
+    public Object getResult() throws JAXBException {
+        return unmarshallerHandler.getResult();
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBSource.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBSource.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBSource.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBSource.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,156 @@
+package javax.xml.bind.util;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+
+import org.xml.sax.XMLReader;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.XMLFilterImpl;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:31:38 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JAXBSource extends SAXSource {
+
+    public JAXBSource(JAXBContext context, Object contentObject) throws JAXBException {
+        if (context == null) {
+            throw new JAXBException("context must not be null");
+        }
+        if (contentObject == null) {
+            throw new JAXBException("contentObject must not be null");
+        }
+        setXMLReader(new Reader(context.createMarshaller(), contentObject));
+        setInputSource(new InputSource());
+    }
+
+    public JAXBSource(final Marshaller marshaller, final Object contentObject) throws JAXBException {
+        if (marshaller == null) {
+            throw new JAXBException("marshaller must not be null");
+        }
+        if (contentObject == null) {
+            throw new JAXBException("contentObject must not be null");
+        }
+        setXMLReader(new Reader(marshaller, contentObject));
+        setInputSource(new InputSource());
+    }
+
+    private static class Reader implements XMLReader {
+
+        private LexicalHandler lexicalHandler;
+        private EntityResolver entityResolver;
+        private DTDHandler dtdHandler;
+        private XMLFilterImpl repeater;
+        private ErrorHandler errorHandler;
+        private final Marshaller marshaller;
+        private final Object contentObject;
+
+        public Reader(Marshaller marshaller, Object contentObject) {
+            this.marshaller = marshaller;
+            this.contentObject = contentObject;
+            repeater = new XMLFilterImpl();
+        }
+
+        public boolean getFeature(String name) throws SAXNotRecognizedException {
+            if (name.equals("http://xml.org/sax/features/namespaces")) {
+                return true;
+            }
+            if (name.equals("http://xml.org/sax/features/namespace-prefixes")) {
+                return false;
+            }
+            throw new SAXNotRecognizedException(name);
+        }
+
+        public void setFeature(String name, boolean value) throws SAXNotRecognizedException {
+            if (name.equals("http://xml.org/sax/features/namespaces") && value) {
+                return;
+            }
+            if (name.equals("http://xml.org/sax/features/namespace-prefixes") && !value) {
+                return;
+            }
+            throw new SAXNotRecognizedException(name);
+        }
+
+        public Object getProperty(String name) throws SAXNotRecognizedException {
+            if("http://xml.org/sax/properties/lexical-handler".equals(name)) {
+                return lexicalHandler;
+            }
+            throw new SAXNotRecognizedException(name);
+        }
+
+        public void setProperty(String name, Object value) throws SAXNotRecognizedException {
+            if("http://xml.org/sax/properties/lexical-handler".equals(name)) {
+                lexicalHandler = (LexicalHandler) value;
+                return;
+            }
+            throw new SAXNotRecognizedException(name);
+        }
+
+        public void setEntityResolver(EntityResolver resolver) {
+            entityResolver = resolver;
+        }
+
+        public EntityResolver getEntityResolver() {
+            return entityResolver;
+        }
+
+        public void setDTDHandler(DTDHandler handler) {
+            dtdHandler = handler;
+        }
+
+        public DTDHandler getDTDHandler() {
+            return dtdHandler;
+        }
+
+        public void setContentHandler(ContentHandler handler) {
+            repeater.setContentHandler(handler);
+        }
+
+        public ContentHandler getContentHandler() {
+            return repeater.getContentHandler();
+        }
+
+        public void setErrorHandler(ErrorHandler handler) {
+            errorHandler = handler;
+        }
+
+        public ErrorHandler getErrorHandler() {
+            return errorHandler;
+        }
+
+        public void parse(InputSource input) throws SAXException {
+            parse();
+        }
+
+        public void parse(String systemId) throws SAXException {
+            parse();
+        }
+
+        public void parse() throws SAXException {
+            try {
+                marshaller.marshal(contentObject, repeater);
+            } catch(JAXBException e) {
+                SAXParseException se = new SAXParseException(e.getMessage(), null, null, -1, -1, e);
+                if (errorHandler != null) {
+                    errorHandler.fatalError(se);
+                }
+                throw se;
+            }
+        }
+
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/ValidationEventCollector.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/ValidationEventCollector.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/ValidationEventCollector.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/ValidationEventCollector.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,35 @@
+package javax.xml.bind.util;
+
+import java.util.ArrayList;
+
+import javax.xml.bind.ValidationEventHandler;
+import javax.xml.bind.ValidationEvent;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 1:31:52 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ValidationEventCollector implements ValidationEventHandler {
+
+    private ArrayList<ValidationEvent> events = new ArrayList<ValidationEvent>();
+
+    public ValidationEvent[] getEvents() {
+        return events.toArray(new ValidationEvent[events.size()]);
+    }
+
+    public boolean handleEvent(ValidationEvent event) {
+        events.add(event);
+        return event.getSeverity() != ValidationEvent.FATAL_ERROR;
+    }
+
+    public boolean hasEvents() {
+        return !events.isEmpty();
+    }
+
+    public void reset() {
+        events.clear();
+    }
+}

Propchange: servicemix/smx4/specs/trunk/jaxws-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Apr 22 10:09:14 2008
@@ -0,0 +1,9 @@
+target
+*.iml
+*.ipr
+*.iws
+.classpath
+.project
+.settings
+
+

Added: servicemix/smx4/specs/trunk/jaxws-api/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxws-api/pom.xml?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxws-api/pom.xml (added)
+++ servicemix/smx4/specs/trunk/jaxws-api/pom.xml Tue Apr 22 10:09:14 2008
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!--
+
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You 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.
+  -->
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+      <groupId>org.apache.servicemix.specs</groupId>
+      <artifactId>specs</artifactId>
+      <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.servicemix.specs</groupId>
+  <artifactId>org.apache.servicemix.specs.jaxws-api-2.0</artifactId>
+  <packaging>bundle</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>Apache ServiceMix Specs :: JAXWS API</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.axis2</groupId>
+      <artifactId>axis2-jaxws-api</artifactId>
+      <version>1.3</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix.specs</groupId>
+      <artifactId>org.apache.servicemix.specs.locator</artifactId>
+      <version>${project.version}</version>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+
+  <build>
+      <plugins>
+          <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <executions>
+                  <execution>
+                      <goals>
+                          <goal>bundle</goal>
+                      </goals>
+                  </execution>
+              </executions>
+              <configuration>
+                  <instructions>
+                      <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                      <Export-Package>javax.xml.ws*;version=2.0;-split-package:=merge-first</Export-Package>
+                      <Import-Package>*</Import-Package>
+                      <Private-Package>org.apache.servicemix.specs.locator</Private-Package>
+                      <Bundle-Activator>org.apache.servicemix.specs.locator.Activator</Bundle-Activator>
+                  </instructions>
+                  <unpackBundle>true</unpackBundle>
+              </configuration>
+          </plugin>
+      </plugins>
+  </build>
+
+</project>

Added: servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/ws/spi/FactoryFinder.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/ws/spi/FactoryFinder.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/ws/spi/FactoryFinder.java (added)
+++ servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/ws/spi/FactoryFinder.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,115 @@
+/*
+ **
+ ** Licensed to the Apache Software Foundation (ASF) under one
+ ** or more contributor license agreements.  See the NOTICE file
+ ** distributed with this work for additional information
+ ** regarding copyright ownership.  The ASF licenses this file
+ ** to you 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 javax.xml.ws.spi;
+
+import java.io.InputStream;
+import java.io.File;
+import java.io.FileInputStream;
+
+import java.util.Properties;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+import javax.xml.ws.WebServiceException;
+
+class FactoryFinder {
+	static Object locate(String factoryId) {
+		return locate(factoryId, null);
+	}
+
+	static Object locate(String factoryId, String altClassName) {
+		return locate(factoryId, altClassName, Thread.currentThread().getContextClassLoader());
+	}
+
+	static Object locate(String factoryId, String altClassName, ClassLoader classLoader) {
+        try {
+            // If we are deployed into an OSGi environment, leverage it
+            Class spiClass = org.apache.servicemix.specs.locator.OsgiLocator.locate(factoryId);
+            if (spiClass != null) {
+                return spiClass.newInstance();
+            }
+        } catch (Throwable e) {
+        }
+
+		String serviceId = "META-INF/services/" + factoryId;
+		try {
+			InputStream is = null;
+
+			if (classLoader == null) {
+				is = ClassLoader.getSystemResourceAsStream(serviceId);
+			} else {
+				is = classLoader.getResourceAsStream(serviceId);
+			}
+
+			if (is != null) {
+				BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+				String factoryClassName = br.readLine();
+				br.close();
+
+				if (factoryClassName != null && !"".equals(factoryClassName)) {
+					return loadFactory(factoryClassName, classLoader);
+				}
+			}
+		} catch (Exception ex) {
+		}
+
+        try {
+            String configFile = System.getProperty("java.home")
+                    + File.separator + "lib" + File.separator
+                    + "jaxws.properties";
+            File f = new File(configFile);
+            if (f.exists()) {
+                Properties props = new Properties();
+                props.load(new FileInputStream(f));
+                String factoryClassName = props.getProperty(factoryId);
+                return loadFactory(factoryClassName, classLoader);
+            }
+        } catch (Exception e) {
+        }
+
+        try {
+			String prop = System.getProperty(factoryId);
+			if (prop != null) {
+				return loadFactory(prop, classLoader);
+			}
+		} catch (Exception e) {
+		}
+
+		if (altClassName == null) {
+			throw new WebServiceException("Unable to locate factory for " + factoryId + ".", null);
+		}
+		return loadFactory(altClassName, classLoader);
+	}
+
+	private static Object loadFactory(String className, ClassLoader classLoader) {
+		try {
+			Class factoryClass = classLoader == null ? Class.forName(className)
+					                                 : classLoader.loadClass(className);
+			return factoryClass.newInstance();
+		} catch (ClassNotFoundException x) {
+			throw new WebServiceException("Requested factory "
+					+ className + " cannot be located.  Classloader ="
+					+ classLoader.toString(), x);
+		} catch (Exception x) {
+			throw new WebServiceException("Requested factory "
+					+ className + " could not be instantiated: " + x, x);
+		}
+	}
+}

Added: servicemix/smx4/specs/trunk/locator/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/locator/pom.xml?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/locator/pom.xml (added)
+++ servicemix/smx4/specs/trunk/locator/pom.xml Tue Apr 22 10:09:14 2008
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!--
+
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You 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.
+  -->
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+      <groupId>org.apache.servicemix.specs</groupId>
+      <artifactId>specs</artifactId>
+      <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.servicemix.specs</groupId>
+  <artifactId>org.apache.servicemix.specs.locator</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>Apache ServiceMix Specs :: Locator</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>${felix.osgi.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <properties>
+      <pkgArtifactId>woodstox</pkgArtifactId>
+      <pkgVersion>${woodstox.version}</pkgVersion>
+      <servicemix.osgi.import.pkg>
+          com.sun.msv*;resolution:=optional,
+          org.relaxng*;resolution:=optional,
+          *
+      </servicemix.osgi.import.pkg>
+      <servicemix.osgi.export>
+          com.ctc.wstx*;version=${pkgVersion};-split-package:=merge-first,
+          org.codehaus.stax2*;version=${pkgVersion};-split-package:=merge-first,
+      </servicemix.osgi.export>
+      <servicemix.osgi.private.pkg>
+          META-INF*
+      </servicemix.osgi.private.pkg>
+  </properties>
+
+</project>



Mime
View raw message