Examples of XMLAttachmentUnmarshaller


Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

    @Override
    public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
        if(XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
            //Get the attachment and set it in the object.
            XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();
            Object data = null;
            Class attributeClassification = null;
            if(isCollection) {
                attributeClassification = ((XMLBinaryDataCollectionMapping)mapping).getCollectionContentType();
            } else {
                attributeClassification = mapping.getAttributeClassification();
            }
            if(attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {
                data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);
            } else {
                data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
            }
            if (this.converter != null) {
                Converter converter = this.converter;
                if (converter instanceof XMLConverter) {
                    data = ((XMLConverter) converter).convertDataValueToObjectValue(data, record.getSession(), record.getUnmarshaller());
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

    @Override
    public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
        if(XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
            //Get the attachment and set it in the object.
            XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();
            Object data = null;
            Class attributeClassification = null;
            if(isCollection) {
                attributeClassification = ((XMLBinaryDataCollectionMapping)mapping).getCollectionContentType();
            } else {
                attributeClassification = mapping.getAttributeClassification();
            }
            if(attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {
                data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);
            } else {
                data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
            }
            if (this.converter != null) {
                Converter converter = this.converter;
                if (converter instanceof XMLConverter) {
                    data = ((XMLConverter) converter).convertDataValueToObjectValue(data, record.getSession(), record.getUnmarshaller());
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

        XMLRoot xmlRoot = null;
        try {
            XMLContext xmlContext = dbwsAdapter.getXMLContext();
            XMLUnmarshaller unmarshaller = xmlContext.createUnmarshaller();
            if (attachments != null && attachments.size() > 0) {
                unmarshaller.setAttachmentUnmarshaller(new XMLAttachmentUnmarshaller() {
                    Map<String,DataHandler> attachments;
                    public XMLAttachmentUnmarshaller setAttachments(Map<String, DataHandler> attachments) {
                        this.attachments = attachments;
                        return this;
                    }
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

          if(INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName)) {
            if(record.isNamespaceAware() && !XMLConstants.XOP_URL.equals(namespaceURI)){
              return;
            }
                //Get the attachment and set it in the object.
                XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();
                Object data = null;
                Class attributeClassification = null;
                if(isCollection) {
                  attributeClassification = ((XMLBinaryDataCollectionMapping)mapping).getAttributeElementClass();
                } else {
                    attributeClassification = mapping.getAttributeClassification();
                }
                if(attachmentUnmarshaller == null) {
                    //if there's no attachment unmarshaller, it isn't possible to retrieve
                    //the attachment. Throw an exception.
                    throw XMLMarshalException.noAttachmentUnmarshallerSet(this.c_id);
                }
                if(attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {
                    data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);
                } else {
                    data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
                }
                data = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(data, mapping.getAttributeClassification(), record.getSession());
                if (this.converter != null) {
                    Converter converter = this.converter;
                    if (converter instanceof XMLConverter) {
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

        XMLRoot xmlRoot = null;
        try {
            XMLContext xmlContext = dbwsAdapter.getXMLContext();
            XMLUnmarshaller unmarshaller = xmlContext.createUnmarshaller();
            if (attachments != null && attachments.size() > 0) {
                unmarshaller.setAttachmentUnmarshaller(new XMLAttachmentUnmarshaller() {
                    Map<String,DataHandler> attachments;
                    public XMLAttachmentUnmarshaller setAttachments(Map<String, DataHandler> attachments) {
                        this.attachments = attachments;
                        return this;
                    }
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

        } else {
            xmlField = (XMLField)((XMLBinaryDataMapping)mapping).getField();
        }
        if(XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
            //Get the attachment and set it in the object.
            XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();
            Object data = null;
            Class attributeClassification = null;
            if(isCollection) {
                attributeClassification = ((XMLBinaryDataCollectionMapping)mapping).getCollectionContentType();
            } else {
                attributeClassification = mapping.getAttributeClassification();
            }
            if(attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {
                data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);
            } else {
                data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
            }
            if (this.converter != null) {
                Converter converter = this.converter;
                if (converter instanceof XMLConverter) {
                    data = ((XMLConverter) converter).convertDataValueToObjectValue(data, record.getSession(), record.getUnmarshaller());
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

        } else {
            xmlField = (XMLField)((XMLBinaryDataMapping)mapping).getField();
        }
        if(XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
            //Get the attachment and set it in the object.
            XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();
            Object data = null;
            Class attributeClassification = null;
            if(isCollection) {
              attributeClassification = ((XMLBinaryDataCollectionMapping)mapping).getAttributeElementClass();
            } else {
                attributeClassification = mapping.getAttributeClassification();
            }
            if(attachmentUnmarshaller == null) {
                //if there's no attachment unmarshaller, it isn't possible to retrieve
                //the attachment. Throw an exception.
                throw XMLMarshalException.noAttachmentUnmarshallerSet(this.c_id);
            }
            if(attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {
                data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);
            } else {
                data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
            }
            data = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(data, mapping.getAttributeClassification(), record.getSession());
            if (this.converter != null) {
                Converter converter = this.converter;
                if (converter instanceof XMLConverter) {
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

        } else {
            xmlField = (XMLField)((XMLBinaryDataMapping)mapping).getField();
        }
        if(XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
            //Get the attachment and set it in the object.
            XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();
            Object data = null;
            Class attributeClassification = null;
            if(isCollection) {
              attributeClassification = ((XMLBinaryDataCollectionMapping)mapping).getAttributeElementClass();
            } else {
                attributeClassification = mapping.getAttributeClassification();
            }
            if(attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {
                data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);
            } else {
                data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
            }
            if (this.converter != null) {
                Converter converter = this.converter;
                if (converter instanceof XMLConverter) {
                    data = ((XMLConverter) converter).convertDataValueToObjectValue(data, record.getSession(), record.getUnmarshaller());
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

        XMLRoot xmlRoot = null;
        try {
            XMLContext xmlContext = dbwsAdapter.getXMLContext();
            XMLUnmarshaller unmarshaller = xmlContext.createUnmarshaller();
            if (attachments != null && attachments.size() > 0) {
                unmarshaller.setAttachmentUnmarshaller(new XMLAttachmentUnmarshaller() {
                    Map<String,DataHandler> attachments;
                    public XMLAttachmentUnmarshaller setAttachments(Map<String, DataHandler> attachments) {
                        this.attachments = attachments;
                        return this;
                    }
View Full Code Here

Examples of org.eclipse.persistence.oxm.attachment.XMLAttachmentUnmarshaller

        XMLRoot xmlRoot = null;
        try {
            XMLContext xmlContext = dbwsAdapter.getXMLContext();
            XMLUnmarshaller unmarshaller = xmlContext.createUnmarshaller();
            if (attachments != null && attachments.size() > 0) {
                unmarshaller.setAttachmentUnmarshaller(new XMLAttachmentUnmarshaller() {
                    Map<String,DataHandler> attachments;
                    public XMLAttachmentUnmarshaller setAttachments(Map<String, DataHandler> attachments) {
                        this.attachments = attachments;
                        return this;
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.