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 [15/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/FacesOrdering$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrdering%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrdering$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrdering$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,153 @@
+/*
+ * 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.namespace.QName;
+
+import static org.apache.openejb.jee.FacesOrderingOrdering$JAXB.readFacesOrderingOrdering;
+import static org.apache.openejb.jee.FacesOrderingOrdering$JAXB.writeFacesOrderingOrdering;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesOrdering$JAXB
+ extends JAXBObject<FacesOrdering> {
+
+
+ public FacesOrdering$JAXB() {
+ super(FacesOrdering.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-orderingType".intern()), FacesOrderingOrdering$JAXB.class);
+ }
+
+ public static FacesOrdering readFacesOrdering(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesOrdering(XoXMLStreamWriter writer, FacesOrdering facesOrdering, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesOrdering, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesOrdering facesOrdering, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesOrdering, context);
+ }
+
+ public final static FacesOrdering _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesOrdering facesOrdering = new FacesOrdering();
+ context.beforeUnmarshal(facesOrdering, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-orderingType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesOrdering.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute);
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("after" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: after
+ FacesOrderingOrdering after = readFacesOrderingOrdering(elementReader, context);
+ facesOrdering.after = after;
+ } else if (("before" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: before
+ FacesOrderingOrdering before = readFacesOrderingOrdering(elementReader, context);
+ facesOrdering.before = before;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "after"), new QName("http://java.sun.com/xml/ns/javaee", "before"));
+ }
+ }
+
+ context.afterUnmarshal(facesOrdering, LifecycleCallback.NONE);
+
+ return facesOrdering;
+ }
+
+ public final FacesOrdering read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesOrdering facesOrdering, RuntimeContext context)
+ throws Exception {
+ if (facesOrdering == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesOrdering.class != facesOrdering.getClass()) {
+ context.unexpectedSubclass(writer, facesOrdering, FacesOrdering.class);
+ return;
+ }
+
+ context.beforeMarshal(facesOrdering, LifecycleCallback.NONE);
+
+
+ // ELEMENT: after
+ FacesOrderingOrdering after = facesOrdering.after;
+ if (after != null) {
+ writer.writeStartElement(prefix, "after", "http://java.sun.com/xml/ns/javaee");
+ writeFacesOrderingOrdering(writer, after, context);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: before
+ FacesOrderingOrdering before = facesOrdering.before;
+ if (before != null) {
+ writer.writeStartElement(prefix, "before", "http://java.sun.com/xml/ns/javaee");
+ writeFacesOrderingOrdering(writer, before, context);
+ writer.writeEndElement();
+ }
+
+ context.afterMarshal(facesOrdering, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrdering$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOrdering$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOrdering%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOrdering$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOrdering$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,192 @@
+/*
+ * 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.FacesOrderingOthers$JAXB.readFacesOrderingOthers;
+import static org.apache.openejb.jee.FacesOrderingOthers$JAXB.writeFacesOrderingOthers;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesOrderingOrdering$JAXB
+ extends JAXBObject<FacesOrderingOrdering> {
+
+
+ public FacesOrderingOrdering$JAXB() {
+ super(FacesOrderingOrdering.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-ordering-orderingType".intern()), FacesOrderingOthers$JAXB.class);
+ }
+
+ public static FacesOrderingOrdering readFacesOrderingOrdering(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesOrderingOrdering(XoXMLStreamWriter writer, FacesOrderingOrdering facesOrderingOrdering, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesOrderingOrdering, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesOrderingOrdering facesOrderingOrdering, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesOrderingOrdering, context);
+ }
+
+ public final static FacesOrderingOrdering _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesOrderingOrdering facesOrderingOrdering = new FacesOrderingOrdering();
+ context.beforeUnmarshal(facesOrderingOrdering, LifecycleCallback.NONE);
+
+ List<String> name = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-ordering-orderingType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesOrderingOrdering.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute);
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: name
+ String nameItemRaw = null;
+ if (!elementReader.isXsiNil()) {
+ nameItemRaw = elementReader.getElementAsString();
+ }
+
+ String nameItem;
+ try {
+ nameItem = Adapters.collapsedStringAdapterAdapter.unmarshal(nameItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (name == null) {
+ name = facesOrderingOrdering.name;
+ if (name != null) {
+ name.clear();
+ } else {
+ name = new ArrayList<String>();
+ }
+ }
+ name.add(nameItem);
+ } else if (("others" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: others
+ FacesOrderingOthers others = readFacesOrderingOthers(elementReader, context);
+ facesOrderingOrdering.others = others;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "name"), new QName("http://java.sun.com/xml/ns/javaee", "others"));
+ }
+ }
+ if (name != null) {
+ facesOrderingOrdering.name = name;
+ }
+
+ context.afterUnmarshal(facesOrderingOrdering, LifecycleCallback.NONE);
+
+ return facesOrderingOrdering;
+ }
+
+ public final FacesOrderingOrdering read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesOrderingOrdering facesOrderingOrdering, RuntimeContext context)
+ throws Exception {
+ if (facesOrderingOrdering == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesOrderingOrdering.class != facesOrderingOrdering.getClass()) {
+ context.unexpectedSubclass(writer, facesOrderingOrdering, FacesOrderingOrdering.class);
+ return;
+ }
+
+ context.beforeMarshal(facesOrderingOrdering, LifecycleCallback.NONE);
+
+
+ // ELEMENT: name
+ List<String> nameRaw = facesOrderingOrdering.name;
+ if (nameRaw != null) {
+ for (String nameItem : nameRaw) {
+ String name = null;
+ try {
+ name = Adapters.collapsedStringAdapterAdapter.marshal(nameItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesOrderingOrdering, "name", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ writer.writeStartElement(prefix, "name", "http://java.sun.com/xml/ns/javaee");
+ if (name != null) {
+ writer.writeCharacters(name);
+ } else {
+ writer.writeXsiNil();
+ }
+ writer.writeEndElement();
+ }
+ }
+
+ // ELEMENT: others
+ FacesOrderingOthers others = facesOrderingOrdering.others;
+ if (others != null) {
+ writer.writeStartElement(prefix, "others", "http://java.sun.com/xml/ns/javaee");
+ writeFacesOrderingOthers(writer, others, context);
+ writer.writeEndElement();
+ }
+
+ context.afterMarshal(facesOrderingOrdering, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOrdering$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOthers$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOthers%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOthers$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOthers$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,141 @@
+/*
+ * 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 FacesOrderingOthers$JAXB
+ extends JAXBObject<FacesOrderingOthers> {
+
+
+ public FacesOrderingOthers$JAXB() {
+ super(FacesOrderingOthers.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-ordering-othersType".intern()));
+ }
+
+ public static FacesOrderingOthers readFacesOrderingOthers(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesOrderingOthers(XoXMLStreamWriter writer, FacesOrderingOthers facesOrderingOthers, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesOrderingOthers, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesOrderingOthers facesOrderingOthers, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesOrderingOthers, context);
+ }
+
+ public final static FacesOrderingOthers _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesOrderingOthers facesOrderingOthers = new FacesOrderingOthers();
+ context.beforeUnmarshal(facesOrderingOthers, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-ordering-othersType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesOrderingOthers.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, facesOrderingOthers);
+ facesOrderingOthers.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()) {
+ context.unexpectedElement(elementReader);
+ }
+
+ context.afterUnmarshal(facesOrderingOthers, LifecycleCallback.NONE);
+
+ return facesOrderingOthers;
+ }
+
+ public final FacesOrderingOthers read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesOrderingOthers facesOrderingOthers, RuntimeContext context)
+ throws Exception {
+ if (facesOrderingOthers == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesOrderingOthers.class != facesOrderingOthers.getClass()) {
+ context.unexpectedSubclass(writer, facesOrderingOthers, FacesOrderingOthers.class);
+ return;
+ }
+
+ context.beforeMarshal(facesOrderingOthers, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesOrderingOthers.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesOrderingOthers, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ context.afterMarshal(facesOrderingOthers, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesOrderingOthers$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesProperty$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesProperty%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesProperty$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesProperty$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,391 @@
+/*
+ * 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.FacesPropertyExtension$JAXB.readFacesPropertyExtension;
+import static org.apache.openejb.jee.FacesPropertyExtension$JAXB.writeFacesPropertyExtension;
+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 FacesProperty$JAXB
+ extends JAXBObject<FacesProperty> {
+
+
+ public FacesProperty$JAXB() {
+ super(FacesProperty.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-propertyType".intern()), Text$JAXB.class, Icon$JAXB.class, FacesPropertyExtension$JAXB.class);
+ }
+
+ public static FacesProperty readFacesProperty(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesProperty(XoXMLStreamWriter writer, FacesProperty facesProperty, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesProperty, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesProperty facesProperty, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesProperty, context);
+ }
+
+ public final static FacesProperty _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesProperty facesProperty = new FacesProperty();
+ context.beforeUnmarshal(facesProperty, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+ ArrayList<Text> displayNames = null;
+ LocalCollection<Icon> icon = null;
+ List<FacesPropertyExtension> propertyExtension = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-propertyType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesProperty.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, facesProperty);
+ facesProperty.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 = facesProperty.icon;
+ if (icon != null) {
+ icon.clear();
+ } else {
+ icon = new LocalCollection<Icon>();
+ }
+ }
+ icon.add(iconItem);
+ } else if (("property-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: propertyName
+ String propertyNameRaw = elementReader.getElementAsString();
+
+ String propertyName;
+ try {
+ propertyName = Adapters.collapsedStringAdapterAdapter.unmarshal(propertyNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesProperty.propertyName = propertyName;
+ } else if (("property-class" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: propertyClass
+ String propertyClassRaw = elementReader.getElementAsString();
+
+ String propertyClass;
+ try {
+ propertyClass = Adapters.collapsedStringAdapterAdapter.unmarshal(propertyClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesProperty.propertyClass = propertyClass;
+ } else if (("default-value" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: defaultValue
+ String defaultValueRaw = elementReader.getElementAsString();
+
+ String defaultValue;
+ try {
+ defaultValue = Adapters.collapsedStringAdapterAdapter.unmarshal(defaultValueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesProperty.defaultValue = defaultValue;
+ } else if (("suggested-value" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: suggestedValue
+ String suggestedValueRaw = elementReader.getElementAsString();
+
+ String suggestedValue;
+ try {
+ suggestedValue = Adapters.collapsedStringAdapterAdapter.unmarshal(suggestedValueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesProperty.suggestedValue = suggestedValue;
+ } else if (("property-extension" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: propertyExtension
+ FacesPropertyExtension propertyExtensionItem = readFacesPropertyExtension(elementReader, context);
+ if (propertyExtension == null) {
+ propertyExtension = facesProperty.propertyExtension;
+ if (propertyExtension != null) {
+ propertyExtension.clear();
+ } else {
+ propertyExtension = new ArrayList<FacesPropertyExtension>();
+ }
+ }
+ propertyExtension.add(propertyExtensionItem);
+ } 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", "property-name"), new QName("http://java.sun.com/xml/ns/javaee", "property-class"), new QName("http://java.sun.com/xml/ns/javaee", "default-value"), new QName("http://java.sun.com/xml/ns/javaee", "suggested-value"), new QName("http://java.sun.com/xml/ns/javaee", "property-extension"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ facesProperty.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesProperty.class, "setDescriptions", Text[].class, e);
+ }
+ }
+ if (displayNames != null) {
+ try {
+ facesProperty.setDisplayNames(displayNames.toArray(new Text[displayNames.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesProperty.class, "setDisplayNames", Text[].class, e);
+ }
+ }
+ if (icon != null) {
+ facesProperty.icon = icon;
+ }
+ if (propertyExtension != null) {
+ facesProperty.propertyExtension = propertyExtension;
+ }
+
+ context.afterUnmarshal(facesProperty, LifecycleCallback.NONE);
+
+ return facesProperty;
+ }
+
+ public final FacesProperty read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesProperty facesProperty, RuntimeContext context)
+ throws Exception {
+ if (facesProperty == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesProperty.class != facesProperty.getClass()) {
+ context.unexpectedSubclass(writer, facesProperty, FacesProperty.class);
+ return;
+ }
+
+ context.beforeMarshal(facesProperty, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesProperty.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesProperty, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = facesProperty.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(facesProperty, "descriptions", FacesProperty.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(facesProperty, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: displayNames
+ Text[] displayNames = null;
+ try {
+ displayNames = facesProperty.getDisplayNames();
+ } catch (Exception e) {
+ context.getterError(facesProperty, "displayNames", FacesProperty.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(facesProperty, "displayNames");
+ }
+ }
+ }
+
+ // ELEMENT: icon
+ LocalCollection<Icon> icon = facesProperty.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(facesProperty, "icon");
+ }
+ }
+ }
+
+ // ELEMENT: propertyName
+ String propertyNameRaw = facesProperty.propertyName;
+ String propertyName = null;
+ try {
+ propertyName = Adapters.collapsedStringAdapterAdapter.marshal(propertyNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesProperty, "propertyName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (propertyName != null) {
+ writer.writeStartElement(prefix, "property-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(propertyName);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesProperty, "propertyName");
+ }
+
+ // ELEMENT: propertyClass
+ String propertyClassRaw = facesProperty.propertyClass;
+ String propertyClass = null;
+ try {
+ propertyClass = Adapters.collapsedStringAdapterAdapter.marshal(propertyClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesProperty, "propertyClass", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (propertyClass != null) {
+ writer.writeStartElement(prefix, "property-class", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(propertyClass);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesProperty, "propertyClass");
+ }
+
+ // ELEMENT: defaultValue
+ String defaultValueRaw = facesProperty.defaultValue;
+ String defaultValue = null;
+ try {
+ defaultValue = Adapters.collapsedStringAdapterAdapter.marshal(defaultValueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesProperty, "defaultValue", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (defaultValue != null) {
+ writer.writeStartElement(prefix, "default-value", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(defaultValue);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: suggestedValue
+ String suggestedValueRaw = facesProperty.suggestedValue;
+ String suggestedValue = null;
+ try {
+ suggestedValue = Adapters.collapsedStringAdapterAdapter.marshal(suggestedValueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesProperty, "suggestedValue", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (suggestedValue != null) {
+ writer.writeStartElement(prefix, "suggested-value", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(suggestedValue);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: propertyExtension
+ List<FacesPropertyExtension> propertyExtension = facesProperty.propertyExtension;
+ if (propertyExtension != null) {
+ for (FacesPropertyExtension propertyExtensionItem : propertyExtension) {
+ if (propertyExtensionItem != null) {
+ writer.writeStartElement(prefix, "property-extension", "http://java.sun.com/xml/ns/javaee");
+ writeFacesPropertyExtension(writer, propertyExtensionItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesProperty, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesProperty$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesPropertyExtension$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesPropertyExtension%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesPropertyExtension$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesPropertyExtension$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 FacesPropertyExtension$JAXB
+ extends JAXBObject<FacesPropertyExtension> {
+
+
+ public FacesPropertyExtension$JAXB() {
+ super(FacesPropertyExtension.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-property-extensionType".intern()));
+ }
+
+ public static FacesPropertyExtension readFacesPropertyExtension(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesPropertyExtension(XoXMLStreamWriter writer, FacesPropertyExtension facesPropertyExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesPropertyExtension, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesPropertyExtension facesPropertyExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesPropertyExtension, context);
+ }
+
+ public final static FacesPropertyExtension _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesPropertyExtension facesPropertyExtension = new FacesPropertyExtension();
+ context.beforeUnmarshal(facesPropertyExtension, LifecycleCallback.NONE);
+
+ List<Object> any = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-property-extensionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesPropertyExtension.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, facesPropertyExtension);
+ facesPropertyExtension.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 = facesPropertyExtension.any;
+ if (any != null) {
+ any.clear();
+ } else {
+ any = new ArrayList<Object>();
+ }
+ }
+ any.add(context.readXmlAny(elementReader, Object.class, true));
+ }
+ if (any != null) {
+ facesPropertyExtension.any = any;
+ }
+
+ context.afterUnmarshal(facesPropertyExtension, LifecycleCallback.NONE);
+
+ return facesPropertyExtension;
+ }
+
+ public final FacesPropertyExtension read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesPropertyExtension facesPropertyExtension, RuntimeContext context)
+ throws Exception {
+ if (facesPropertyExtension == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesPropertyExtension.class != facesPropertyExtension.getClass()) {
+ context.unexpectedSubclass(writer, facesPropertyExtension, FacesPropertyExtension.class);
+ return;
+ }
+
+ context.beforeMarshal(facesPropertyExtension, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesPropertyExtension.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesPropertyExtension, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT_REF: any
+ List<Object> any = facesPropertyExtension.any;
+ if (any != null) {
+ for (Object anyItem : any) {
+ context.writeXmlAny(writer, facesPropertyExtension, "any", anyItem);
+ }
+ }
+
+ context.afterMarshal(facesPropertyExtension, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesPropertyExtension$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirect$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirect%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirect$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirect$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,186 @@
+/*
+ * 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.FacesRedirectViewParam$JAXB.readFacesRedirectViewParam;
+import static org.apache.openejb.jee.FacesRedirectViewParam$JAXB.writeFacesRedirectViewParam;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesRedirect$JAXB
+ extends JAXBObject<FacesRedirect> {
+
+
+ public FacesRedirect$JAXB() {
+ super(FacesRedirect.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-redirectType".intern()), FacesRedirectViewParam$JAXB.class);
+ }
+
+ public static FacesRedirect readFacesRedirect(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesRedirect(XoXMLStreamWriter writer, FacesRedirect facesRedirect, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesRedirect, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesRedirect facesRedirect, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesRedirect, context);
+ }
+
+ public final static FacesRedirect _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesRedirect facesRedirect = new FacesRedirect();
+ context.beforeUnmarshal(facesRedirect, LifecycleCallback.NONE);
+
+ List<FacesRedirectViewParam> viewParam = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-redirectType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesRedirect.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, facesRedirect);
+ facesRedirect.id = id;
+ } else if (("include-view-params" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: includeViewParams
+ Boolean includeViewParams = ("1".equals(attribute.getValue()) || "true".equals(attribute.getValue()));
+ facesRedirect.includeViewParams = includeViewParams;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"), new QName("", "include-view-params"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("view-param" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: viewParam
+ FacesRedirectViewParam viewParamItem = readFacesRedirectViewParam(elementReader, context);
+ if (viewParam == null) {
+ viewParam = facesRedirect.viewParam;
+ if (viewParam != null) {
+ viewParam.clear();
+ } else {
+ viewParam = new ArrayList<FacesRedirectViewParam>();
+ }
+ }
+ viewParam.add(viewParamItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "view-param"));
+ }
+ }
+ if (viewParam != null) {
+ facesRedirect.viewParam = viewParam;
+ }
+
+ context.afterUnmarshal(facesRedirect, LifecycleCallback.NONE);
+
+ return facesRedirect;
+ }
+
+ public final FacesRedirect read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesRedirect facesRedirect, RuntimeContext context)
+ throws Exception {
+ if (facesRedirect == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesRedirect.class != facesRedirect.getClass()) {
+ context.unexpectedSubclass(writer, facesRedirect, FacesRedirect.class);
+ return;
+ }
+
+ context.beforeMarshal(facesRedirect, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesRedirect.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesRedirect, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ATTRIBUTE: includeViewParams
+ Boolean includeViewParams = facesRedirect.includeViewParams;
+ if (includeViewParams != null) {
+ writer.writeAttribute("", "", "include-view-params", Boolean.toString(includeViewParams));
+ }
+
+ // ELEMENT: viewParam
+ List<FacesRedirectViewParam> viewParam = facesRedirect.viewParam;
+ if (viewParam != null) {
+ for (FacesRedirectViewParam viewParamItem : viewParam) {
+ if (viewParamItem != null) {
+ writer.writeStartElementWithAutoPrefix("http://java.sun.com/xml/ns/javaee", "view-param");
+ writeFacesRedirectViewParam(writer, viewParamItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesRedirect, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirect$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirectViewParam$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirectViewParam%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirectViewParam$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirectViewParam$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,202 @@
+/*
+ * 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 FacesRedirectViewParam$JAXB
+ extends JAXBObject<FacesRedirectViewParam> {
+
+
+ public FacesRedirectViewParam$JAXB() {
+ super(FacesRedirectViewParam.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-redirect-viewParamType".intern()));
+ }
+
+ public static FacesRedirectViewParam readFacesRedirectViewParam(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesRedirectViewParam(XoXMLStreamWriter writer, FacesRedirectViewParam facesRedirectViewParam, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesRedirectViewParam, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesRedirectViewParam facesRedirectViewParam, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesRedirectViewParam, context);
+ }
+
+ public final static FacesRedirectViewParam _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesRedirectViewParam facesRedirectViewParam = new FacesRedirectViewParam();
+ context.beforeUnmarshal(facesRedirectViewParam, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-redirect-viewParamType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesRedirectViewParam.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, facesRedirectViewParam);
+ facesRedirectViewParam.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 (("name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: name
+ String nameRaw = elementReader.getElementAsString();
+
+ String name;
+ try {
+ name = Adapters.collapsedStringAdapterAdapter.unmarshal(nameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesRedirectViewParam.name = name;
+ } else if (("value" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: value
+ String valueRaw = elementReader.getElementAsString();
+
+ String value;
+ try {
+ value = Adapters.collapsedStringAdapterAdapter.unmarshal(valueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesRedirectViewParam.value = value;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "name"), new QName("http://java.sun.com/xml/ns/javaee", "value"));
+ }
+ }
+
+ context.afterUnmarshal(facesRedirectViewParam, LifecycleCallback.NONE);
+
+ return facesRedirectViewParam;
+ }
+
+ public final FacesRedirectViewParam read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesRedirectViewParam facesRedirectViewParam, RuntimeContext context)
+ throws Exception {
+ if (facesRedirectViewParam == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesRedirectViewParam.class != facesRedirectViewParam.getClass()) {
+ context.unexpectedSubclass(writer, facesRedirectViewParam, FacesRedirectViewParam.class);
+ return;
+ }
+
+ context.beforeMarshal(facesRedirectViewParam, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesRedirectViewParam.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesRedirectViewParam, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: name
+ String nameRaw = facesRedirectViewParam.name;
+ String name = null;
+ try {
+ name = Adapters.collapsedStringAdapterAdapter.marshal(nameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesRedirectViewParam, "name", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (name != null) {
+ writer.writeStartElement(prefix, "name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(name);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesRedirectViewParam, "name");
+ }
+
+ // ELEMENT: value
+ String valueRaw = facesRedirectViewParam.value;
+ String value = null;
+ try {
+ value = Adapters.collapsedStringAdapterAdapter.marshal(valueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesRedirectViewParam, "value", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (value != null) {
+ writer.writeStartElement(prefix, "value", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(value);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesRedirectViewParam, "value");
+ }
+
+ context.afterMarshal(facesRedirectViewParam, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesRedirectViewParam$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesReferencedBean$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesReferencedBean%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesReferencedBean$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesReferencedBean$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,306 @@
+/*
+ * 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.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 FacesReferencedBean$JAXB
+ extends JAXBObject<FacesReferencedBean> {
+
+
+ public FacesReferencedBean$JAXB() {
+ super(FacesReferencedBean.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-referenced-beanType".intern()), Text$JAXB.class, Icon$JAXB.class);
+ }
+
+ public static FacesReferencedBean readFacesReferencedBean(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesReferencedBean(XoXMLStreamWriter writer, FacesReferencedBean facesReferencedBean, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesReferencedBean, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesReferencedBean facesReferencedBean, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesReferencedBean, context);
+ }
+
+ public final static FacesReferencedBean _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesReferencedBean facesReferencedBean = new FacesReferencedBean();
+ context.beforeUnmarshal(facesReferencedBean, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+ ArrayList<Text> displayNames = null;
+ LocalCollection<Icon> icon = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-referenced-beanType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesReferencedBean.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, facesReferencedBean);
+ facesReferencedBean.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 = facesReferencedBean.icon;
+ if (icon != null) {
+ icon.clear();
+ } else {
+ icon = new LocalCollection<Icon>();
+ }
+ }
+ icon.add(iconItem);
+ } else if (("referenced-bean-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: referencedBeanName
+ String referencedBeanNameRaw = elementReader.getElementAsString();
+
+ String referencedBeanName;
+ try {
+ referencedBeanName = Adapters.collapsedStringAdapterAdapter.unmarshal(referencedBeanNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesReferencedBean.referencedBeanName = referencedBeanName;
+ } else if (("referenced-bean-class" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: referencedBeanClass
+ String referencedBeanClassRaw = elementReader.getElementAsString();
+
+ String referencedBeanClass;
+ try {
+ referencedBeanClass = Adapters.collapsedStringAdapterAdapter.unmarshal(referencedBeanClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesReferencedBean.referencedBeanClass = referencedBeanClass;
+ } 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", "referenced-bean-name"), new QName("http://java.sun.com/xml/ns/javaee", "referenced-bean-class"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ facesReferencedBean.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesReferencedBean.class, "setDescriptions", Text[].class, e);
+ }
+ }
+ if (displayNames != null) {
+ try {
+ facesReferencedBean.setDisplayNames(displayNames.toArray(new Text[displayNames.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesReferencedBean.class, "setDisplayNames", Text[].class, e);
+ }
+ }
+ if (icon != null) {
+ facesReferencedBean.icon = icon;
+ }
+
+ context.afterUnmarshal(facesReferencedBean, LifecycleCallback.NONE);
+
+ return facesReferencedBean;
+ }
+
+ public final FacesReferencedBean read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesReferencedBean facesReferencedBean, RuntimeContext context)
+ throws Exception {
+ if (facesReferencedBean == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesReferencedBean.class != facesReferencedBean.getClass()) {
+ context.unexpectedSubclass(writer, facesReferencedBean, FacesReferencedBean.class);
+ return;
+ }
+
+ context.beforeMarshal(facesReferencedBean, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesReferencedBean.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesReferencedBean, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = facesReferencedBean.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(facesReferencedBean, "descriptions", FacesReferencedBean.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(facesReferencedBean, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: displayNames
+ Text[] displayNames = null;
+ try {
+ displayNames = facesReferencedBean.getDisplayNames();
+ } catch (Exception e) {
+ context.getterError(facesReferencedBean, "displayNames", FacesReferencedBean.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(facesReferencedBean, "displayNames");
+ }
+ }
+ }
+
+ // ELEMENT: icon
+ LocalCollection<Icon> icon = facesReferencedBean.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(facesReferencedBean, "icon");
+ }
+ }
+ }
+
+ // ELEMENT: referencedBeanName
+ String referencedBeanNameRaw = facesReferencedBean.referencedBeanName;
+ String referencedBeanName = null;
+ try {
+ referencedBeanName = Adapters.collapsedStringAdapterAdapter.marshal(referencedBeanNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesReferencedBean, "referencedBeanName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (referencedBeanName != null) {
+ writer.writeStartElement(prefix, "referenced-bean-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(referencedBeanName);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesReferencedBean, "referencedBeanName");
+ }
+
+ // ELEMENT: referencedBeanClass
+ String referencedBeanClassRaw = facesReferencedBean.referencedBeanClass;
+ String referencedBeanClass = null;
+ try {
+ referencedBeanClass = Adapters.collapsedStringAdapterAdapter.marshal(referencedBeanClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesReferencedBean, "referencedBeanClass", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (referencedBeanClass != null) {
+ writer.writeStartElement(prefix, "referenced-bean-class", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(referencedBeanClass);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesReferencedBean, "referencedBeanClass");
+ }
+
+ context.afterMarshal(facesReferencedBean, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesReferencedBean$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native