Search in sources :

Example 1 with OrderingOthers$JAXB.writeOrderingOthers

use of org.apache.openejb.jee.OrderingOthers$JAXB.writeOrderingOthers in project tomee by apache.

the class AbsoluteOrdering$JAXB method _write.

public static final void _write(final XoXMLStreamWriter writer, final AbsoluteOrdering absoluteOrdering, RuntimeContext context) throws Exception {
    if (absoluteOrdering == null) {
        writer.writeXsiNil();
        return;
    }
    if (context == null) {
        context = new RuntimeContext();
    }
    final java.lang.String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
    if (AbsoluteOrdering.class != absoluteOrdering.getClass()) {
        context.unexpectedSubclass(writer, absoluteOrdering, AbsoluteOrdering.class);
        return;
    }
    context.beforeMarshal(absoluteOrdering, LifecycleCallback.NONE);
    // ELEMENT: nameOrOthers
    final List<Object> nameOrOthers = absoluteOrdering.nameOrOthers;
    if (nameOrOthers != null) {
        for (final Object nameOrOthersItem : nameOrOthers) {
            if (nameOrOthersItem instanceof org.apache.openejb.jee.OrderingOthers) {
                final org.apache.openejb.jee.OrderingOthers OrderingOthers = ((org.apache.openejb.jee.OrderingOthers) nameOrOthersItem);
                writer.writeStartElement(prefix, "others", "http://java.sun.com/xml/ns/javaee");
                writeOrderingOthers(writer, OrderingOthers, context);
                writer.writeEndElement();
            } else if (nameOrOthersItem instanceof java.lang.String) {
                final java.lang.String String = ((java.lang.String) nameOrOthersItem);
                writer.writeStartElement(prefix, "name", "http://java.sun.com/xml/ns/javaee");
                writer.writeCharacters(String);
                writer.writeEndElement();
            } else if (nameOrOthersItem == null) {
                context.unexpectedNullValue(absoluteOrdering, "nameOrOthers");
            } else {
                context.unexpectedElementType(writer, absoluteOrdering, "nameOrOthers", nameOrOthersItem, org.apache.openejb.jee.OrderingOthers.class, java.lang.String.class);
            }
        }
    }
    context.afterMarshal(absoluteOrdering, LifecycleCallback.NONE);
}
Also used : OrderingOthers$JAXB.writeOrderingOthers(org.apache.openejb.jee.OrderingOthers$JAXB.writeOrderingOthers) OrderingOthers$JAXB.readOrderingOthers(org.apache.openejb.jee.OrderingOthers$JAXB.readOrderingOthers) JAXBObject(org.metatype.sxc.jaxb.JAXBObject) RuntimeContext(org.metatype.sxc.jaxb.RuntimeContext)

Aggregations

OrderingOthers$JAXB.readOrderingOthers (org.apache.openejb.jee.OrderingOthers$JAXB.readOrderingOthers)1 OrderingOthers$JAXB.writeOrderingOthers (org.apache.openejb.jee.OrderingOthers$JAXB.writeOrderingOthers)1 JAXBObject (org.metatype.sxc.jaxb.JAXBObject)1 RuntimeContext (org.metatype.sxc.jaxb.RuntimeContext)1