Package org.eclipse.persistence.oxm.record

Examples of org.eclipse.persistence.oxm.record.XMLStreamWriterRecord


            throw new IllegalArgumentException();
        }
        object = modifyObjectIfNeeded(object);
       
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }


            throw new IllegalArgumentException();
        }
        object = modifyObjectIfNeeded(object);
       
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

            object = createXMLRootFromJAXBElement((JAXBElement) object);
        } else if(object != null && object.getClass().isEnum()) {
            object = wrapEnumeration(object, object.getClass());
        }
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

    if (object instanceof JAXBElement) {
      // use the JAXBElement's properties to populate an XMLRoot
      object = createXMLRootFromJAXBElement((JAXBElement) object);
    }
      try {
          XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
          record.setMarshaller(this.xmlMarshaller);
          this.xmlMarshaller.marshal(object, record);
      } catch (Exception ex) {
          throw new MarshalException(ex);
      }
  }

            }
        }

        Object oxmObject = modifyObjectIfNeeded(object);
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(oxmObject, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }

        if (object instanceof JAXBElement) {
            // use the JAXBElement's properties to populate an XMLRoot
            object = createXMLRootFromJAXBElement((JAXBElement) object);
        }
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

            throw new IllegalArgumentException();
        }
        object = modifyObjectIfNeeded(object);
       
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

        if (object instanceof JAXBElement) {
            // use the JAXBElement's properties to populate an XMLRoot
            object = createXMLRootFromJAXBElement((JAXBElement) object);
        }
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

    if (object instanceof JAXBElement) {
      // use the JAXBElement's properties to populate an XMLRoot
      object = createXMLRootFromJAXBElement((JAXBElement) object);
    }
      try {
          XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
          record.setMarshaller(this.xmlMarshaller);
          this.xmlMarshaller.marshal(object, record);
      } catch (Exception ex) {
          throw new MarshalException(ex);
      }
  }

            throw new IllegalArgumentException();
        }
        object = modifyObjectIfNeeded(object);
       
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

TOP

Related Classes of org.eclipse.persistence.oxm.record.XMLStreamWriterRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.