You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2006/11/24 13:04:29 UTC

svn commit: r478847 [1/3] - in /webservices/jaxme/branches/MAVEN/jaxme-api: ./ src/ src/main/ src/main/java/ src/main/java/javax/ src/main/java/javax/xml/ src/main/java/javax/xml/bind/ src/main/java/javax/xml/bind/helpers/ src/main/java/javax/xml/bind/...

Author: jochen
Date: Fri Nov 24 04:04:25 2006
New Revision: 478847

URL: http://svn.apache.org/viewvc?view=rev&rev=478847
Log:
Pulling JAXME-87 in. We have a Maven 2 build now, but the site isn't yet done.

Added:
    webservices/jaxme/branches/MAVEN/jaxme-api/   (with props)
    webservices/jaxme/branches/MAVEN/jaxme-api/pom.xml
    webservices/jaxme/branches/MAVEN/jaxme-api/src/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/XMLConstants.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverter.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Element.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBContext.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBException.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/MarshalException.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Marshaller.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/ParseConversionEvent.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/PrintConversionEvent.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/PropertyException.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/TypeConstraintException.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/UnmarshalException.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Unmarshaller.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/UnmarshallerHandler.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/ValidationEvent.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/ValidationEventHandler.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/ValidationEventLocator.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/ValidationException.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Validator.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/AbstractMarshallerImpl.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/DefaultValidationEventHandler.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/NotIdentifiableEventImpl.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/ParseConversionEventImpl.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/PrintConversionEventImpl.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/ValidationEventImpl.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/ValidationEventLocatorImpl.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/helpers/package.html
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/package.html
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/util/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/util/JAXBResult.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/util/JAXBSource.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/util/ValidationEventCollector.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/util/package.html
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/namespace/
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/namespace/NamespaceContext.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/namespace/QName.java
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/namespace/package.html
    webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/package.html

Propchange: webservices/jaxme/branches/MAVEN/jaxme-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 24 04:04:25 2006
@@ -0,0 +1 @@
+target

Added: webservices/jaxme/branches/MAVEN/jaxme-api/pom.xml
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/pom.xml?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/pom.xml (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/pom.xml Fri Nov 24 04:04:25 2006
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+
+  Copyright 2005  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.
+
+-->
+<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">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.ws.jaxme</groupId>
+    <artifactId>jaxme-parent</artifactId>
+    <version>1-SNAPSHOT</version>
+  </parent>
+  <artifactId>jaxme-api</artifactId>
+  <version>0.6-SNAPSHOT</version>
+  <name>JaxMe API</name>
+</project>

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/XMLConstants.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/XMLConstants.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/XMLConstants.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/XMLConstants.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+package javax.xml;
+
+/** <p>This class contains a set of constants, as specified
+ * by various W3C and other standards.</p>
+ *
+ * @author JSR-31
+ * @since JAXB 1.0
+ */
+public class XMLConstants {
+  /** <p>This constant is used to represent the default
+   * namespace. Elements or attributes in the default
+   * namespace are sometimes also referred as "having no
+   * namespace". The constant value is "" (the empty
+   * string).</p>
+   * <p><em>Note</em>: The default namespace is used like this
+   * in SAX handlers. Note, that DOM uses <code>null</code>
+   * to represent the default namespace, hence a different
+   * value.</p> 
+   */
+  public static final String DEFAULT_NS_PREFIX = "";
+
+  /** <p>Constant holding the reserved "xml" prefix. This
+   * prefix is reserved by the XML namespace standard. Unlike
+   * other prefixes, this one is fixed and will always be
+   * associated with the same namespace, {@link #XML_NS_URI}.
+   * Namespace and prefix are reserved by the XML namespace
+   * standard for use by the XML specifications.</p>
+   * <p><em>Note</em>: Not only the prefix "xml" itself is
+   * reserved, but also any other prefix beginning with
+   * "xml". For example, a "new_prefix" may be declared in an
+   * XML instance by using the attribute "xmlns:new_prefix".</p>
+   */
+   public static final String XML_NS_PREFIX = "xml";
+
+  /** <p>Constant holding the reserved namespace URI associated
+   * with the "xml" prefix. Namespace and prefix are reserved
+   * by the XML namespace standard for use by the XML specifications.</p>
+   */
+  public static final java.lang.String XML_NS_URI =
+      "http://www.w3.org/XML/1998/namespace";
+
+  /** <p>Constant holding the attribute name for declaration
+   * of new prefixes. The constant value is "xmlns".</p>
+   * <p><em>Note</em>: This is both an attribute name
+   * and a namespace prefix: For example, to assign the empty
+   * prefix to a namespace, one would use
+   * <pre>
+   *   xmlns="http://my.namespace/..."
+   * </pre>
+   * But for assigning the prefix "pre" to the same namespace,
+   * one would use
+   * <pre>
+   *   xmlns:pre="http://my.namespace/..."
+   * </pre></p>
+   */
+  public static final java.lang.String XMLNS_ATTRIBUTE = "xmlns";
+
+  /** <p>Constant holding the namespace of the "xmlns" attribute:
+   * "http://www.w3.org/2000/xmlns/".</p>
+   * <p><em>Note</em>: This namespace will always be used for the
+   * attribute, regardless whether you used it as an attribute name
+   * (as in <code>xmlns="..."</code> or as an attribute prefix
+   * (as in <code>xmlns:pre="..."</code>).</p>
+   */
+  public static final java.lang.String XMLNS_ATTRIBUTE_NS_URI =
+      "http://www.w3.org/2000/xmlns/";
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverter.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverter.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverter.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverter.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,513 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+/** <p>This is a helper class for customized datatypes. It provides a
+ * set of static methods which may be useful in custom methods for
+ * parsing and printing values.</p>
+ * <p>The JAXB provider is responsible to initialize the
+ * <code>DatatypeConverter</code> class by invoking
+ * {@link #setDatatypeConverter(DatatypeConverterInterface)} as soon
+ * as possible.</p>
+ *
+ * @author JSR-31
+ * @since JAXB1.0
+ */
+public final class DatatypeConverter {
+  private static DatatypeConverterInterface converter;
+
+  /** <p>This method must be invoked by the JAXB provider to set the actual
+   * instance, which is invoked by the static methods. Subsequent
+   * invocations of the method are ignored: First come, first wins.</p>
+   * @throws IllegalArgumentException The parameter was null.
+   */
+  public static void setDatatypeConverter(DatatypeConverterInterface pConverter) {
+    if (pConverter == null) {
+      throw new IllegalArgumentException("The parameter must not be null.");
+    }
+    synchronized (DatatypeConverter.class) {
+      if (converter == null) {
+        converter = pConverter;
+      }
+    }
+  }
+
+  /** <p>Parses the lexical representation and converts it into a String.</p>
+   *
+   * @param pLexicalXSDString The input string being parsed.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static String parseString(String pLexicalXSDString) {
+    return converter.parseString(pLexicalXSDString);
+  }
+
+  /** <p>Parses the lexical representation of the given integer value
+   * (arbitrary precision) and converts it into an instance of
+   * {@link java.math.BigInteger}.</p>
+   * @param pLexicalXSDInteger The input string being parsed.
+   * @return The input string converted into an instance of {@link BigInteger}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static BigInteger parseInteger(String pLexicalXSDInteger) {
+    return converter.parseInteger(pLexicalXSDInteger);
+  }
+
+  /** <p>Parses the lexical representation of the given 32 bit integer value
+   * and converts it into a primitive <code>int</code> value.</p>
+   * @param pLexicalXSDInt The input string being parsed.
+   * @return The input string converted into a primitive <code>int</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static int parseInt(String pLexicalXSDInt) {
+    return converter.parseInt(pLexicalXSDInt);
+  }
+
+  /** <p>Parses the lexical representation of the given 64 bit integer value
+   * and converts it into a primitive <code>long</code> value.</p>
+   * @param pLexicalXSDLong The input string being parsed.
+   * @return The input string converted into a primitive <code>long</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static long parseLong(String pLexicalXSDLong) {
+    return converter.parseLong(pLexicalXSDLong);
+  }
+
+  /** <p>Parses the lexical representation of the given 16 bit integer value
+   * and converts it into a primitive <code>short</code> value.</p>
+   * @param pLexicalXSDShort The input string being parsed.
+   * @return The input string converted into a primitive <code>short</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static short parseShort(String pLexicalXSDShort) {
+    return converter.parseShort(pLexicalXSDShort);
+  }
+
+  /** <p>Parses the lexical representation of the given decimal value
+   * (arbitrary precision) and converts it into an instance of
+   * {@link java.math.BigDecimal}.</p>
+   * @param pLexicalXSDDecimal The input string being parsed.
+   * @return The input string converted into an instance of {@link java.math.BigDecimal}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static BigDecimal parseDecimal(String pLexicalXSDDecimal) {
+    return converter.parseDecimal(pLexicalXSDDecimal);
+  }
+
+  /** <p>Parses the lexical representation of the given 32 bit floating
+   * point value and converts it into a primitive <code>float</code> value.</p>
+   * @param pLexicalXSDFloat The input string being parsed.
+   * @return The input string converted into a primitive <code>float</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static float parseFloat(String pLexicalXSDFloat) {
+    return converter.parseFloat(pLexicalXSDFloat);
+  }
+
+  /** <p>Parses the lexical representation of the given 64 bit floating
+   * point value and converts it into a primitive <code>double</code> value.</p>
+   * @param pLexicalXSDDouble The input string being parsed.
+   * @return The input string converted into a primitive <code>double</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static double parseDouble(String pLexicalXSDDouble) {
+    return converter.parseDouble(pLexicalXSDDouble);
+  }
+
+  /** <p>Parses the lexical representation of the given boolean value
+   * and converts it into a primitive <code>boolean</code> value.</p>
+   * @param pLexicalXSDBoolean The input string being parsed.
+   * @return The input string converted into a primitive <code>boolean</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static boolean parseBoolean(String pLexicalXSDBoolean) {
+    return converter.parseBoolean(pLexicalXSDBoolean);
+  }
+
+  /** <p>Parses the lexical representation of the given 8 bit integer value
+   * and converts it into a primitive <code>byte</code> value.</p>
+   * @param pLexicalXSDByte The input string being parsed.
+   * @return The input string converted into a primitive <code>byte</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static byte parseByte(String pLexicalXSDByte) {
+    return converter.parseByte(pLexicalXSDByte);
+  }
+
+  /** <p>Parses the lexical representation of the given qualified name
+   * and converts it into an instance of {@link javax.xml.namespace.QName}.
+   * The {@link javax.xml.namespace.QName} consists of a namespace URI
+   * and a local name.</p>
+   * @param pLexicalXSDQName The input string being parsed, an optional
+   *   namespace prefix, followed by the local name, if any. If a prefix
+   *   is present, they are separated by a colon.
+   * @param pNamespaceContext The namespace context is used to query
+   *   mappings between prefixes and namespace URI's.
+   * @return The input string converted into an instance of
+   *   {@link javax.xml.namespace.QName}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static QName parseQName(String pLexicalXSDQName,
+                                  NamespaceContext pNamespaceContext) {
+    return converter.parseQName(pLexicalXSDQName, pNamespaceContext);                        
+  }
+
+  /** <p>Parses the lexical representation of the given dateTime value
+   * and converts it into an instance of {@link java.util.Calendar}.
+   * Valid lexical representations of a dateTime value include
+   * <pre>
+   *   YYYY-MM-DDThh:mm:ss
+   *   YYYY-MM-DDThh:mm:ss.sss
+   *   YYYY-MM-DDThh:mm:ssZ
+   *   YYYY-MM-DDThh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pLexicalXSDDateTime The input string being parsed.
+   * @return The input string converted into an instance of
+   *   {@link java.util.Calendar}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static Calendar parseDateTime(String pLexicalXSDDateTime) {
+    return converter.parseDateTime(pLexicalXSDDateTime);
+  }
+
+  /** <p>Parses the lexical representation of the given byte array, which
+   * is encoded in base 64.</p>
+   * @param pLexicalXSDBase64Binary The input string being parsed, a
+   *   base 64 encoded array of bytes.
+   * @return The decoded byte array.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static byte[] parseBase64Binary(String pLexicalXSDBase64Binary) {
+    return converter.parseBase64Binary(pLexicalXSDBase64Binary);
+  }
+
+  /** <p>Parses the lexical representation of the given byte array, which
+   * is encoded in hex digits.</p>
+   * @param pLexicalXSDHexBinary The input string being parsed, an
+   *    array of bytes encoded in hex digits.
+   * @return The decoded byte array.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static byte[] parseHexBinary(String pLexicalXSDHexBinary) {
+    return converter.parseHexBinary(pLexicalXSDHexBinary);
+  }
+
+  /** <p>Parses the lexical representation of the given 32 bit
+   * unsignet integer value and converts it into a primitive <code>long</code>
+   * value.</p>
+   * @param pLexicalXSDUnsignedInt The input string being parsed.
+   * @return The input string converted into a primitive <code>long</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static long parseUnsignedInt(String pLexicalXSDUnsignedInt) {
+    return converter.parseUnsignedInt(pLexicalXSDUnsignedInt);
+  }
+
+  /** <p>Parses the lexical representation of the given 16 bit
+   * unsignet integer value and converts it into a primitive <code>int</code>
+   * value.</p>
+   * @param pLexicalXSDUnsignedShort The input string being parsed.
+   * @return The input string conve
+   * rted into a primitive <code>int</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public static int parseUnsignedShort(String pLexicalXSDUnsignedShort) {
+    return converter.parseUnsignedShort(pLexicalXSDUnsignedShort);
+  }
+
+  /** <p>Parses the lexical representation of the given time value
+   * and converts it into an instance of {@link java.util.Calendar}.
+   * Valid lexical representations of a time value include
+   * <pre>
+   *   hh:mm:ss
+   *   hh:mm:ss.sss
+   *   hh:mm:ssZ
+   *   hh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pLexicalXSDTime The input string being parsed.
+   * @return The input string converted into an instance of
+   *   {@link java.util.Calendar}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static Calendar parseTime(String pLexicalXSDTime) {
+    return converter.parseTime(pLexicalXSDTime);
+  }
+
+  /** <p>Parses the lexical representation of the given date value
+   * and converts it into an instance of {@link java.util.Calendar}.
+   * Valid lexical representations of a date value include
+   * <pre>
+   *   YYYY-MM-DD
+   *   YYYY-MM-DDZ
+   *   YYYY-MM-DD-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pLexicalXSDDate The input string being parsed.
+   * @return The input string converted into an instance of
+   *   {@link java.util.Calendar}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static Calendar parseDate(String pLexicalXSDDate) {
+    return converter.parseDate(pLexicalXSDDate);
+  }
+
+  /** <p>Returns the lexical representation of the input string, which is
+   * the unmodified input string.</p>
+   * @param pLexicalXSDAnySimpleType An input string in lexical representation.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public static String parseAnySimpleType(String pLexicalXSDAnySimpleType) {
+    return converter.parseAnySimpleType(pLexicalXSDAnySimpleType);
+  }
+
+  /** <p>Returns a lexical representation of the given input string, which
+   * is the unmodified input string.</p>
+   * @param pValue The input string.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printString(String pValue) {
+    return converter.printString(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given instance of
+   * {@link BigInteger}, which is an integer in arbitrary precision.</p>
+   * @param pValue The integer value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printInteger(BigInteger pValue) {
+    return converter.printInteger(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 32 bit integer.</p>
+   * @param pValue The <code>int</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printInt(int pValue) {
+    return converter.printInt(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 64 bit integer.</p>
+   * @param pValue The <code>long</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printLong(long pValue) {
+    return converter.printLong(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 16 bit integer.</p>
+   * @param pValue The <code>short</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printShort(short pValue) {
+    return converter.printShort(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given instance of
+   * {@link BigDecimal}, which is a decimal number in arbitrary
+   * precision.</p>
+   * @param pValue The decimal value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printDecimal(BigDecimal pValue) {
+    return converter.printDecimal(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 32 bit floating point number.</p>
+   * @param pValue The <code>float</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printFloat(float pValue) {
+    return converter.printFloat(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 64 bit floating point number.</p>
+   * @param pValue The <code>double</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printDouble(double pValue) {
+    return converter.printDouble(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive
+   * boolean value.</p>
+   * @param pValue The <code>boolean</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printBoolean(boolean pValue) {
+    return converter.printBoolean(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 8 bit integer.</p>
+   * @param pValue The <code>byte</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printByte(byte pValue) {
+    return converter.printByte(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given qualified
+   * name, which is a combination of namespace URI and local name.
+   * The lexical representation is an optional prefix, which is
+   * currently mapped to namespace URI of the qualified name,
+   * followed by a colon and the local name. If the namespace URI
+   * is the current default namespace URI, then the prefix and
+   * the colon may be omitted.</p>
+   * @param pValue The qualified name being converted.
+   * @param pNamespaceContext A mapping of prefixes to namespace
+   *   URI's which may be used to determine a valid prefix.
+   * @return A lexical representation of the qualified name.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printQName(QName pValue,
+                                   NamespaceContext pNamespaceContext) {
+    return converter.printQName(pValue, pNamespaceContext);                            
+  }
+
+  /** <p>Returns a lexical representation of the given dateTime
+   * value. Valid lexical representations include:
+   * <pre>
+   *   YYYY-MM-DDThh:mm:ss
+   *   YYYY-MM-DDThh:mm:ss.sss
+   *   YYYY-MM-DDThh:mm:ssZ
+   *   YYYY-MM-DDThh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pValue The dateTime value being converted
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printDateTime(Calendar pValue) {
+    return converter.printDateTime(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given byte array.
+   * The lexical representation is obtained by application of the
+   * base 64 encoding.</p>
+   * @param pValue The byte array being converted.
+   * @return The converted byte array.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printBase64Binary(byte[] pValue) {
+    return converter.printBase64Binary(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given byte array.
+   * The lexical representation is obtained by encoding any byte
+   * as two hex digits.</p>
+   * @param pValue The byte array being converted.
+   * @return The converted byte array.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printHexBinary(byte[] pValue) {
+    return converter.printHexBinary(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive,
+   * unsigned 32 bit integer.</p>
+   * @param pValue The <code>long</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printUnsignedInt(long pValue) {
+    return converter.printUnsignedInt(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given primitive,
+   * unsigned 16 bit integer.</p>
+   * @param pValue The <code>short</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printUnsignedShort(int pValue) {
+    return converter.printUnsignedShort(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given time
+   * value. Valid lexical representations include:
+   * <pre>
+   *   hh:mm:ss
+   *   hh:mm:ss.sss
+   *   hh:mm:ssZ
+   *   hh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pValue The time value being converted
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printTime(Calendar pValue) {
+    return converter.printTime(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given date
+   * value. Valid lexical representations include:
+   * <pre>
+   *   YYYY-MM-DD
+   *   YYYY-MM-DDZ
+   *   YYYY-MM-DD-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pValue The date value being converted
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printDate(Calendar pValue) {
+    return converter.printDate(pValue);
+  }
+
+  /** <p>Returns a lexical representation of the given input
+   * string, which is the unmodified input string.</p>
+   * @param pValue The input string.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public static String printAnySimpleType(String pValue) {
+    return converter.printAnySimpleType(pValue);
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,435 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+
+/** <p>The <code>DatatypeConverterInterface</code> is a helper class for
+ * implementation of custom <code>print()</code> and <code>parse()</code>
+ * methods, as specified by <samp>jaxb:javaType/@printMethod</samp> and
+ * <samp>jaxb:javaType/@parseMethod</samp>. However, the JAXB user won't
+ * be accessing this class directly. The JAXB provider is required to
+ * create an instance of this class and pass it to the JAXB runtime by
+ * invoking
+ * {@link javax.xml.bind.DatatypeConverter#setDatatypeConverter(DatatypeConverterInterface)}.
+ * The JAXB user may access this instance via the static methods of
+ * {@link javax.xml.bind.DatatypeConverter}.</p>
+ * <p>The interface provides methods <code>parseFoo()</code> and
+ * <code>printFoo()</code> for any XML Schema type <samp>foo</samp>.
+ * The <code>parseFoo()</code> method must accept any lexically valid
+ * value and convert it into the corresponding canonical value. An error
+ * in the conversion routine must be mapped to a
+ * {@link javax.xml.bind.ParseConversionEvent}.</p>
+ * <p>The <code>printFoo(foo pValue)</code> method must convert the value
+ * <samp>pValue</samp> into an arbitrary lexical representation. It is
+ * recommended to use the default representation.</p>
+ *  
+ * @author JSR-31
+ * @since JAXB 1.0
+ * @see javax.xml.bind.DatatypeConverter
+ * @see javax.xml.bind.ParseConversionEvent
+ * @see javax.xml.bind.PrintConversionEvent
+ */
+public interface DatatypeConverterInterface {
+  /** <p>Parses the lexical representation and converts it into a String.</p>
+   *
+   * @param pLexicalXSDString The input string being parsed.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public String parseString(String pLexicalXSDString);
+
+  /** <p>Parses the lexical representation of the given integer value
+   * (arbitrary precision) and converts it into an instance of
+   * {@link java.math.BigInteger}.</p>
+   * @param pLexicalXSDInteger The input string being parsed.
+   * @return The input string converted into an instance of {@link BigInteger}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public BigInteger parseInteger(String pLexicalXSDInteger);
+
+  /** <p>Parses the lexical representation of the given 32 bit integer value
+   * and converts it into a primitive <code>int</code> value.</p>
+   * @param pLexicalXSDInt The input string being parsed.
+   * @return The input string converted into a primitive <code>int</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public int parseInt(String pLexicalXSDInt);
+
+  /** <p>Parses the lexical representation of the given 64 bit integer value
+   * and converts it into a primitive <code>long</code> value.</p>
+   * @param pLexicalXSDLong The input string being parsed.
+   * @return The input string converted into a primitive <code>long</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public long parseLong(String pLexicalXSDLong);
+
+  /** <p>Parses the lexical representation of the given 16 bit integer value
+   * and converts it into a primitive <code>short</code> value.</p>
+   * @param pLexicalXSDShort The input string being parsed.
+   * @return The input string converted into a primitive <code>short</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public short parseShort(String pLexicalXSDShort);
+
+  /** <p>Parses the lexical representation of the given decimal value
+   * (arbitrary precision) and converts it into an instance of
+   * {@link java.math.BigDecimal}.</p>
+   * @param pLexicalXSDDecimal The input string being parsed.
+   * @return The input string converted into an instance of {@link java.math.BigDecimal}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public BigDecimal parseDecimal(String pLexicalXSDDecimal);
+
+  /** <p>Parses the lexical representation of the given 32 bit floating
+   * point value and converts it into a primitive <code>float</code> value.</p>
+   * @param pLexicalXSDFloat The input string being parsed.
+   * @return The input string converted into a primitive <code>float</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public float parseFloat(String pLexicalXSDFloat);
+
+  /** <p>Parses the lexical representation of the given 64 bit floating
+   * point value and converts it into a primitive <code>double</code> value.</p>
+   * @param pLexicalXSDDouble The input string being parsed.
+   * @return The input string converted into a primitive <code>double</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public double parseDouble(String pLexicalXSDDouble);
+
+  /** <p>Parses the lexical representation of the given boolean value
+   * and converts it into a primitive <code>boolean</code> value.</p>
+   * @param pLexicalXSDBoolean The input string being parsed.
+   * @return The input string converted into a primitive <code>boolean</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public boolean parseBoolean(String pLexicalXSDBoolean);
+
+  /** <p>Parses the lexical representation of the given 8 bit integer value
+   * and converts it into a primitive <code>byte</code> value.</p>
+   * @param pLexicalXSDByte The input string being parsed.
+   * @return The input string converted into a primitive <code>byte</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public byte parseByte(String pLexicalXSDByte);
+
+  /** <p>Parses the lexical representation of the given qualified name
+   * and converts it into an instance of {@link javax.xml.namespace.QName}.
+   * The {@link javax.xml.namespace.QName} consists of a namespace URI
+   * and a local name.</p>
+   * @param pLexicalXSDQName The input string being parsed, an optional
+   *   namespace prefix, followed by the local name, if any. If a prefix
+   *   is present, they are separated by a colon.
+   * @param pNamespaceContext The namespace context is used to query
+   *   mappings between prefixes and namespace URI's.
+   * @return The input string converted into an instance of
+   *   {@link javax.xml.namespace.QName}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public QName parseQName(String pLexicalXSDQName,
+                          NamespaceContext pNamespaceContext);
+
+  /** <p>Parses the lexical representation of the given dateTime value
+   * and converts it into an instance of {@link java.util.Calendar}.
+   * Valid lexical representations of a dateTime value include
+   * <pre>
+   *   YYYY-MM-DDThh:mm:ss
+   *   YYYY-MM-DDThh:mm:ss.sss
+   *   YYYY-MM-DDThh:mm:ssZ
+   *   YYYY-MM-DDThh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pLexicalXSDDateTime The input string being parsed.
+   * @return The input string converted into an instance of
+   *   {@link java.util.Calendar}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public Calendar parseDateTime(String pLexicalXSDDateTime);
+
+  /** <p>Parses the lexical representation of the given byte array, which
+   * is encoded in base 64.</p>
+   * @param pLexicalXSDBase64Binary The input string being parsed, a
+   *   base 64 encoded array of bytes.
+   * @return The decoded byte array.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public byte[] parseBase64Binary(String pLexicalXSDBase64Binary);
+
+  /** <p>Parses the lexical representation of the given byte array, which
+   * is encoded in hex digits.</p>
+   * @param pLexicalXSDHexBinary The input string being parsed, an
+   *    array of bytes encoded in hex digits.
+   * @return The decoded byte array.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public byte[] parseHexBinary(String pLexicalXSDHexBinary);
+
+  /** <p>Parses the lexical representation of the given 32 bit
+   * unsignet integer value and converts it into a primitive <code>long</code>
+   * value.</p>
+   * @param pLexicalXSDUnsignedInt The input string being parsed.
+   * @return The input string converted into a primitive <code>long</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public long parseUnsignedInt(String pLexicalXSDUnsignedInt);
+
+  /** <p>Parses the lexical representation of the given 16 bit
+   * unsignet integer value and converts it into a primitive <code>int</code>
+   * value.</p>
+   * @param pLexicalXSDUnsignedShort The input string being parsed.
+   * @return The input string conve
+   * rted into a primitive <code>int</code>.
+   * @see javax.xml.bind.ParseConversionEvent
+   */ 
+  public int parseUnsignedShort(String pLexicalXSDUnsignedShort);
+
+  /** <p>Parses the lexical representation of the given time value
+   * and converts it into an instance of {@link java.util.Calendar}.
+   * Valid lexical representations of a time value include
+   * <pre>
+   *   hh:mm:ss
+   *   hh:mm:ss.sss
+   *   hh:mm:ssZ
+   *   hh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pLexicalXSDTime The input string being parsed.
+   * @return The input string converted into an instance of
+   *   {@link java.util.Calendar}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public Calendar parseTime(String pLexicalXSDTime);
+
+  /** <p>Parses the lexical representation of the given date value
+   * and converts it into an instance of {@link java.util.Calendar}.
+   * Valid lexical representations of a date value include
+   * <pre>
+   *   YYYY-MM-DD
+   *   YYYY-MM-DDZ
+   *   YYYY-MM-DD-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pLexicalXSDDate The input string being parsed.
+   * @return The input string converted into an instance of
+   *   {@link java.util.Calendar}.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public Calendar parseDate(String pLexicalXSDDate);
+
+  /** <p>Returns the lexical representation of the input string, which is
+   * the unmodified input string.</p>
+   * @param pLexicalXSDAnySimpleType An input string in lexical representation.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.ParseConversionEvent
+   */
+  public String parseAnySimpleType(String pLexicalXSDAnySimpleType);
+
+  /** <p>Returns a lexical representation of the given input string, which
+   * is the unmodified input string.</p>
+   * @param pValue The input string.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printString(String pValue);
+
+  /** <p>Returns a lexical representation of the given instance of
+   * {@link BigInteger}, which is an integer in arbitrary precision.</p>
+   * @param pValue The integer value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printInteger(BigInteger pValue);
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 32 bit integer.</p>
+   * @param pValue The <code>int</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printInt(int pValue);
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 64 bit integer.</p>
+   * @param pValue The <code>long</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printLong(long pValue);
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 16 bit integer.</p>
+   * @param pValue The <code>short</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printShort(short pValue);
+
+  /** <p>Returns a lexical representation of the given instance of
+   * {@link BigDecimal}, which is a decimal number in arbitrary
+   * precision.</p>
+   * @param pValue The decimal value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printDecimal(BigDecimal pValue);
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 32 bit floating point number.</p>
+   * @param pValue The <code>float</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printFloat(float pValue);
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 64 bit floating point number.</p>
+   * @param pValue The <code>double</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printDouble(double pValue);
+
+  /** <p>Returns a lexical representation of the given primitive
+   * boolean value.</p>
+   * @param pValue The <code>boolean</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printBoolean(boolean pValue);
+
+  /** <p>Returns a lexical representation of the given primitive
+   * 8 bit integer.</p>
+   * @param pValue The <code>byte</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printByte(byte pValue);
+
+  /** <p>Returns a lexical representation of the given qualified
+   * name, which is a combination of namespace URI and local name.
+   * The lexical representation is an optional prefix, which is
+   * currently mapped to namespace URI of the qualified name,
+   * followed by a colon and the local name. If the namespace URI
+   * is the current default namespace URI, then the prefix and
+   * the colon may be omitted.</p>
+   * @param pValue The qualified name being converted.
+   * @param pNamespaceContext A mapping of prefixes to namespace
+   *   URI's which may be used to determine a valid prefix.
+   * @return A lexical representation of the qualified name.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printQName(QName pValue,
+                            NamespaceContext pNamespaceContext);
+
+  /** <p>Returns a lexical representation of the given dateTime
+   * value. Valid lexical representations include:
+   * <pre>
+   *   YYYY-MM-DDThh:mm:ss
+   *   YYYY-MM-DDThh:mm:ss.sss
+   *   YYYY-MM-DDThh:mm:ssZ
+   *   YYYY-MM-DDThh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pValue The dateTime value being converted
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printDateTime(Calendar pValue);
+
+  /** <p>Returns a lexical representation of the given byte array.
+   * The lexical representation is obtained by application of the
+   * base 64 encoding.</p>
+   * @param pValue The byte array being converted.
+   * @return The converted byte array.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printBase64Binary(byte[] pValue);
+
+  /** <p>Returns a lexical representation of the given byte array.
+   * The lexical representation is obtained by encoding any byte
+   * as two hex digits.</p>
+   * @param pValue The byte array being converted.
+   * @return The converted byte array.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printHexBinary(byte[] pValue);
+
+  /** <p>Returns a lexical representation of the given primitive,
+   * unsigned 32 bit integer.</p>
+   * @param pValue The <code>long</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public java.lang.String printUnsignedInt(long pValue);
+
+  /** <p>Returns a lexical representation of the given primitive,
+   * unsigned 16 bit integer.</p>
+   * @param pValue The <code>short</code> value being converted.
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public java.lang.String printUnsignedShort(int pValue);
+
+  /** <p>Returns a lexical representation of the given time
+   * value. Valid lexical representations include:
+   * <pre>
+   *   hh:mm:ss
+   *   hh:mm:ss.sss
+   *   hh:mm:ssZ
+   *   hh:mm:ss-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pValue The time value being converted
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printTime(Calendar pValue);
+
+  /** <p>Returns a lexical representation of the given date
+   * value. Valid lexical representations include:
+   * <pre>
+   *   YYYY-MM-DD
+   *   YYYY-MM-DDZ
+   *   YYYY-MM-DD-01:00
+   * </pre>
+   * The former examples are all specified in UTC time. The last example
+   * uses a negatice offset of one hour to UTC.</p>
+   * @param pValue The date value being converted
+   * @return A lexical representation of the input value.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printDate(Calendar pValue);
+
+  /** <p>Returns a lexical representation of the given input
+   * string, which is the unmodified input string.</p>
+   * @param pValue The input string.
+   * @return The unmodified input string.
+   * @see javax.xml.bind.PrintConversionEvent
+   */
+  public String printAnySimpleType(String pValue);
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Element.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Element.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Element.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Element.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,30 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+/** <p>This interface doesn't expose any methods. Like
+ * {@link java.io.Serializable}, it is a marker interface with the
+ * single purpose of indicating what the implementation is.</p>
+ * <p>See section 5.7 "Element Declaration", and 5.7.1
+ * "Bind to Java Element Interface" of the JAXB specification
+ * for more details.</p>
+ *
+ * @author JSR-31
+ * @since JAXB1.0
+ */
+public interface Element {
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBContext.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBContext.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBContext.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBContext.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,243 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.net.URL;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+
+/** <p>The <code>JAXBContext</code> provides the JAXB users anchor to
+ * the implmentation and hos generated classes. A JAXBContext is used to
+ * obtain instances of {@link javax.xml.bind.Marshaller},
+ * {@link javax.xml.bind.Unmarshaller}, and
+ * {@link javax.xml.bind.Validator}. To obtain a JAXBContext, the
+ * application invokes
+ * <pre>
+ *   JAXBContext context = JAXBContext.newInstance("com.mycompany:com.mycompany.xml");
+ * </pre>
+ * The list of colon separated package names matches the list in the
+ * schemas used to generate classes. In other words: If you have a
+ * schema using package name "com.mycompany.xml", then this package
+ * name has to be part of the list.</p>
+ * <p>The <code>JAXBContext</code> class will scan the given list of packages
+ * for a file called <samp>jaxb.properties</samp>. This file contains the
+ * name of an instantiation class in the property
+ * {@link #JAXB_CONTEXT_FACTORY}. (See {@link #newInstance(String)} for
+ * details on how the class name is obtained.) Once such a file is found, the
+ * given class is loaded via {@link ClassLoader#loadClass(java.lang.String)}.
+ * The <code>JAXBContext</code> class demands, that the created object
+ * has a method
+ * <pre>
+ *   public static JAXBContext createContext(String pPath, ClassLoader pClassLoader)
+ *     throws JAXBException;
+ * </pre>
+ * This method is invoked with the same path and {@link ClassLoader} than
+ * above. See {@link #newInstance(String,ClassLoader)}} for details on the choice
+ * of the {@link ClassLoader}.</p>
+ * <p>The created context will scan the same package path for implementation
+ * specific configuration details (in the case of the <code>JaxMe</code>
+ * application a file called <samp>Configuration.xml</samp> in any of the
+ * packages) and do whatever else is required to initialize the runtime.
+ * In particular it will invoke
+ * {@link DatatypeConverter#setDatatypeConverter(DatatypeConverterInterface)}.</p>
+ *
+ * @author JSR-31
+ * @since JAXB1.0
+ * @see Marshaller
+ * @see Unmarshaller
+ * @see Validator
+ */
+public abstract class JAXBContext {
+  private static final Class[] CONTEXT_CLASSES = new Class[]{String.class, ClassLoader.class};
+
+  /** <p>This is the name of the property used to determine the name
+   * of the initialization class: "javax.xml.bind.context.factory".
+   * The name is used by {@link #newInstance(String)} and
+   * {@link #newInstance(String,ClassLoader)}. It contains a class
+   * name. The class must contain a static method
+   * <pre>
+   *   public static JAXBContext createContext(String, ClassLoader) throws JAXBException;
+   * </pre>
+   * which is invoked to create the actual instance of JAXBContext.</p>
+   */
+  public static final java.lang.String JAXB_CONTEXT_FACTORY = "javax.xml.bind.context.factory";
+
+  /** <p>Creates a new instance of <code>JAXBContext</code> by applying
+   * the following algorithm:
+   * <ol>
+   *   <li>The first step is to determine the name of an initialization class.
+   *     For any of the package names in the list given by
+   *     <code>pPath</code> the <code>JAXBContext</code> class will try to find a file
+   *     called <samp>jaxb.properties</samp>. This file's got to be in
+   *     standard property file format. The <code>JAXBContext</code> class
+   *     will load the property file.</li>
+   *   <li>A property called "javax.xml.bind.context.factory" (see
+   *     {@link #JAXB_CONTEXT_FACTORY}) is evaluated. It must contain the
+   *     name of an initialization class. The initialization class is
+   *     loaded via
+   *     <code>Thread.currentThread().getContextClassLoader().loadClass(String)</code>.</li>
+   *   <li>The initialization class must contain a method
+   *     <pre>
+   *       public static JAXBContext createContext(String, ClassLoader) throws JAXBException;
+   *     </pre>
+   *     which is invoked with the <code>pPath</code> argument and the
+   *     {@link ClassLoader} of the <code>JAXBContext</class> class as
+   *     parameters. The result of this method is also used as the
+   *     result of the <code>newInstance(String)</code> method.</li>
+   * </ol>
+   * @param pPath A colon separated path of package names where to look for
+   *   <samp>jaxb.properties</samp> files. The package names must match the
+   *   generated classes which you are going to use in your application.
+   * @return An initialized instance of <code>JAXBContext</code>.
+   * @throws JAXBException An error occurred while creating the JAXBContext instance. 
+   */  
+  public static JAXBContext newInstance(java.lang.String pPath) throws JAXBException {
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    if (cl == null) {
+      cl = JAXBContext.class.getClassLoader();
+    }
+    return newInstance(pPath, cl);
+  }
+
+  /** <p>Creates a new instance of <code>JAXBContext</code> by applying
+   * the following algorithm:
+   * <ol>
+   *   <li>The first step is to determine the name of an initialization class.
+   *     For any of the package names in the list given by
+   *     <code>pPath</code> the <code>JAXBContext</code> class will try to find a file
+   *     called <samp>jaxb.properties</samp>. This file's got to be in
+   *     standard property file format. The <code>JAXBContext</code> class
+   *     will load the property file.</li>
+   *   <li>A property called "javax.xml.bind.context.factory" (see
+   *     {@link #JAXB_CONTEXT_FACTORY}) is evaluated. It must contain the
+   *     name of an initialization class. The initialization class is
+   *     loaded via
+   *     <code>pClassLoader.loadClass(String)</code>.</li>
+   *   <li>The initialization class must contain a method
+   *     <pre>
+   *       public static JAXBContext createContext(String, ClassLoader) throws JAXBException;
+   *     </pre>
+   *     which is invoked with the parameters <code>pPath</code> and
+   *     <code>pClassLoader</code>. The result of this method is also
+   *     used as the result of the <code>newInstance(String)</code>
+   *     method.</li>
+   * </ol>
+   * @param pPath A colon separated path of package names where to look for
+   *   <samp>jaxb.properties</samp> files. The package names must match the
+   *   generated classes which you are going to use in your application.
+   * @return An initialized instance of <code>JAXBContext</code>.
+   * @throws JAXBException An error occurred while creating the JAXBContext instance.
+   */
+  public static JAXBContext newInstance(String pPath, ClassLoader pClassLoader) throws JAXBException {
+    if (pPath == null) {
+      throw new JAXBException("The context path must not be null.");
+    }
+    if (pClassLoader == null) {
+      throw new JAXBException("The classloader must not be null.");
+    }
+    for (StringTokenizer st = new StringTokenizer(pPath, ":");  st.hasMoreTokens();  ) {
+      String packageName = st.nextToken();
+      String resourceName = packageName.replace('.', '/') + "/jaxb.properties";
+      URL resource = pClassLoader.getResource(resourceName);
+      if (resource == null) {
+        continue;
+      }
+      Properties props = new Properties();
+      InputStream istream = null;
+      try {
+        istream = resource.openStream();
+        props.load(istream);
+        istream.close();
+        istream = null;
+      } catch (IOException e) {
+        throw new JAXBException("Failed to load property file " + resource, e);
+      } finally {
+        if (istream != null) { try { istream.close(); } catch (Throwable ignore) {} }
+      }
+      String className = props.getProperty(JAXB_CONTEXT_FACTORY);
+      if (className == null) {
+        throw new JAXBException("The property " + JAXB_CONTEXT_FACTORY + " is not set in " + resource);
+      }
+      Class c;
+      try {
+        c = pClassLoader.loadClass(className);
+      } catch (ClassNotFoundException e) {
+        throw new JAXBException("The class " + className + ", referenced by property " +
+                                 JAXB_CONTEXT_FACTORY + " in " + resource + ", could not be loaded.");
+      }
+      Method m;
+      try {
+        m = c.getMethod("createContext", CONTEXT_CLASSES);
+      } catch (NoSuchMethodException e) {
+        throw new JAXBException("The class " + c + " does not have a method 'public static createContext(String, ClassLoader) throws JAXBException'");
+      }
+      int modifiers = m.getModifiers();
+      if (m == null  ||  !Modifier.isStatic(modifiers)  ||  !Modifier.isPublic(modifiers)) {
+        throw new JAXBException("The class " + c + " does not have a method 'public static createContext(String, ClassLoader) throws JAXBException'");
+      }
+      Object o;
+      try {
+        o = m.invoke(null, new Object[]{pPath, pClassLoader});
+      } catch (IllegalAccessException e) {
+        throw new JAXBException("Illegal access to method " + c.getName() +
+                                 ".createContext(String,ClassLoader).", e);
+      } catch (InvocationTargetException e) {
+        Throwable t = e.getTargetException();
+        throw new JAXBException(t.getClass().getName() + " in method " + c.getName() +
+                                 ".createContext(String,ClassLoader): " + t.getMessage(), t);
+      }
+      if (o == null) {
+        throw new JAXBException("The method " + c.getName() +
+                                 ".createContext(String,ClassLoader) returned null.");
+      }
+      try {
+        return (JAXBContext) o;
+      } catch (ClassCastException e) {
+        throw new JAXBException("The object created by " + c.getName() +
+                                 ".createContext(String,ClassLoader) cannot be casted to " +
+                                 JAXBContext.class.getName() + ".", e);
+      }
+    }
+    throw new JAXBException("Failed to resolve resource jaxb.properties via path " + pPath +
+                             " and ClassLoader " + pClassLoader);
+  }
+
+  /** <p>Creates a new instance of {@link Marshaller}. The
+   * {@link Marshaller} can be used
+   * to convert JAXB objects into XML data.</p>
+   * <p><em>Note</em>: Marshallers are reusable, but not reentrant (thread safe).</p>
+   */
+  public abstract Marshaller createMarshaller() throws JAXBException;
+
+  /** <p>Creates a new instance of {@link Unmarshaller}. The
+   * {@link Unmarshaller} can be used
+   * to convert XML data into JAXB objects.</p>
+   * <p><em>Note</em>: Unmarshallers are reusable, but not reentrant (thread safe).</p>
+   */
+  public abstract Unmarshaller createUnmarshaller() throws JAXBException;
+
+  /** <p>Creates a new instance of {@link Validator}. The
+   * {@link Validator} can be used to validate JAXB objects.</p>
+   */
+  public abstract Validator createValidator() throws JAXBException;
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBException.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBException.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBException.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/JAXBException.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,157 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/** <p>This is the main exception class of JAXB. All other
+ * exception classes (except the {@link javax.xml.bind.TypeConstraintException},
+ * which is a {@link java.lang.RuntimeException} are derived from the
+ * <code>JAXBException</code>.</p>
+ *
+ * @author JSR-31
+ * @since JAXB1.0
+ */
+public class JAXBException extends Exception {
+    private String errorCode;
+    private Throwable linkedException;
+    
+    /** <p>Creates a new <code>JAXBException</code> with the specified
+     * detail message.</p>
+     * @param pMessage The detail message.
+     */
+    public JAXBException(String pMessage) {
+        super(pMessage);
+    }
+
+    private static String formatMessage(String pErrorCode, String pMessage, Throwable pThr) {
+    	String msg = null;
+        if (pMessage == null) {
+            if (pThr != null) {
+            	msg = pThr.getMessage();
+                if (msg == null) {
+                	msg = pThr.getClass().getName();
+                }
+            }
+        } else {
+        	msg = pMessage;
+        }
+        if (pErrorCode == null) {
+        	return msg;
+        } else {
+            if (msg == null) {
+            	return pErrorCode;
+            } else {
+            	return pErrorCode + ": " + msg;
+            }
+        }
+        
+    }
+
+    /** <p>Creates a new <code>JAXBException</code> with the specified
+     * detail message and vendor specific error code.</p>
+     * @param pMessage The detail message.
+     * @param pErrorCode The error code.
+     */
+    public JAXBException(String pMessage, String pErrorCode) {
+        this(pMessage, pErrorCode, null);
+    }
+    
+    /** <p>Creates a new <code>JAXBException</code> with the specified
+     * linked exception.</p>
+     * @param pLinkedException The linked exception.
+     */
+    public JAXBException(Throwable pLinkedException) {
+        this(null, null, pLinkedException);
+    }
+    
+    /** <p>Creates a new <code>JAXBException</code> with the specified
+     * detail message and linked exception.</p>
+     * @param pMessage The detail message.
+     * @param pLinkedException The linked exception.
+     */
+    public JAXBException(String pMessage, Throwable pLinkedException) {
+        this(pMessage, null, pLinkedException);
+    }
+    
+    /** <p>Creates a new <code>JAXBException</code> with the specified
+     * detail message, error code, and linked exception.</p>
+     * @param pMessage The detail message.
+     * @param pErrorCode The vendor specific error code.
+     * @param pLinkedException The linked exception.
+     */
+    public JAXBException(String pMessage, String pErrorCode,
+						 Throwable pLinkedException) {
+        super(formatMessage(pErrorCode, pMessage, pLinkedException));
+        errorCode = pErrorCode;
+        linkedException = pLinkedException;
+    }
+    
+    /** <p>Returns the vendor specific error code, if any, or null.</p>
+     */
+    public String getErrorCode() {
+        return errorCode;
+    }
+    
+    /** <p>Returns the linked exception, if any, or null.</p>
+     */
+    public Throwable getLinkedException() {
+        return linkedException;
+    }
+    
+    /** <p>Sets the linked exception.</p>
+     * @param pLinkedException The linked exception or null.
+     */
+    public void setLinkedException(Throwable pLinkedException) {
+        linkedException = pLinkedException;
+    }
+    
+    /** <p>Converts the linked exception into a String. Overridden,
+     * because the returned string should contain the vendor specific
+     * error code, if any.</p>
+     */
+    public String toString() {
+        if (errorCode == null  ||  errorCode.length() == 0) {
+            return super.toString();
+        } else {
+            return errorCode + ": " + super.toString();
+        }
+    }
+
+    public void printStackTrace() {
+        printStackTrace(System.err);
+    }
+
+    public void printStackTrace(PrintStream pStream) {
+        super.printStackTrace(pStream);
+        Throwable t = getLinkedException();
+        if (t != null) {
+            pStream.println("Caused by:");
+            t.printStackTrace(pStream);
+        }
+    }
+
+    public void printStackTrace(PrintWriter pWriter) {
+        super.printStackTrace(pWriter);
+        Throwable t = getLinkedException();
+        if (t != null) {
+            pWriter.println("Caused by:");
+            t.printStackTrace(pWriter);
+        }
+    }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/MarshalException.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/MarshalException.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/MarshalException.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/MarshalException.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,71 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+/** <p>The <code>MarshalException</code> is a subclass of the
+ * {@link javax.xml.bind.JAXBException} being thrown if the
+ * marshalling of a JAXB object failed.</p>
+ *
+ * @author JSR-31
+ * @since JAXB1.0
+ */
+public class MarshalException extends JAXBException {
+  /** <p>Creates a new <code>MarshalException</code> with the specified
+   * detail message.</p>
+   * @param pMessage The detail message.
+   */
+  public MarshalException(String pMessage) {
+    super(pMessage);
+  }
+
+  /** <p>Creates a new <code>MarshalException</code> with the specified
+   * detail message and vendor specific error code.</p>
+   * @param pMessage The detail message.
+   * @param pErrorCode The error code.
+   */
+  public MarshalException(String pMessage, String pErrorCode) {
+    super(pMessage, pErrorCode);
+  }
+
+  /** <p>Creates a new <code>MarshalException</code> with the specified
+   * linked exception.</p>
+   * @param pLinkedException The linked exception.
+   */
+  public MarshalException(Throwable pLinkedException) {
+    super(pLinkedException);
+  }
+
+  /** <p>Creates a new <code>MarshalException</code> with the specified
+   * detail message and linked exception.</p>
+   * @param pMessage The detail message.
+   * @param pLinkedException The linked exception.
+   */
+  public MarshalException(String pMessage, Throwable pLinkedException) {
+    super(pMessage, pLinkedException);
+  }
+
+  /** <p>Creates a new <code>MarshalException</code> with the specified
+   * detail message, error code, and linked exception.</p>
+   * @param pMessage The detail message.
+   * @param pErrorCode The vendor specific error code.
+   * @param pLinkedException The linked exception.
+   */
+  public MarshalException(String pMessage, String pErrorCode,
+                           Throwable pLinkedException) {
+    super(pMessage, pErrorCode, pLinkedException);
+  }
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Marshaller.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Marshaller.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Marshaller.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/Marshaller.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,274 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+import java.io.OutputStream;
+import java.io.Writer;
+
+import javax.xml.transform.Result;
+
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+
+
+/** <p>An instance of <code>Marshaller</code> may be obtained by the
+ * JAXB user to serialize JAXB objects to various flavours of XML.
+ * The created XML may be:
+ * <table border="1">
+ *   <tr><th>A byte stream<br>{@link java.io.OutputStream}</th>
+ *     <td>{@link #marshal(Object, java.io.OutputStream)}</td>
+ *   </tr>
+ *   <tr><th>A character stream<br>{@link java.io.Writer}</th>
+ *     <td>{@link #marshal(Object, java.io.Writer)}</td>
+ *   </tr>
+ * </table>
+ *
+ * @author JSR-31
+ * @since JAXB1.0
+ */
+public interface Marshaller {
+  /** <p>Name of the property that allows to choose the encoding.
+   * The encoding applies when marshalling to an
+   * {@link java.io.OutputStream}, to a {@link java.io.Writer},
+   * or to a {@link javax.xml.transform.stream.StreamResult}.
+   * It is ignored, if the target is a {@link org.xml.sax.ContentHandler},
+   * a DOM {@link org.w3c.dom.Node}, or another flavour of
+   * {@link javax.xml.transform.Result}.</p>
+   * <p>The encoding may be used both to choose the characters
+   * being escaped (as <samp>&amp;#ddd;</samp>) or to convert
+   * characters into byte sequences.</p>
+   * <p>The property value is the encoding name, for example
+   * <samp>UTF-8</samp>, which is the default. Note, that a
+   * JAXB implementation need not support other encodings than
+   * <samp>UTF-8</samp>, <samp>UTF-16</samp>, and <samp>US-ASCII</samp>.
+   * Usually you may expect that the encodings supported by the
+   * JVM itself will work for the <code>Marshaller</code> as well.</p>
+   *
+   * @see #marshal(Object, java.io.OutputStream)
+   * @see #marshal(Object, java.io.Writer)
+   * @see #marshal(Object, javax.xml.transform.Result)
+   */
+  public static final String JAXB_ENCODING = "jaxb.encoding";
+
+  /** <p>Name of the property that allows to choose whether the
+   * generated XML should be formatted (human readable, indented)
+   * or not. By default the generated XML is formatted.
+   * The property value is an instance of {@link Boolean},
+   * by default {@link Boolean#TRUE}.</p>
+   * <p>The formatting property is supported when marshalling to
+   * a character or byte stream. It is ignored, if the target is
+   * a {@link org.xml.sax.ContentHandler}, a DOM
+   * {@link org.w3c.dom.Node}, or an instance of
+   * {@link javax.xml.transform.Result}, the exception being a
+   * {@link javax.xml.transform.stream.StreamResult}, which is
+   * in fact a character or byte stream.</p>
+   *
+   * @see #marshal(Object, java.io.OutputStream)
+   * @see #marshal(Object, java.io.Writer)
+   * @see #marshal(Object, javax.xml.transform.Result)
+   */
+  public static final String JAXB_FORMATTED_OUTPUT = "jaxb.formatted.output";
+
+  /** <p>If this property is set to another value than null,
+   * then the <code>Marshaller</code> will create an attribute
+   * <samp>xsi:schemaLocation</samp>. The attribute value is
+   * the property value. By default the property is set to
+   * null and no such attribute is generated.</p>
+   *
+   * @see #JAXB_NO_NAMESPACE_SCHEMA_LOCATION
+   */
+  public static final String JAXB_SCHEMA_LOCATION = "jaxb.schemaLocation";
+
+  /** <p>If this property is set to another value than null,
+   * then the <code>Marshaller</code> will create an attribute
+   * <samp>xsi:noNamespaceSchemaLocation</samp>. The attribute
+   * value is the property value. By default the property is set to
+   * null and no such attribute is generated.</p>
+   *
+   * @see #JAXB_SCHEMA_LOCATION
+   */
+  public static final String JAXB_NO_NAMESPACE_SCHEMA_LOCATION = "jaxb.noNamespaceSchemaLocation";
+
+  /** <p>Marshals the given JAXB object <code>pObject</code> to the
+   * {@link javax.xml.transform.Result} <code>pTarget</code>. All
+   * JAXB provider must support {@link javax.xml.transform.dom.DOMResult},
+   * {@link javax.xml.transform.sax.SAXResult}, and
+   * {@link javax.xml.transform.stream.StreamResult}, which can easily
+   * be mapped to {@link #marshal(Object, org.w3c.dom.Node)},
+   * {@link #marshal(Object, org.xml.sax.ContentHandler)},
+   * {@link #marshal(Object,java.io.OutputStream)}, or
+   * {@link #marshal(Object,java.io.Writer)}. The use of a
+   * {@link javax.xml.transform.Result} as a target isn't
+   * portable beyond these subinterfaces.</p>
+   *
+   * @param pObject The JAXB object being marshalled.
+   * @param pTarget The {@link Result} being created.
+   * @throws JAXBException An unexcpected problem occurred. This may be used,
+   *   for example, to throw a nested {@link java.io.IOException}.
+   * @throws MarshalException Whereever possible, one should throw a
+   *   {@link MarshalException}, and not a {@link JAXBException}.
+   * @throws IllegalArgumentException Any of the parameters was null.
+   * @see #JAXB_SCHEMA_LOCATION
+   * @see #JAXB_NO_NAMESPACE_SCHEMA_LOCATION
+   */
+  public void marshal(Object pObject, Result pTarget) throws JAXBException;
+
+  /** <p>Marshals the given JAXB object <code>pObject</code> and
+   * serializes it into the byte stream <code>pTarget</code>. Note,
+   * that serialization into a byte stream demands the use of an
+   * encoding. It may be required to set the parameter
+   * {@link #JAXB_ENCODING}. By default the created output is
+   * formatted, which may be turned off using
+   * {@link #JAXB_FORMATTED_OUTPUT}.</p>
+   *
+   * @param pObject The JAXB object being marshalled.
+   * @param pTarget The output byte stream.
+   * @throws JAXBException An unexpected problem occurred. This may be used,
+   *   for example, to throw a nested {@link java.io.IOException}.
+   * @throws MarshalException Whereever possible, one should prefer the
+   *   {@link MarshalException} over the {@link JAXBException}.
+   * @throws IllegalArgumentException Any of the parameters was null.
+   * @see #JAXB_ENCODING
+   * @see #JAXB_FORMATTED_OUTPUT
+   * @see #JAXB_NO_NAMESPACE_SCHEMA_LOCATION
+   * @see #JAXB_SCHEMA_LOCATION
+   */
+  public void marshal(Object pObject, OutputStream pTarget) throws JAXBException;
+
+  /** <p>Marshals the given JAXB object <code>pObject</code> and
+   * serializes it into the character stream <code>pTarget</code>.
+   * Unlike serialization to a byte stream, an encoding is not
+   * required, but a <code>Marshaller</code> may use the encoding
+   * whether to escape a character or not. Use of the 
+   * {@link #JAXB_ENCODING} property is still recommended. By
+   * default the created output is
+   * formatted, which may be turned off using
+   * {@link #JAXB_FORMATTED_OUTPUT}.</p>
+   *
+   * @param pObject The JAXB object being marshalled.
+   * @param pTarget The output character stream.
+   * @throws JAXBException An unexpected problem occurred. This may be used,
+   *   for example, to throw a nested {@link java.io.IOException}.
+   * @throws MarshalException Whereever possible, one should prefer the
+   *   {@link MarshalException} over the {@link JAXBException}.
+   * @throws IllegalArgumentException Any of the parameters was null.
+   * @see #JAXB_ENCODING
+   * @see #JAXB_FORMATTED_OUTPUT
+   * @see #JAXB_NO_NAMESPACE_SCHEMA_LOCATION
+   * @see #JAXB_SCHEMA_LOCATION
+   */
+  public void marshal(Object pObject, Writer pTarget) throws JAXBException;
+
+  /** <p>Marshals the given JAXB object by emitting SAX events into
+   * into the given SAX {@link org.xml.sax.ContentHandler}. This
+   * includes the events {@link org.xml.sax.ContentHandler#startDocument()}
+   * and {@link org.xml.sax.ContentHandler#endDocument()}.</p>
+   *
+   * @param pObject The JAXB Object being marshalled.
+   * @param pTarget The target event handler.
+   * @throws JAXBException An unexpected problem occurred. This may be used,
+   *   for example, to throw a nested {@link org.xml.sax.SAXException}.
+   * @throws MarshalException Whereever possible, one should prefer the
+   *   {@link MarshalException} over the {@link JAXBException}.
+   * @throws IllegalArgumentException Any of the parameters was null.
+   * @see #JAXB_NO_NAMESPACE_SCHEMA_LOCATION
+   * @see #JAXB_SCHEMA_LOCATION
+   */
+  public void marshal(Object pObject, ContentHandler pTarget) throws JAXBException;
+
+  /** <p>Marshals the given JAXB object by creating a DOM tree below
+   * the given node.</p>
+   *
+   * @param pObject The JAXB object being marshalled.
+   * @param pTarget The target node. This node must be ready to accept a
+   *   child element. For example, it may be a {@link org.w3c.dom.Document},
+   *   a {@link org.w3c.dom.DocumentFragment}, or an
+   *   {@link org.w3c.dom.Element}.
+   * @throws JAXBException An unexpected problem occurred. This may be used,
+   *   for example, to throw a nested {@link org.w3c.dom.DOMException}.
+   * @throws MarshalException Whereever possible, one should prefer the
+   *   {@link MarshalException} over the {@link JAXBException}.
+   * @throws IllegalArgumentException Any of the parameters was null.
+   * @see #JAXB_NO_NAMESPACE_SCHEMA_LOCATION
+   * @see #JAXB_SCHEMA_LOCATION
+   */
+  public void marshal(Object pObject, Node pTarget) throws JAXBException;
+
+  /** <p>Returns a DOM view of the given JAXB object. This view is life
+   * in the sense that modifications of its DOM tree will trigger
+   * updates on the original JAXB object.</p>
+   * <p><em>Note</em>: This is an optional feature and not supported
+   * by all JAXB providers.</p>
+   * @param pObject The JAXB object being viewed.
+   * @throws UnsupportedOperationException The JAXB provider does not
+   *   support DOM views.
+   * @throws JAXBException An unexpected problem occurred. This may be used,
+   *   for example, to throw a nested {@link org.w3c.dom.DOMException}.
+   * @throws IllegalArgumentException The parameter was null.
+   */
+  public Node getNode(Object pObject) throws JAXBException;
+
+  /** <p>Sets the marshaller property <code>pName</code> to the value
+   * <code>pValue</code>. Note, that the value type depends on the
+   * property being set. For example, the property
+   * {@link #JAXB_ENCODING} requires a string, but the property
+   * {@link #JAXB_FORMATTED_OUTPUT} requires a {@link Boolean}.</p>
+   * @param pName The property name.
+   * @throws PropertyException An error occurred while processing the property.
+   * @throws IllegalArgumentException The name parameter was null.
+   */
+  public void setProperty(String pName, Object pValue) throws PropertyException;
+
+  /** <p>Returns the value of the marshaller property <code>pName</code>.
+   * Note, that the value type depends on the
+   * property being set. For example, the property
+   * {@link #JAXB_ENCODING} requires a string, but the property
+   * {@link #JAXB_FORMATTED_OUTPUT} requires a {@link Boolean}.</p>
+   * @param pName The property name.
+   * @throws PropertyException An error occurred while processing the property.
+   * @throws IllegalArgumentException The name parameter was null.
+   */
+  public Object getProperty(String pName) throws PropertyException;
+
+  /** <p>Allows the application to set an event handler. The event handler
+   * will be invoked in case of a validation event.</p>
+   * <p><em>Note</em>: The ability to register an event handler does not
+   * indicate that a JAXB provider is required to validate the objects
+   * being marshalled. If you want to ensure, that only valid objects
+   * are marshalled, you should perform an explicit validation using a
+   * {@link javax.xml.bind.Validator}.</p>
+   * @param pHandler An application specific event handler or null to
+   *   revert to the default event handler. The default handler is
+   *   throwing an exception in case of errors.
+   */
+  public void setEventHandler(ValidationEventHandler pHandler) throws JAXBException;
+
+  /** <p>Returns an event handler previously registered by the application.
+   * The event handler will be invoked in case of a validation event.</p>
+   * <p><em>Note</em>: The ability to register an event handler does not
+   * indicate that a JAXB provider is required to validate the objects
+   * being marshalled. If you want to ensure, that only valid objects
+   * are marshalled, you should perform an explicit validation using a
+   * {@link javax.xml.bind.Validator}.</p>
+   * @return An event handler previously set by the application or
+   *   the default event handler. The default handler is simply throwing
+   *   exceptions.
+   * @throws JAXBException An error occurred while getting the event
+   *   handler.
+   */
+  public ValidationEventHandler getEventHandler() throws JAXBException;
+}

Added: webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java?view=auto&rev=478847
==============================================================================
--- webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java (added)
+++ webservices/jaxme/branches/MAVEN/jaxme-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java Fri Nov 24 04:04:25 2006
@@ -0,0 +1,28 @@
+/*
+ * 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.
+
+ */
+package javax.xml.bind;
+
+/** <p>This event is triggered by the various <code>printFoo()</code>
+ * methods of the {@link DatatypeConverterInterface}, if they are
+ * unable to create a lexical representation of their input.</p>
+ *
+ * @author JSR-31
+ * @since JAXB1.0
+ */
+public interface NotIdentifiableEvent extends ValidationEvent {
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org