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 [12/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/ ope...
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesDefaultLocale$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesDefaultLocale%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesDefaultLocale$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesDefaultLocale$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,142 @@
+/*
+ * 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;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesDefaultLocale$JAXB
+ extends JAXBObject<FacesDefaultLocale> {
+
+
+ public FacesDefaultLocale$JAXB() {
+ super(FacesDefaultLocale.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-default-localeType".intern()));
+ }
+
+ public static FacesDefaultLocale readFacesDefaultLocale(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesDefaultLocale(XoXMLStreamWriter writer, FacesDefaultLocale facesDefaultLocale, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesDefaultLocale, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesDefaultLocale facesDefaultLocale, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesDefaultLocale, context);
+ }
+
+ public final static FacesDefaultLocale _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesDefaultLocale facesDefaultLocale = new FacesDefaultLocale();
+ context.beforeUnmarshal(facesDefaultLocale, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-default-localeType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesDefaultLocale.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, facesDefaultLocale);
+ facesDefaultLocale.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // VALUE: value
+ facesDefaultLocale.value = null;
+
+ context.afterUnmarshal(facesDefaultLocale, LifecycleCallback.NONE);
+
+ return facesDefaultLocale;
+ }
+
+ public final FacesDefaultLocale read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesDefaultLocale facesDefaultLocale, RuntimeContext context)
+ throws Exception {
+ if (facesDefaultLocale == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesDefaultLocale.class != facesDefaultLocale.getClass()) {
+ context.unexpectedSubclass(writer, facesDefaultLocale, FacesDefaultLocale.class);
+ return;
+ }
+
+ context.beforeMarshal(facesDefaultLocale, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesDefaultLocale.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesDefaultLocale, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // VALUE: value
+ FacesLocale value = facesDefaultLocale.value;
+
+ context.afterMarshal(facesDefaultLocale, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesDefaultLocale$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesELExpression$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesELExpression%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesELExpression$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesELExpression$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,146 @@
+/*
+ * 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;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesELExpression$JAXB
+ extends JAXBObject<FacesELExpression> {
+
+
+ public FacesELExpression$JAXB() {
+ super(FacesELExpression.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-el-expressionType".intern()));
+ }
+
+ public static FacesELExpression readFacesELExpression(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesELExpression(XoXMLStreamWriter writer, FacesELExpression facesELExpression, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesELExpression, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesELExpression facesELExpression, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesELExpression, context);
+ }
+
+ public final static FacesELExpression _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesELExpression facesELExpression = new FacesELExpression();
+ context.beforeUnmarshal(facesELExpression, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-el-expressionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesELExpression.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute);
+ }
+ }
+
+ // VALUE: value
+ String valueRaw = reader.getElementText();
+
+ String value = null;
+ boolean valueConverted;
+ try {
+ value = Adapters.collapsedStringAdapterAdapter.unmarshal(valueRaw);
+ valueConverted = true;
+ } catch (Exception e) {
+ context.xmlAdapterError(reader, CollapsedStringAdapter.class, String.class, String.class, e);
+ valueConverted = false;
+ }
+
+ if (valueConverted) {
+ facesELExpression.value = value;
+ }
+
+ context.afterUnmarshal(facesELExpression, LifecycleCallback.NONE);
+
+ return facesELExpression;
+ }
+
+ public final FacesELExpression read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesELExpression facesELExpression, RuntimeContext context)
+ throws Exception {
+ if (facesELExpression == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesELExpression.class != facesELExpression.getClass()) {
+ context.unexpectedSubclass(writer, facesELExpression, FacesELExpression.class);
+ return;
+ }
+
+ context.beforeMarshal(facesELExpression, LifecycleCallback.NONE);
+
+
+ // VALUE: value
+ String valueRaw = facesELExpression.value;
+ String value = null;
+ try {
+ value = Adapters.collapsedStringAdapterAdapter.marshal(valueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesELExpression, "value", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeCharacters(value);
+
+ context.afterMarshal(facesELExpression, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesELExpression$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesExtension$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesExtension%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesExtension$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesExtension$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,164 @@
+/*
+ * 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;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesExtension$JAXB
+ extends JAXBObject<FacesExtension> {
+
+
+ public FacesExtension$JAXB() {
+ super(FacesExtension.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-extensionType".intern()));
+ }
+
+ public static FacesExtension readFacesExtension(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesExtension(XoXMLStreamWriter writer, FacesExtension facesExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesExtension, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesExtension facesExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesExtension, context);
+ }
+
+ public final static FacesExtension _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesExtension facesExtension = new FacesExtension();
+ context.beforeUnmarshal(facesExtension, LifecycleCallback.NONE);
+
+ List<Object> any = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-extensionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesExtension.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, facesExtension);
+ facesExtension.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()) {
+ // ELEMENT_REF: any
+ if (any == null) {
+ any = facesExtension.any;
+ if (any != null) {
+ any.clear();
+ } else {
+ any = new ArrayList<Object>();
+ }
+ }
+ any.add(context.readXmlAny(elementReader, Object.class, true));
+ }
+ if (any != null) {
+ facesExtension.any = any;
+ }
+
+ context.afterUnmarshal(facesExtension, LifecycleCallback.NONE);
+
+ return facesExtension;
+ }
+
+ public final FacesExtension read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesExtension facesExtension, RuntimeContext context)
+ throws Exception {
+ if (facesExtension == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesExtension.class != facesExtension.getClass()) {
+ context.unexpectedSubclass(writer, facesExtension, FacesExtension.class);
+ return;
+ }
+
+ context.beforeMarshal(facesExtension, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesExtension.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesExtension, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT_REF: any
+ List<Object> any = facesExtension.any;
+ if (any != null) {
+ for (Object anyItem : any) {
+ context.writeXmlAny(writer, facesExtension, "any", anyItem);
+ }
+ }
+
+ context.afterMarshal(facesExtension, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesExtension$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacet$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacet%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacet$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacet$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,308 @@
+/*
+ * 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.FacesFacetExtension$JAXB.readFacesFacetExtension;
+import static org.apache.openejb.jee.FacesFacetExtension$JAXB.writeFacesFacetExtension;
+import static org.apache.openejb.jee.Icon$JAXB.readIcon;
+import static org.apache.openejb.jee.Icon$JAXB.writeIcon;
+import static org.apache.openejb.jee.Text$JAXB.readText;
+import static org.apache.openejb.jee.Text$JAXB.writeText;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesFacet$JAXB
+ extends JAXBObject<FacesFacet> {
+
+
+ public FacesFacet$JAXB() {
+ super(FacesFacet.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-facetType".intern()), Text$JAXB.class, Icon$JAXB.class, FacesFacetExtension$JAXB.class);
+ }
+
+ public static FacesFacet readFacesFacet(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesFacet(XoXMLStreamWriter writer, FacesFacet facesFacet, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFacet, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesFacet facesFacet, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFacet, context);
+ }
+
+ public final static FacesFacet _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesFacet facesFacet = new FacesFacet();
+ context.beforeUnmarshal(facesFacet, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+ ArrayList<Text> displayNames = null;
+ LocalCollection<Icon> icon = null;
+ List<FacesFacetExtension> facetExtension = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-facetType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesFacet.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, facesFacet);
+ facesFacet.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 (("display-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: displayNames
+ Text displayNamesItem = readText(elementReader, context);
+ if (displayNames == null) {
+ displayNames = new ArrayList<Text>();
+ }
+ displayNames.add(displayNamesItem);
+ } else if (("icon" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: icon
+ Icon iconItem = readIcon(elementReader, context);
+ if (icon == null) {
+ icon = facesFacet.icon;
+ if (icon != null) {
+ icon.clear();
+ } else {
+ icon = new LocalCollection<Icon>();
+ }
+ }
+ icon.add(iconItem);
+ } else if (("facet-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: facetName
+ String facetNameRaw = elementReader.getElementAsString();
+
+ String facetName;
+ try {
+ facetName = Adapters.collapsedStringAdapterAdapter.unmarshal(facetNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesFacet.facetName = facetName;
+ } else if (("facet-extension" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: facetExtension
+ FacesFacetExtension facetExtensionItem = readFacesFacetExtension(elementReader, context);
+ if (facetExtension == null) {
+ facetExtension = facesFacet.facetExtension;
+ if (facetExtension != null) {
+ facetExtension.clear();
+ } else {
+ facetExtension = new ArrayList<FacesFacetExtension>();
+ }
+ }
+ facetExtension.add(facetExtensionItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "description"), new QName("http://java.sun.com/xml/ns/javaee", "display-name"), new QName("http://java.sun.com/xml/ns/javaee", "icon"), new QName("http://java.sun.com/xml/ns/javaee", "facet-name"), new QName("http://java.sun.com/xml/ns/javaee", "facet-extension"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ facesFacet.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesFacet.class, "setDescriptions", Text[].class, e);
+ }
+ }
+ if (displayNames != null) {
+ try {
+ facesFacet.setDisplayNames(displayNames.toArray(new Text[displayNames.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesFacet.class, "setDisplayNames", Text[].class, e);
+ }
+ }
+ if (icon != null) {
+ facesFacet.icon = icon;
+ }
+ if (facetExtension != null) {
+ facesFacet.facetExtension = facetExtension;
+ }
+
+ context.afterUnmarshal(facesFacet, LifecycleCallback.NONE);
+
+ return facesFacet;
+ }
+
+ public final FacesFacet read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesFacet facesFacet, RuntimeContext context)
+ throws Exception {
+ if (facesFacet == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesFacet.class != facesFacet.getClass()) {
+ context.unexpectedSubclass(writer, facesFacet, FacesFacet.class);
+ return;
+ }
+
+ context.beforeMarshal(facesFacet, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesFacet.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFacet, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = facesFacet.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(facesFacet, "descriptions", FacesFacet.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(facesFacet, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: displayNames
+ Text[] displayNames = null;
+ try {
+ displayNames = facesFacet.getDisplayNames();
+ } catch (Exception e) {
+ context.getterError(facesFacet, "displayNames", FacesFacet.class, "getDisplayNames", e);
+ }
+ if (displayNames != null) {
+ for (Text displayNamesItem : displayNames) {
+ if (displayNamesItem != null) {
+ writer.writeStartElement(prefix, "display-name", "http://java.sun.com/xml/ns/javaee");
+ writeText(writer, displayNamesItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesFacet, "displayNames");
+ }
+ }
+ }
+
+ // ELEMENT: icon
+ LocalCollection<Icon> icon = facesFacet.icon;
+ if (icon != null) {
+ for (Icon iconItem : icon) {
+ if (iconItem != null) {
+ writer.writeStartElement(prefix, "icon", "http://java.sun.com/xml/ns/javaee");
+ writeIcon(writer, iconItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesFacet, "icon");
+ }
+ }
+ }
+
+ // ELEMENT: facetName
+ String facetNameRaw = facesFacet.facetName;
+ String facetName = null;
+ try {
+ facetName = Adapters.collapsedStringAdapterAdapter.marshal(facetNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFacet, "facetName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (facetName != null) {
+ writer.writeStartElement(prefix, "facet-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(facetName);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesFacet, "facetName");
+ }
+
+ // ELEMENT: facetExtension
+ List<FacesFacetExtension> facetExtension = facesFacet.facetExtension;
+ if (facetExtension != null) {
+ for (FacesFacetExtension facetExtensionItem : facetExtension) {
+ if (facetExtensionItem != null) {
+ writer.writeStartElement(prefix, "facet-extension", "http://java.sun.com/xml/ns/javaee");
+ writeFacesFacetExtension(writer, facetExtensionItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesFacet, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacet$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacetExtension$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacetExtension%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacetExtension$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacetExtension$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,164 @@
+/*
+ * 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;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesFacetExtension$JAXB
+ extends JAXBObject<FacesFacetExtension> {
+
+
+ public FacesFacetExtension$JAXB() {
+ super(FacesFacetExtension.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-facet-extensionType".intern()));
+ }
+
+ public static FacesFacetExtension readFacesFacetExtension(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesFacetExtension(XoXMLStreamWriter writer, FacesFacetExtension facesFacetExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFacetExtension, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesFacetExtension facesFacetExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFacetExtension, context);
+ }
+
+ public final static FacesFacetExtension _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesFacetExtension facesFacetExtension = new FacesFacetExtension();
+ context.beforeUnmarshal(facesFacetExtension, LifecycleCallback.NONE);
+
+ List<Object> any = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-facet-extensionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesFacetExtension.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, facesFacetExtension);
+ facesFacetExtension.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()) {
+ // ELEMENT_REF: any
+ if (any == null) {
+ any = facesFacetExtension.any;
+ if (any != null) {
+ any.clear();
+ } else {
+ any = new ArrayList<Object>();
+ }
+ }
+ any.add(context.readXmlAny(elementReader, Object.class, true));
+ }
+ if (any != null) {
+ facesFacetExtension.any = any;
+ }
+
+ context.afterUnmarshal(facesFacetExtension, LifecycleCallback.NONE);
+
+ return facesFacetExtension;
+ }
+
+ public final FacesFacetExtension read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesFacetExtension facesFacetExtension, RuntimeContext context)
+ throws Exception {
+ if (facesFacetExtension == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesFacetExtension.class != facesFacetExtension.getClass()) {
+ context.unexpectedSubclass(writer, facesFacetExtension, FacesFacetExtension.class);
+ return;
+ }
+
+ context.beforeMarshal(facesFacetExtension, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesFacetExtension.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFacetExtension, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT_REF: any
+ List<Object> any = facesFacetExtension.any;
+ if (any != null) {
+ for (Object anyItem : any) {
+ context.writeXmlAny(writer, facesFacetExtension, "any", anyItem);
+ }
+ }
+
+ context.afterMarshal(facesFacetExtension, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFacetExtension$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactory$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactory%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactory$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactory$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,607 @@
+/*
+ * 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.FacesFactoryExtension$JAXB.readFacesFactoryExtension;
+import static org.apache.openejb.jee.FacesFactoryExtension$JAXB.writeFacesFactoryExtension;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesFactory$JAXB
+ extends JAXBObject<FacesFactory> {
+
+
+ public FacesFactory$JAXB() {
+ super(FacesFactory.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-factoryType".intern()), FacesFactoryExtension$JAXB.class);
+ }
+
+ public static FacesFactory readFacesFactory(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesFactory(XoXMLStreamWriter writer, FacesFactory facesFactory, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFactory, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesFactory facesFactory, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFactory, context);
+ }
+
+ public final static FacesFactory _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesFactory facesFactory = new FacesFactory();
+ context.beforeUnmarshal(facesFactory, LifecycleCallback.NONE);
+
+ List<String> applicationFactory = null;
+ List<String> exceptionHandlerFactory = null;
+ List<String> externalContextFactory = null;
+ List<String> facesContextFactory = null;
+ List<String> partialViewContextFactory = null;
+ List<String> lifecycleFactory = null;
+ List<String> viewDeclarationLanguageFactory = null;
+ List<String> tagHandlerDelegateFactory = null;
+ List<String> renderKitFactory = null;
+ List<String> visitContextFactory = null;
+ List<FacesFactoryExtension> factoryExtension = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-factoryType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesFactory.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, facesFactory);
+ facesFactory.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 (("application-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: applicationFactory
+ String applicationFactoryItemRaw = elementReader.getElementAsString();
+
+ String applicationFactoryItem;
+ try {
+ applicationFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(applicationFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (applicationFactory == null) {
+ applicationFactory = facesFactory.applicationFactory;
+ if (applicationFactory != null) {
+ applicationFactory.clear();
+ } else {
+ applicationFactory = new ArrayList<String>();
+ }
+ }
+ applicationFactory.add(applicationFactoryItem);
+ } else if (("exception-handler-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: exceptionHandlerFactory
+ String exceptionHandlerFactoryItemRaw = elementReader.getElementAsString();
+
+ String exceptionHandlerFactoryItem;
+ try {
+ exceptionHandlerFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(exceptionHandlerFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (exceptionHandlerFactory == null) {
+ exceptionHandlerFactory = facesFactory.exceptionHandlerFactory;
+ if (exceptionHandlerFactory != null) {
+ exceptionHandlerFactory.clear();
+ } else {
+ exceptionHandlerFactory = new ArrayList<String>();
+ }
+ }
+ exceptionHandlerFactory.add(exceptionHandlerFactoryItem);
+ } else if (("external-context-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: externalContextFactory
+ String externalContextFactoryItemRaw = elementReader.getElementAsString();
+
+ String externalContextFactoryItem;
+ try {
+ externalContextFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(externalContextFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (externalContextFactory == null) {
+ externalContextFactory = facesFactory.externalContextFactory;
+ if (externalContextFactory != null) {
+ externalContextFactory.clear();
+ } else {
+ externalContextFactory = new ArrayList<String>();
+ }
+ }
+ externalContextFactory.add(externalContextFactoryItem);
+ } else if (("faces-context-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: facesContextFactory
+ String facesContextFactoryItemRaw = elementReader.getElementAsString();
+
+ String facesContextFactoryItem;
+ try {
+ facesContextFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(facesContextFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (facesContextFactory == null) {
+ facesContextFactory = facesFactory.facesContextFactory;
+ if (facesContextFactory != null) {
+ facesContextFactory.clear();
+ } else {
+ facesContextFactory = new ArrayList<String>();
+ }
+ }
+ facesContextFactory.add(facesContextFactoryItem);
+ } else if (("partial-view-context-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: partialViewContextFactory
+ String partialViewContextFactoryItemRaw = elementReader.getElementAsString();
+
+ String partialViewContextFactoryItem;
+ try {
+ partialViewContextFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(partialViewContextFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (partialViewContextFactory == null) {
+ partialViewContextFactory = facesFactory.partialViewContextFactory;
+ if (partialViewContextFactory != null) {
+ partialViewContextFactory.clear();
+ } else {
+ partialViewContextFactory = new ArrayList<String>();
+ }
+ }
+ partialViewContextFactory.add(partialViewContextFactoryItem);
+ } else if (("lifecycle-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: lifecycleFactory
+ String lifecycleFactoryItemRaw = elementReader.getElementAsString();
+
+ String lifecycleFactoryItem;
+ try {
+ lifecycleFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(lifecycleFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (lifecycleFactory == null) {
+ lifecycleFactory = facesFactory.lifecycleFactory;
+ if (lifecycleFactory != null) {
+ lifecycleFactory.clear();
+ } else {
+ lifecycleFactory = new ArrayList<String>();
+ }
+ }
+ lifecycleFactory.add(lifecycleFactoryItem);
+ } else if (("view-declaration-language-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: viewDeclarationLanguageFactory
+ String viewDeclarationLanguageFactoryItemRaw = elementReader.getElementAsString();
+
+ String viewDeclarationLanguageFactoryItem;
+ try {
+ viewDeclarationLanguageFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(viewDeclarationLanguageFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (viewDeclarationLanguageFactory == null) {
+ viewDeclarationLanguageFactory = facesFactory.viewDeclarationLanguageFactory;
+ if (viewDeclarationLanguageFactory != null) {
+ viewDeclarationLanguageFactory.clear();
+ } else {
+ viewDeclarationLanguageFactory = new ArrayList<String>();
+ }
+ }
+ viewDeclarationLanguageFactory.add(viewDeclarationLanguageFactoryItem);
+ } else if (("tag-handler-delegate-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: tagHandlerDelegateFactory
+ String tagHandlerDelegateFactoryItemRaw = elementReader.getElementAsString();
+
+ String tagHandlerDelegateFactoryItem;
+ try {
+ tagHandlerDelegateFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(tagHandlerDelegateFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (tagHandlerDelegateFactory == null) {
+ tagHandlerDelegateFactory = facesFactory.tagHandlerDelegateFactory;
+ if (tagHandlerDelegateFactory != null) {
+ tagHandlerDelegateFactory.clear();
+ } else {
+ tagHandlerDelegateFactory = new ArrayList<String>();
+ }
+ }
+ tagHandlerDelegateFactory.add(tagHandlerDelegateFactoryItem);
+ } else if (("render-kit-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: renderKitFactory
+ String renderKitFactoryItemRaw = elementReader.getElementAsString();
+
+ String renderKitFactoryItem;
+ try {
+ renderKitFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(renderKitFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (renderKitFactory == null) {
+ renderKitFactory = facesFactory.renderKitFactory;
+ if (renderKitFactory != null) {
+ renderKitFactory.clear();
+ } else {
+ renderKitFactory = new ArrayList<String>();
+ }
+ }
+ renderKitFactory.add(renderKitFactoryItem);
+ } else if (("visit-context-factory" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: visitContextFactory
+ String visitContextFactoryItemRaw = elementReader.getElementAsString();
+
+ String visitContextFactoryItem;
+ try {
+ visitContextFactoryItem = Adapters.collapsedStringAdapterAdapter.unmarshal(visitContextFactoryItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (visitContextFactory == null) {
+ visitContextFactory = facesFactory.visitContextFactory;
+ if (visitContextFactory != null) {
+ visitContextFactory.clear();
+ } else {
+ visitContextFactory = new ArrayList<String>();
+ }
+ }
+ visitContextFactory.add(visitContextFactoryItem);
+ } else if (("factory-extension" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: factoryExtension
+ FacesFactoryExtension factoryExtensionItem = readFacesFactoryExtension(elementReader, context);
+ if (factoryExtension == null) {
+ factoryExtension = facesFactory.factoryExtension;
+ if (factoryExtension != null) {
+ factoryExtension.clear();
+ } else {
+ factoryExtension = new ArrayList<FacesFactoryExtension>();
+ }
+ }
+ factoryExtension.add(factoryExtensionItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "application-factory"), new QName("http://java.sun.com/xml/ns/javaee", "exception-handler-factory"), new QName("http://java.sun.com/xml/ns/javaee", "external-context-factory"), new QName("http://java.sun.com/xml/ns/javaee", "faces-context-factory"), new QName("http://java.sun.com/xml/ns/javaee", "partial-view-context-factory"), new QName("http://java.sun.com/xml/ns/javaee", "lifecycle-factory"), new QName("http://java.sun.com/xml/ns/javaee", "view-declaration-language-factory"), new QName("http://java.sun.com/xml/ns/javaee", "tag-handler-delegate-factory"), new QName("http://java.sun.com/xml/ns/javaee", "render-kit-factory"), new QName("http://java.sun.com/xml/ns/javaee", "visit-context-factory"), new QName("http://java.sun.com/xml/ns/javaee", "factory-extension"));
+ }
+ }
+ if (applicationFactory != null) {
+ facesFactory.applicationFactory = applicationFactory;
+ }
+ if (exceptionHandlerFactory != null) {
+ facesFactory.exceptionHandlerFactory = exceptionHandlerFactory;
+ }
+ if (externalContextFactory != null) {
+ facesFactory.externalContextFactory = externalContextFactory;
+ }
+ if (facesContextFactory != null) {
+ facesFactory.facesContextFactory = facesContextFactory;
+ }
+ if (partialViewContextFactory != null) {
+ facesFactory.partialViewContextFactory = partialViewContextFactory;
+ }
+ if (lifecycleFactory != null) {
+ facesFactory.lifecycleFactory = lifecycleFactory;
+ }
+ if (viewDeclarationLanguageFactory != null) {
+ facesFactory.viewDeclarationLanguageFactory = viewDeclarationLanguageFactory;
+ }
+ if (tagHandlerDelegateFactory != null) {
+ facesFactory.tagHandlerDelegateFactory = tagHandlerDelegateFactory;
+ }
+ if (renderKitFactory != null) {
+ facesFactory.renderKitFactory = renderKitFactory;
+ }
+ if (visitContextFactory != null) {
+ facesFactory.visitContextFactory = visitContextFactory;
+ }
+ if (factoryExtension != null) {
+ facesFactory.factoryExtension = factoryExtension;
+ }
+
+ context.afterUnmarshal(facesFactory, LifecycleCallback.NONE);
+
+ return facesFactory;
+ }
+
+ public final FacesFactory read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesFactory facesFactory, RuntimeContext context)
+ throws Exception {
+ if (facesFactory == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesFactory.class != facesFactory.getClass()) {
+ context.unexpectedSubclass(writer, facesFactory, FacesFactory.class);
+ return;
+ }
+
+ context.beforeMarshal(facesFactory, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesFactory.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: applicationFactory
+ List<String> applicationFactoryRaw = facesFactory.applicationFactory;
+ if (applicationFactoryRaw != null) {
+ for (String applicationFactoryItem : applicationFactoryRaw) {
+ String applicationFactory = null;
+ try {
+ applicationFactory = Adapters.collapsedStringAdapterAdapter.marshal(applicationFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "applicationFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (applicationFactory != null) {
+ writer.writeStartElement(prefix, "application-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(applicationFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: exceptionHandlerFactory
+ List<String> exceptionHandlerFactoryRaw = facesFactory.exceptionHandlerFactory;
+ if (exceptionHandlerFactoryRaw != null) {
+ for (String exceptionHandlerFactoryItem : exceptionHandlerFactoryRaw) {
+ String exceptionHandlerFactory = null;
+ try {
+ exceptionHandlerFactory = Adapters.collapsedStringAdapterAdapter.marshal(exceptionHandlerFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "exceptionHandlerFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (exceptionHandlerFactory != null) {
+ writer.writeStartElement(prefix, "exception-handler-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(exceptionHandlerFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: externalContextFactory
+ List<String> externalContextFactoryRaw = facesFactory.externalContextFactory;
+ if (externalContextFactoryRaw != null) {
+ for (String externalContextFactoryItem : externalContextFactoryRaw) {
+ String externalContextFactory = null;
+ try {
+ externalContextFactory = Adapters.collapsedStringAdapterAdapter.marshal(externalContextFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "externalContextFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (externalContextFactory != null) {
+ writer.writeStartElement(prefix, "external-context-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(externalContextFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: facesContextFactory
+ List<String> facesContextFactoryRaw = facesFactory.facesContextFactory;
+ if (facesContextFactoryRaw != null) {
+ for (String facesContextFactoryItem : facesContextFactoryRaw) {
+ String facesContextFactory = null;
+ try {
+ facesContextFactory = Adapters.collapsedStringAdapterAdapter.marshal(facesContextFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "facesContextFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (facesContextFactory != null) {
+ writer.writeStartElement(prefix, "faces-context-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(facesContextFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: partialViewContextFactory
+ List<String> partialViewContextFactoryRaw = facesFactory.partialViewContextFactory;
+ if (partialViewContextFactoryRaw != null) {
+ for (String partialViewContextFactoryItem : partialViewContextFactoryRaw) {
+ String partialViewContextFactory = null;
+ try {
+ partialViewContextFactory = Adapters.collapsedStringAdapterAdapter.marshal(partialViewContextFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "partialViewContextFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (partialViewContextFactory != null) {
+ writer.writeStartElement(prefix, "partial-view-context-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(partialViewContextFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: lifecycleFactory
+ List<String> lifecycleFactoryRaw = facesFactory.lifecycleFactory;
+ if (lifecycleFactoryRaw != null) {
+ for (String lifecycleFactoryItem : lifecycleFactoryRaw) {
+ String lifecycleFactory = null;
+ try {
+ lifecycleFactory = Adapters.collapsedStringAdapterAdapter.marshal(lifecycleFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "lifecycleFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (lifecycleFactory != null) {
+ writer.writeStartElement(prefix, "lifecycle-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(lifecycleFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: viewDeclarationLanguageFactory
+ List<String> viewDeclarationLanguageFactoryRaw = facesFactory.viewDeclarationLanguageFactory;
+ if (viewDeclarationLanguageFactoryRaw != null) {
+ for (String viewDeclarationLanguageFactoryItem : viewDeclarationLanguageFactoryRaw) {
+ String viewDeclarationLanguageFactory = null;
+ try {
+ viewDeclarationLanguageFactory = Adapters.collapsedStringAdapterAdapter.marshal(viewDeclarationLanguageFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "viewDeclarationLanguageFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (viewDeclarationLanguageFactory != null) {
+ writer.writeStartElement(prefix, "view-declaration-language-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(viewDeclarationLanguageFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: tagHandlerDelegateFactory
+ List<String> tagHandlerDelegateFactoryRaw = facesFactory.tagHandlerDelegateFactory;
+ if (tagHandlerDelegateFactoryRaw != null) {
+ for (String tagHandlerDelegateFactoryItem : tagHandlerDelegateFactoryRaw) {
+ String tagHandlerDelegateFactory = null;
+ try {
+ tagHandlerDelegateFactory = Adapters.collapsedStringAdapterAdapter.marshal(tagHandlerDelegateFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "tagHandlerDelegateFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (tagHandlerDelegateFactory != null) {
+ writer.writeStartElement(prefix, "tag-handler-delegate-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(tagHandlerDelegateFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: renderKitFactory
+ List<String> renderKitFactoryRaw = facesFactory.renderKitFactory;
+ if (renderKitFactoryRaw != null) {
+ for (String renderKitFactoryItem : renderKitFactoryRaw) {
+ String renderKitFactory = null;
+ try {
+ renderKitFactory = Adapters.collapsedStringAdapterAdapter.marshal(renderKitFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "renderKitFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (renderKitFactory != null) {
+ writer.writeStartElement(prefix, "render-kit-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(renderKitFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: visitContextFactory
+ List<String> visitContextFactoryRaw = facesFactory.visitContextFactory;
+ if (visitContextFactoryRaw != null) {
+ for (String visitContextFactoryItem : visitContextFactoryRaw) {
+ String visitContextFactory = null;
+ try {
+ visitContextFactory = Adapters.collapsedStringAdapterAdapter.marshal(visitContextFactoryItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactory, "visitContextFactory", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (visitContextFactory != null) {
+ writer.writeStartElement(prefix, "visit-context-factory", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(visitContextFactory);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: factoryExtension
+ List<FacesFactoryExtension> factoryExtension = facesFactory.factoryExtension;
+ if (factoryExtension != null) {
+ for (FacesFactoryExtension factoryExtensionItem : factoryExtension) {
+ if (factoryExtensionItem != null) {
+ writer.writeStartElement(prefix, "factory-extension", "http://java.sun.com/xml/ns/javaee");
+ writeFacesFactoryExtension(writer, factoryExtensionItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesFactory, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactory$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactoryExtension$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactoryExtension%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactoryExtension$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactoryExtension$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,164 @@
+/*
+ * 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;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesFactoryExtension$JAXB
+ extends JAXBObject<FacesFactoryExtension> {
+
+
+ public FacesFactoryExtension$JAXB() {
+ super(FacesFactoryExtension.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-factory-extensionType".intern()));
+ }
+
+ public static FacesFactoryExtension readFacesFactoryExtension(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesFactoryExtension(XoXMLStreamWriter writer, FacesFactoryExtension facesFactoryExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFactoryExtension, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesFactoryExtension facesFactoryExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFactoryExtension, context);
+ }
+
+ public final static FacesFactoryExtension _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesFactoryExtension facesFactoryExtension = new FacesFactoryExtension();
+ context.beforeUnmarshal(facesFactoryExtension, LifecycleCallback.NONE);
+
+ List<Object> any = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-factory-extensionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesFactoryExtension.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, facesFactoryExtension);
+ facesFactoryExtension.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()) {
+ // ELEMENT_REF: any
+ if (any == null) {
+ any = facesFactoryExtension.any;
+ if (any != null) {
+ any.clear();
+ } else {
+ any = new ArrayList<Object>();
+ }
+ }
+ any.add(context.readXmlAny(elementReader, Object.class, true));
+ }
+ if (any != null) {
+ facesFactoryExtension.any = any;
+ }
+
+ context.afterUnmarshal(facesFactoryExtension, LifecycleCallback.NONE);
+
+ return facesFactoryExtension;
+ }
+
+ public final FacesFactoryExtension read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesFactoryExtension facesFactoryExtension, RuntimeContext context)
+ throws Exception {
+ if (facesFactoryExtension == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesFactoryExtension.class != facesFactoryExtension.getClass()) {
+ context.unexpectedSubclass(writer, facesFactoryExtension, FacesFactoryExtension.class);
+ return;
+ }
+
+ context.beforeMarshal(facesFactoryExtension, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesFactoryExtension.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFactoryExtension, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT_REF: any
+ List<Object> any = facesFactoryExtension.any;
+ if (any != null) {
+ for (Object anyItem : any) {
+ context.writeXmlAny(writer, facesFactoryExtension, "any", anyItem);
+ }
+ }
+
+ context.afterMarshal(facesFactoryExtension, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFactoryExtension$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFromAction$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFromAction%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFromAction$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFromAction$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,142 @@
+/*
+ * 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;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesFromAction$JAXB
+ extends JAXBObject<FacesFromAction> {
+
+
+ public FacesFromAction$JAXB() {
+ super(FacesFromAction.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-from-actionType".intern()));
+ }
+
+ public static FacesFromAction readFacesFromAction(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesFromAction(XoXMLStreamWriter writer, FacesFromAction facesFromAction, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFromAction, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesFromAction facesFromAction, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesFromAction, context);
+ }
+
+ public final static FacesFromAction _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesFromAction facesFromAction = new FacesFromAction();
+ context.beforeUnmarshal(facesFromAction, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-from-actionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesFromAction.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, facesFromAction);
+ facesFromAction.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // VALUE: value
+ facesFromAction.value = null;
+
+ context.afterUnmarshal(facesFromAction, LifecycleCallback.NONE);
+
+ return facesFromAction;
+ }
+
+ public final FacesFromAction read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesFromAction facesFromAction, RuntimeContext context)
+ throws Exception {
+ if (facesFromAction == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesFromAction.class != facesFromAction.getClass()) {
+ context.unexpectedSubclass(writer, facesFromAction, FacesFromAction.class);
+ return;
+ }
+
+ context.beforeMarshal(facesFromAction, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesFromAction.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesFromAction, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // VALUE: value
+ FacesELExpression value = facesFromAction.value;
+
+ context.afterMarshal(facesFromAction, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesFromAction$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native