You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/12/10 06:08:43 UTC
svn commit: r1419199 [4/35] - in /openejb/trunk/openejb/container:
openejb-jee-accessors/ openejb-jee-accessors/src/main/
openejb-jee-accessors/src/main/java/ openejb-jee-accessors/src/main/java/org/
openejb-jee-accessors/src/main/java/org/apache/ open...
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AsyncMethod$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AsyncMethod%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AsyncMethod$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AsyncMethod$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,188 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+
+import static org.apache.openejb.jee.MethodParams$JAXB.readMethodParams;
+import static org.apache.openejb.jee.MethodParams$JAXB.writeMethodParams;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class AsyncMethod$JAXB
+ extends JAXBObject<AsyncMethod> {
+
+
+ public AsyncMethod$JAXB() {
+ super(AsyncMethod.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "async-methodType".intern()), MethodParams$JAXB.class);
+ }
+
+ public static AsyncMethod readAsyncMethod(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeAsyncMethod(XoXMLStreamWriter writer, AsyncMethod asyncMethod, RuntimeContext context)
+ throws Exception {
+ _write(writer, asyncMethod, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, AsyncMethod asyncMethod, RuntimeContext context)
+ throws Exception {
+ _write(writer, asyncMethod, context);
+ }
+
+ public final static AsyncMethod _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ AsyncMethod asyncMethod = new AsyncMethod();
+ context.beforeUnmarshal(asyncMethod, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("async-methodType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, AsyncMethod.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, asyncMethod);
+ asyncMethod.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("method-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: methodName
+ String methodNameRaw = elementReader.getElementAsString();
+
+ String methodName;
+ try {
+ methodName = Adapters.collapsedStringAdapterAdapter.unmarshal(methodNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ asyncMethod.methodName = methodName;
+ } else if (("method-params" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: methodParams
+ MethodParams methodParams = readMethodParams(elementReader, context);
+ asyncMethod.methodParams = methodParams;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "method-name"), new QName("http://java.sun.com/xml/ns/javaee", "method-params"));
+ }
+ }
+
+ context.afterUnmarshal(asyncMethod, LifecycleCallback.NONE);
+
+ return asyncMethod;
+ }
+
+ public final AsyncMethod read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, AsyncMethod asyncMethod, RuntimeContext context)
+ throws Exception {
+ if (asyncMethod == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (AsyncMethod.class != asyncMethod.getClass()) {
+ context.unexpectedSubclass(writer, asyncMethod, AsyncMethod.class);
+ return;
+ }
+
+ context.beforeMarshal(asyncMethod, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = asyncMethod.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(asyncMethod, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: methodName
+ String methodNameRaw = asyncMethod.methodName;
+ String methodName = null;
+ try {
+ methodName = Adapters.collapsedStringAdapterAdapter.marshal(methodNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(asyncMethod, "methodName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (methodName != null) {
+ writer.writeStartElement(prefix, "method-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(methodName);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(asyncMethod, "methodName");
+ }
+
+ // ELEMENT: methodParams
+ MethodParams methodParams = asyncMethod.methodParams;
+ if (methodParams != null) {
+ writer.writeStartElement(prefix, "method-params", "http://java.sun.com/xml/ns/javaee");
+ writeMethodParams(writer, methodParams, context);
+ writer.writeEndElement();
+ }
+
+ context.afterMarshal(asyncMethod, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AsyncMethod$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthConstraint$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthConstraint%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthConstraint$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthConstraint$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,226 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.openejb.jee.Text$JAXB.readText;
+import static org.apache.openejb.jee.Text$JAXB.writeText;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class AuthConstraint$JAXB
+ extends JAXBObject<AuthConstraint> {
+
+
+ public AuthConstraint$JAXB() {
+ super(AuthConstraint.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "auth-constraintType".intern()), Text$JAXB.class);
+ }
+
+ public static AuthConstraint readAuthConstraint(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeAuthConstraint(XoXMLStreamWriter writer, AuthConstraint authConstraint, RuntimeContext context)
+ throws Exception {
+ _write(writer, authConstraint, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, AuthConstraint authConstraint, RuntimeContext context)
+ throws Exception {
+ _write(writer, authConstraint, context);
+ }
+
+ public final static AuthConstraint _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ AuthConstraint authConstraint = new AuthConstraint();
+ context.beforeUnmarshal(authConstraint, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+ List<String> roleName = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("auth-constraintType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, AuthConstraint.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, authConstraint);
+ authConstraint.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("description" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: descriptions
+ Text descriptionsItem = readText(elementReader, context);
+ if (descriptions == null) {
+ descriptions = new ArrayList<Text>();
+ }
+ descriptions.add(descriptionsItem);
+ } else if (("role-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: roleName
+ String roleNameItemRaw = elementReader.getElementAsString();
+
+ String roleNameItem;
+ try {
+ roleNameItem = Adapters.collapsedStringAdapterAdapter.unmarshal(roleNameItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (roleName == null) {
+ roleName = authConstraint.roleName;
+ if (roleName != null) {
+ roleName.clear();
+ } else {
+ roleName = new ArrayList<String>();
+ }
+ }
+ roleName.add(roleNameItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "description"), new QName("http://java.sun.com/xml/ns/javaee", "role-name"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ authConstraint.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, AuthConstraint.class, "setDescriptions", Text[].class, e);
+ }
+ }
+ if (roleName != null) {
+ authConstraint.roleName = roleName;
+ }
+
+ context.afterUnmarshal(authConstraint, LifecycleCallback.NONE);
+
+ return authConstraint;
+ }
+
+ public final AuthConstraint read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, AuthConstraint authConstraint, RuntimeContext context)
+ throws Exception {
+ if (authConstraint == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (AuthConstraint.class != authConstraint.getClass()) {
+ context.unexpectedSubclass(writer, authConstraint, AuthConstraint.class);
+ return;
+ }
+
+ context.beforeMarshal(authConstraint, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = authConstraint.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(authConstraint, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = authConstraint.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(authConstraint, "descriptions", AuthConstraint.class, "getDescriptions", e);
+ }
+ if (descriptions != null) {
+ for (Text descriptionsItem : descriptions) {
+ if (descriptionsItem != null) {
+ writer.writeStartElement(prefix, "description", "http://java.sun.com/xml/ns/javaee");
+ writeText(writer, descriptionsItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(authConstraint, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: roleName
+ List<String> roleNameRaw = authConstraint.roleName;
+ if (roleNameRaw != null) {
+ for (String roleNameItem : roleNameRaw) {
+ String roleName = null;
+ try {
+ roleName = Adapters.collapsedStringAdapterAdapter.marshal(roleNameItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(authConstraint, "roleName", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (roleName != null) {
+ writer.writeStartElement(prefix, "role-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(roleName);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(authConstraint, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthConstraint$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthenticationMechanism$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthenticationMechanism%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthenticationMechanism$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthenticationMechanism$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,240 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+
+import static org.apache.openejb.jee.Text$JAXB.readText;
+import static org.apache.openejb.jee.Text$JAXB.writeText;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class AuthenticationMechanism$JAXB
+ extends JAXBObject<AuthenticationMechanism> {
+
+
+ public AuthenticationMechanism$JAXB() {
+ super(AuthenticationMechanism.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "authentication-mechanismType".intern()), Text$JAXB.class);
+ }
+
+ public static AuthenticationMechanism readAuthenticationMechanism(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeAuthenticationMechanism(XoXMLStreamWriter writer, AuthenticationMechanism authenticationMechanism, RuntimeContext context)
+ throws Exception {
+ _write(writer, authenticationMechanism, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, AuthenticationMechanism authenticationMechanism, RuntimeContext context)
+ throws Exception {
+ _write(writer, authenticationMechanism, context);
+ }
+
+ public final static AuthenticationMechanism _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ AuthenticationMechanism authenticationMechanism = new AuthenticationMechanism();
+ context.beforeUnmarshal(authenticationMechanism, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("authentication-mechanismType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, AuthenticationMechanism.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, authenticationMechanism);
+ authenticationMechanism.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("description" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: descriptions
+ Text descriptionsItem = readText(elementReader, context);
+ if (descriptions == null) {
+ descriptions = new ArrayList<Text>();
+ }
+ descriptions.add(descriptionsItem);
+ } else if (("authentication-mechanism-type" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: authenticationMechanismType
+ String authenticationMechanismTypeRaw = elementReader.getElementAsString();
+
+ String authenticationMechanismType;
+ try {
+ authenticationMechanismType = Adapters.collapsedStringAdapterAdapter.unmarshal(authenticationMechanismTypeRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ authenticationMechanism.authenticationMechanismType = authenticationMechanismType;
+ } else if (("credential-interface" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: credentialInterface
+ String credentialInterfaceRaw = elementReader.getElementAsString();
+
+ String credentialInterface;
+ try {
+ credentialInterface = Adapters.collapsedStringAdapterAdapter.unmarshal(credentialInterfaceRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ authenticationMechanism.credentialInterface = credentialInterface;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "description"), new QName("http://java.sun.com/xml/ns/javaee", "authentication-mechanism-type"), new QName("http://java.sun.com/xml/ns/javaee", "credential-interface"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ authenticationMechanism.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, AuthenticationMechanism.class, "setDescriptions", Text[].class, e);
+ }
+ }
+
+ context.afterUnmarshal(authenticationMechanism, LifecycleCallback.NONE);
+
+ return authenticationMechanism;
+ }
+
+ public final AuthenticationMechanism read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, AuthenticationMechanism authenticationMechanism, RuntimeContext context)
+ throws Exception {
+ if (authenticationMechanism == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (AuthenticationMechanism.class != authenticationMechanism.getClass()) {
+ context.unexpectedSubclass(writer, authenticationMechanism, AuthenticationMechanism.class);
+ return;
+ }
+
+ context.beforeMarshal(authenticationMechanism, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = authenticationMechanism.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(authenticationMechanism, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = authenticationMechanism.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(authenticationMechanism, "descriptions", AuthenticationMechanism.class, "getDescriptions", e);
+ }
+ if (descriptions != null) {
+ for (Text descriptionsItem : descriptions) {
+ if (descriptionsItem != null) {
+ writer.writeStartElement(prefix, "description", "http://java.sun.com/xml/ns/javaee");
+ writeText(writer, descriptionsItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(authenticationMechanism, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: authenticationMechanismType
+ String authenticationMechanismTypeRaw = authenticationMechanism.authenticationMechanismType;
+ String authenticationMechanismType = null;
+ try {
+ authenticationMechanismType = Adapters.collapsedStringAdapterAdapter.marshal(authenticationMechanismTypeRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(authenticationMechanism, "authenticationMechanismType", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (authenticationMechanismType != null) {
+ writer.writeStartElement(prefix, "authentication-mechanism-type", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(authenticationMechanismType);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(authenticationMechanism, "authenticationMechanismType");
+ }
+
+ // ELEMENT: credentialInterface
+ String credentialInterfaceRaw = authenticationMechanism.credentialInterface;
+ String credentialInterface = null;
+ try {
+ credentialInterface = Adapters.collapsedStringAdapterAdapter.marshal(credentialInterfaceRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(authenticationMechanism, "credentialInterface", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (credentialInterface != null) {
+ writer.writeStartElement(prefix, "credential-interface", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(credentialInterface);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(authenticationMechanism, "credentialInterface");
+ }
+
+ context.afterMarshal(authenticationMechanism, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/AuthenticationMechanism$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/BodyContent$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/BodyContent%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/BodyContent$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/BodyContent$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,75 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBEnum;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+
+import javax.xml.namespace.QName;
+
+public class BodyContent$JAXB
+ extends JAXBEnum<BodyContent> {
+
+
+ public BodyContent$JAXB() {
+ super(BodyContent.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "bodyContent".intern()));
+ }
+
+ public BodyContent parse(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ return parseBodyContent(reader, context, value);
+ }
+
+ public String toString(Object bean, String parameterName, RuntimeContext context, BodyContent bodyContent)
+ throws Exception {
+ return toStringBodyContent(bean, parameterName, context, bodyContent);
+ }
+
+ public static BodyContent parseBodyContent(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ if ("tagdependent".equals(value)) {
+ return BodyContent.TAGDEPENDENT;
+ } else if ("JSP".equals(value)) {
+ return BodyContent.JSP;
+ } else if ("empty".equals(value)) {
+ return BodyContent.EMPTY;
+ } else if ("scriptless".equals(value)) {
+ return BodyContent.SCRIPTLESS;
+ } else {
+ context.unexpectedEnumValue(reader, BodyContent.class, value, "tagdependent", "JSP", "empty", "scriptless");
+ return null;
+ }
+ }
+
+ public static String toStringBodyContent(Object bean, String parameterName, RuntimeContext context, BodyContent bodyContent)
+ throws Exception {
+ if (BodyContent.TAGDEPENDENT == bodyContent) {
+ return "tagdependent";
+ } else if (BodyContent.JSP == bodyContent) {
+ return "JSP";
+ } else if (BodyContent.EMPTY == bodyContent) {
+ return "empty";
+ } else if (BodyContent.SCRIPTLESS == bodyContent) {
+ return "scriptless";
+ } else {
+ context.unexpectedEnumConst(bean, parameterName, bodyContent, BodyContent.TAGDEPENDENT, BodyContent.JSP, BodyContent.EMPTY, BodyContent.SCRIPTLESS);
+ return null;
+ }
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/BodyContent$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpField$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpField%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpField$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpField$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,211 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+
+import static org.apache.openejb.jee.Text$JAXB.readText;
+import static org.apache.openejb.jee.Text$JAXB.writeText;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class CmpField$JAXB
+ extends JAXBObject<CmpField> {
+
+
+ public CmpField$JAXB() {
+ super(CmpField.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "cmp-fieldType".intern()), Text$JAXB.class);
+ }
+
+ public static CmpField readCmpField(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeCmpField(XoXMLStreamWriter writer, CmpField cmpField, RuntimeContext context)
+ throws Exception {
+ _write(writer, cmpField, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, CmpField cmpField, RuntimeContext context)
+ throws Exception {
+ _write(writer, cmpField, context);
+ }
+
+ public final static CmpField _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ CmpField cmpField = new CmpField();
+ context.beforeUnmarshal(cmpField, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("cmp-fieldType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, CmpField.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, cmpField);
+ cmpField.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("description" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: descriptions
+ Text descriptionsItem = readText(elementReader, context);
+ if (descriptions == null) {
+ descriptions = new ArrayList<Text>();
+ }
+ descriptions.add(descriptionsItem);
+ } else if (("field-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: fieldName
+ String fieldNameRaw = elementReader.getElementAsString();
+
+ String fieldName;
+ try {
+ fieldName = Adapters.collapsedStringAdapterAdapter.unmarshal(fieldNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ cmpField.fieldName = fieldName;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "description"), new QName("http://java.sun.com/xml/ns/javaee", "field-name"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ cmpField.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, CmpField.class, "setDescriptions", Text[].class, e);
+ }
+ }
+
+ context.afterUnmarshal(cmpField, LifecycleCallback.NONE);
+
+ return cmpField;
+ }
+
+ public final CmpField read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, CmpField cmpField, RuntimeContext context)
+ throws Exception {
+ if (cmpField == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (CmpField.class != cmpField.getClass()) {
+ context.unexpectedSubclass(writer, cmpField, CmpField.class);
+ return;
+ }
+
+ context.beforeMarshal(cmpField, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = cmpField.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(cmpField, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = cmpField.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(cmpField, "descriptions", CmpField.class, "getDescriptions", e);
+ }
+ if (descriptions != null) {
+ for (Text descriptionsItem : descriptions) {
+ if (descriptionsItem != null) {
+ writer.writeStartElement(prefix, "description", "http://java.sun.com/xml/ns/javaee");
+ writeText(writer, descriptionsItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(cmpField, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: fieldName
+ String fieldNameRaw = cmpField.fieldName;
+ String fieldName = null;
+ try {
+ fieldName = Adapters.collapsedStringAdapterAdapter.marshal(fieldNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(cmpField, "fieldName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (fieldName != null) {
+ writer.writeStartElement(prefix, "field-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(fieldName);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(cmpField, "fieldName");
+ }
+
+ context.afterMarshal(cmpField, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpField$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpVersion$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpVersion%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpVersion$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpVersion$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,67 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBEnum;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+
+import javax.xml.namespace.QName;
+
+public class CmpVersion$JAXB
+ extends JAXBEnum<CmpVersion> {
+
+
+ public CmpVersion$JAXB() {
+ super(CmpVersion.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "cmpVersion".intern()));
+ }
+
+ public CmpVersion parse(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ return parseCmpVersion(reader, context, value);
+ }
+
+ public String toString(Object bean, String parameterName, RuntimeContext context, CmpVersion cmpVersion)
+ throws Exception {
+ return toStringCmpVersion(bean, parameterName, context, cmpVersion);
+ }
+
+ public static CmpVersion parseCmpVersion(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ if ("1.x".equals(value)) {
+ return CmpVersion.CMP1;
+ } else if ("2.x".equals(value)) {
+ return CmpVersion.CMP2;
+ } else {
+ context.unexpectedEnumValue(reader, CmpVersion.class, value, "1.x", "2.x");
+ return null;
+ }
+ }
+
+ public static String toStringCmpVersion(Object bean, String parameterName, RuntimeContext context, CmpVersion cmpVersion)
+ throws Exception {
+ if (CmpVersion.CMP1 == cmpVersion) {
+ return "1.x";
+ } else if (CmpVersion.CMP2 == cmpVersion) {
+ return "2.x";
+ } else {
+ context.unexpectedEnumConst(bean, parameterName, cmpVersion, CmpVersion.CMP1, CmpVersion.CMP2);
+ return null;
+ }
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmpVersion$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrField$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrField%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrField$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrField$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,227 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+
+import static org.apache.openejb.jee.CmrFieldType$JAXB.parseCmrFieldType;
+import static org.apache.openejb.jee.CmrFieldType$JAXB.toStringCmrFieldType;
+import static org.apache.openejb.jee.Text$JAXB.readText;
+import static org.apache.openejb.jee.Text$JAXB.writeText;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class CmrField$JAXB
+ extends JAXBObject<CmrField> {
+
+
+ public CmrField$JAXB() {
+ super(CmrField.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "cmr-fieldType".intern()), Text$JAXB.class, CmrFieldType$JAXB.class);
+ }
+
+ public static CmrField readCmrField(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeCmrField(XoXMLStreamWriter writer, CmrField cmrField, RuntimeContext context)
+ throws Exception {
+ _write(writer, cmrField, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, CmrField cmrField, RuntimeContext context)
+ throws Exception {
+ _write(writer, cmrField, context);
+ }
+
+ public final static CmrField _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ CmrField cmrField = new CmrField();
+ context.beforeUnmarshal(cmrField, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("cmr-fieldType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, CmrField.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, cmrField);
+ cmrField.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("description" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: descriptions
+ Text descriptionsItem = readText(elementReader, context);
+ if (descriptions == null) {
+ descriptions = new ArrayList<Text>();
+ }
+ descriptions.add(descriptionsItem);
+ } else if (("cmr-field-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: cmrFieldName
+ String cmrFieldNameRaw = elementReader.getElementAsString();
+
+ String cmrFieldName;
+ try {
+ cmrFieldName = Adapters.collapsedStringAdapterAdapter.unmarshal(cmrFieldNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ cmrField.cmrFieldName = cmrFieldName;
+ } else if (("cmr-field-type" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: cmrFieldType
+ CmrFieldType cmrFieldType = parseCmrFieldType(elementReader, context, elementReader.getElementAsString());
+ if (cmrFieldType != null) {
+ cmrField.cmrFieldType = cmrFieldType;
+ }
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "description"), new QName("http://java.sun.com/xml/ns/javaee", "cmr-field-name"), new QName("http://java.sun.com/xml/ns/javaee", "cmr-field-type"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ cmrField.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, CmrField.class, "setDescriptions", Text[].class, e);
+ }
+ }
+
+ context.afterUnmarshal(cmrField, LifecycleCallback.NONE);
+
+ return cmrField;
+ }
+
+ public final CmrField read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, CmrField cmrField, RuntimeContext context)
+ throws Exception {
+ if (cmrField == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (CmrField.class != cmrField.getClass()) {
+ context.unexpectedSubclass(writer, cmrField, CmrField.class);
+ return;
+ }
+
+ context.beforeMarshal(cmrField, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = cmrField.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(cmrField, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = cmrField.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(cmrField, "descriptions", CmrField.class, "getDescriptions", e);
+ }
+ if (descriptions != null) {
+ for (Text descriptionsItem : descriptions) {
+ if (descriptionsItem != null) {
+ writer.writeStartElement(prefix, "description", "http://java.sun.com/xml/ns/javaee");
+ writeText(writer, descriptionsItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(cmrField, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: cmrFieldName
+ String cmrFieldNameRaw = cmrField.cmrFieldName;
+ String cmrFieldName = null;
+ try {
+ cmrFieldName = Adapters.collapsedStringAdapterAdapter.marshal(cmrFieldNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(cmrField, "cmrFieldName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (cmrFieldName != null) {
+ writer.writeStartElement(prefix, "cmr-field-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(cmrFieldName);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(cmrField, "cmrFieldName");
+ }
+
+ // ELEMENT: cmrFieldType
+ CmrFieldType cmrFieldType = cmrField.cmrFieldType;
+ if (cmrFieldType != null) {
+ writer.writeStartElement(prefix, "cmr-field-type", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(toStringCmrFieldType(cmrField, null, context, cmrFieldType));
+ writer.writeEndElement();
+ }
+
+ context.afterMarshal(cmrField, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrField$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrFieldType$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrFieldType%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrFieldType$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrFieldType$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,67 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBEnum;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+
+import javax.xml.namespace.QName;
+
+public class CmrFieldType$JAXB
+ extends JAXBEnum<CmrFieldType> {
+
+
+ public CmrFieldType$JAXB() {
+ super(CmrFieldType.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "cmrFieldType".intern()));
+ }
+
+ public CmrFieldType parse(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ return parseCmrFieldType(reader, context, value);
+ }
+
+ public String toString(Object bean, String parameterName, RuntimeContext context, CmrFieldType cmrFieldType)
+ throws Exception {
+ return toStringCmrFieldType(bean, parameterName, context, cmrFieldType);
+ }
+
+ public static CmrFieldType parseCmrFieldType(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ if ("java.util.Collection".equals(value)) {
+ return CmrFieldType.COLLECTION;
+ } else if ("java.util.Set".equals(value)) {
+ return CmrFieldType.SET;
+ } else {
+ context.unexpectedEnumValue(reader, CmrFieldType.class, value, "java.util.Collection", "java.util.Set");
+ return null;
+ }
+ }
+
+ public static String toStringCmrFieldType(Object bean, String parameterName, RuntimeContext context, CmrFieldType cmrFieldType)
+ throws Exception {
+ if (CmrFieldType.COLLECTION == cmrFieldType) {
+ return "java.util.Collection";
+ } else if (CmrFieldType.SET == cmrFieldType) {
+ return "java.util.Set";
+ } else {
+ context.unexpectedEnumConst(bean, parameterName, cmrFieldType, CmrFieldType.COLLECTION, CmrFieldType.SET);
+ return null;
+ }
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/CmrFieldType$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrencyManagementType$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrencyManagementType%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrencyManagementType$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrencyManagementType$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,67 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBEnum;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+
+import javax.xml.namespace.QName;
+
+public class ConcurrencyManagementType$JAXB
+ extends JAXBEnum<ConcurrencyManagementType> {
+
+
+ public ConcurrencyManagementType$JAXB() {
+ super(ConcurrencyManagementType.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "concurrency-management-typeType".intern()));
+ }
+
+ public ConcurrencyManagementType parse(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ return parseConcurrencyManagementType(reader, context, value);
+ }
+
+ public String toString(Object bean, String parameterName, RuntimeContext context, ConcurrencyManagementType concurrencyManagementType)
+ throws Exception {
+ return toStringConcurrencyManagementType(bean, parameterName, context, concurrencyManagementType);
+ }
+
+ public static ConcurrencyManagementType parseConcurrencyManagementType(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ if ("Bean".equals(value)) {
+ return ConcurrencyManagementType.BEAN;
+ } else if ("Container".equals(value)) {
+ return ConcurrencyManagementType.CONTAINER;
+ } else {
+ context.unexpectedEnumValue(reader, ConcurrencyManagementType.class, value, "Bean", "Container");
+ return null;
+ }
+ }
+
+ public static String toStringConcurrencyManagementType(Object bean, String parameterName, RuntimeContext context, ConcurrencyManagementType concurrencyManagementType)
+ throws Exception {
+ if (ConcurrencyManagementType.BEAN == concurrencyManagementType) {
+ return "Bean";
+ } else if (ConcurrencyManagementType.CONTAINER == concurrencyManagementType) {
+ return "Container";
+ } else {
+ context.unexpectedEnumConst(bean, parameterName, concurrencyManagementType, ConcurrencyManagementType.BEAN, ConcurrencyManagementType.CONTAINER);
+ return null;
+ }
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrencyManagementType$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentLockType$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentLockType%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentLockType$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentLockType$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,67 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBEnum;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+
+import javax.xml.namespace.QName;
+
+public class ConcurrentLockType$JAXB
+ extends JAXBEnum<ConcurrentLockType> {
+
+
+ public ConcurrentLockType$JAXB() {
+ super(ConcurrentLockType.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "concurrent-lock-typeType".intern()));
+ }
+
+ public ConcurrentLockType parse(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ return parseConcurrentLockType(reader, context, value);
+ }
+
+ public String toString(Object bean, String parameterName, RuntimeContext context, ConcurrentLockType concurrentLockType)
+ throws Exception {
+ return toStringConcurrentLockType(bean, parameterName, context, concurrentLockType);
+ }
+
+ public static ConcurrentLockType parseConcurrentLockType(XoXMLStreamReader reader, RuntimeContext context, String value)
+ throws Exception {
+ if ("Read".equals(value)) {
+ return ConcurrentLockType.READ;
+ } else if ("Write".equals(value)) {
+ return ConcurrentLockType.WRITE;
+ } else {
+ context.unexpectedEnumValue(reader, ConcurrentLockType.class, value, "Read", "Write");
+ return null;
+ }
+ }
+
+ public static String toStringConcurrentLockType(Object bean, String parameterName, RuntimeContext context, ConcurrentLockType concurrentLockType)
+ throws Exception {
+ if (ConcurrentLockType.READ == concurrentLockType) {
+ return "Read";
+ } else if (ConcurrentLockType.WRITE == concurrentLockType) {
+ return "Write";
+ } else {
+ context.unexpectedEnumConst(bean, parameterName, concurrentLockType, ConcurrentLockType.READ, ConcurrentLockType.WRITE);
+ return null;
+ }
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentLockType$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentMethod$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentMethod%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentMethod$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentMethod$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,191 @@
+/*
+ * 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 org.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+
+import static org.apache.openejb.jee.ConcurrentLockType$JAXB.parseConcurrentLockType;
+import static org.apache.openejb.jee.ConcurrentLockType$JAXB.toStringConcurrentLockType;
+import static org.apache.openejb.jee.NamedMethod$JAXB.readNamedMethod;
+import static org.apache.openejb.jee.NamedMethod$JAXB.writeNamedMethod;
+import static org.apache.openejb.jee.Timeout$JAXB.readTimeout;
+import static org.apache.openejb.jee.Timeout$JAXB.writeTimeout;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class ConcurrentMethod$JAXB
+ extends JAXBObject<ConcurrentMethod> {
+
+
+ public ConcurrentMethod$JAXB() {
+ super(ConcurrentMethod.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "concurrent-methodType".intern()), NamedMethod$JAXB.class, ConcurrentLockType$JAXB.class, Timeout$JAXB.class);
+ }
+
+ public static ConcurrentMethod readConcurrentMethod(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeConcurrentMethod(XoXMLStreamWriter writer, ConcurrentMethod concurrentMethod, RuntimeContext context)
+ throws Exception {
+ _write(writer, concurrentMethod, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, ConcurrentMethod concurrentMethod, RuntimeContext context)
+ throws Exception {
+ _write(writer, concurrentMethod, context);
+ }
+
+ public final static ConcurrentMethod _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ ConcurrentMethod concurrentMethod = new ConcurrentMethod();
+ context.beforeUnmarshal(concurrentMethod, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("concurrent-methodType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, ConcurrentMethod.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, concurrentMethod);
+ concurrentMethod.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("method" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: method
+ NamedMethod method = readNamedMethod(elementReader, context);
+ concurrentMethod.method = method;
+ } else if (("lock" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: lock
+ ConcurrentLockType lock = parseConcurrentLockType(elementReader, context, elementReader.getElementAsString());
+ if (lock != null) {
+ concurrentMethod.lock = lock;
+ }
+ } else if (("access-timeout" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: accessTimeout
+ Timeout accessTimeout = readTimeout(elementReader, context);
+ concurrentMethod.accessTimeout = accessTimeout;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "method"), new QName("http://java.sun.com/xml/ns/javaee", "lock"), new QName("http://java.sun.com/xml/ns/javaee", "access-timeout"));
+ }
+ }
+
+ context.afterUnmarshal(concurrentMethod, LifecycleCallback.NONE);
+
+ return concurrentMethod;
+ }
+
+ public final ConcurrentMethod read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, ConcurrentMethod concurrentMethod, RuntimeContext context)
+ throws Exception {
+ if (concurrentMethod == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (ConcurrentMethod.class != concurrentMethod.getClass()) {
+ context.unexpectedSubclass(writer, concurrentMethod, ConcurrentMethod.class);
+ return;
+ }
+
+ context.beforeMarshal(concurrentMethod, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = concurrentMethod.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(concurrentMethod, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: method
+ NamedMethod method = concurrentMethod.method;
+ if (method != null) {
+ writer.writeStartElement(prefix, "method", "http://java.sun.com/xml/ns/javaee");
+ writeNamedMethod(writer, method, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(concurrentMethod, "method");
+ }
+
+ // ELEMENT: lock
+ ConcurrentLockType lock = concurrentMethod.lock;
+ if (lock != null) {
+ writer.writeStartElement(prefix, "lock", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(toStringConcurrentLockType(concurrentMethod, null, context, lock));
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: accessTimeout
+ Timeout accessTimeout = concurrentMethod.accessTimeout;
+ if (accessTimeout != null) {
+ writer.writeStartElement(prefix, "access-timeout", "http://java.sun.com/xml/ns/javaee");
+ writeTimeout(writer, accessTimeout, context);
+ writer.writeEndElement();
+ }
+
+ context.afterMarshal(concurrentMethod, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ConcurrentMethod$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native