Examples of wrapObjectInXMLRoot()


Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

        xmlUnmarshaller.resolveReferences(session);

        if (isPrimitiveWrapper) {
            return unmarshalRecord.getCurrentObject();
        }
        return xmlDescriptor.wrapObjectInXMLRoot(unmarshalRecord, this.isResultAlwaysXMLRoot);
    }

    public Object unmarshal(Reader reader) {
        if (xmlUnmarshaller.getXMLContext().hasDocumentPreservation()) {
            Node domElement = xmlParser.parse(reader).getDocumentElement();
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

        xmlUnmarshaller.resolveReferences(session);

        if (isPrimitiveWrapper) {
            return unmarshalRecord.getCurrentObject();
        }
        return xmlDescriptor.wrapObjectInXMLRoot(unmarshalRecord, this.isResultAlwaysXMLRoot);
    }

    private EclipseLinkException convertSAXException(SAXException saxException) {
        Exception internalException = saxException.getException();
        if (internalException != null) {
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

                //if lexical handling is not supported by this parser, just ignore.
            }

            // if we located the descriptor via xsi:type attribute, create and
            // return an XMLRoot object
            object = xmlDescriptor.wrapObjectInXMLRoot(unmarshalRecord, unmarshaller.isResultAlwaysXMLRoot());
        } catch (EclipseLinkException e) {
            if (null == xmlReader.getErrorHandler()) {
                throw e;
            } else {
                SAXParseException saxParseException = new SAXParseException(null, null, null, 0, 0, e);
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

                if (workingDescriptor != null) {
                    String prefix = xPathFragment.getPrefix();
                    if ((prefix == null) && (xPathFragment.getNamespaceURI() != null)) {
                        prefix = unmarshalRecord.resolveNamespaceUri(xPathFragment.getNamespaceURI());
                    }
                    childObject = workingDescriptor.wrapObjectInXMLRoot(childObject, xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), prefix, false, unmarshalRecord.isNamespaceAware(), unmarshalRecord.getUnmarshaller());
                    workingDescriptor = null;
                }
            }
            if(xmlAnyObjectMapping.getConverter() != null) {
                childObject = xmlAnyObjectMapping.getConverter().convertDataValueToObjectValue(childObject, unmarshalRecord.getSession(), unmarshalRecord.getUnmarshaller());
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

        unmarshalRecord.resolveReferences(session, xmlUnmarshaller.getIDResolver());

        if (isPrimitiveWrapper) {
            return unmarshalRecord.getCurrentObject();
        }
        return xmlDescriptor.wrapObjectInXMLRoot(unmarshalRecord, this.isResultAlwaysXMLRoot);
    }

    public Object unmarshal(Node node) {
        DOMReader reader = new DOMReader(xmlUnmarshaller);
        return unmarshal(reader, node);
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

        unmarshalRecord.resolveReferences(session, xmlUnmarshaller.getIDResolver());

        if (isPrimitiveWrapper) {
            return unmarshalRecord.getCurrentObject();
        }
        return xmlDescriptor.wrapObjectInXMLRoot(unmarshalRecord, this.isResultAlwaysXMLRoot);
    }

    private Object createXMLRootForNode(Node node) {
      XMLRoot xmlRoot = new XMLRoot();
      xmlRoot.setObject(node);
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

       

        if (isPrimitiveWrapper) {
            return unmarshalRecord.getCurrentObject();
        }
        return xmlDescriptor.wrapObjectInXMLRoot(unmarshalRecord, this.isResultAlwaysXMLRoot);
    }

    public Object unmarshal(org.xml.sax.XMLReader xmlReader, InputSource inputSource) {
        try {
            XMLContext xmlContext = xmlUnmarshaller.getXMLContext();
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

            unmarshalRecord.resolveReferences(session, xmlUnmarshaller.getIDResolver());

            if (isPrimitiveWrapper || clazz == ClassConstants.OBJECT) {
                return unmarshalRecord.getCurrentObject();
            }
            return xmlDescriptor.wrapObjectInXMLRoot(unmarshalRecord, this.isResultAlwaysXMLRoot);
        } catch (IOException e) {
            throw XMLMarshalException.unmarshalException(e);
        } catch (SAXException e) {
            throw convertSAXException(e);
        } finally {
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

                if (workingDescriptor != null) {
                    String prefix = xPathFragment.getPrefix();
                    if ((prefix == null) && (xPathFragment.getNamespaceURI() != null)) {
                        prefix = unmarshalRecord.resolveNamespaceUri(xPathFragment.getNamespaceURI());
                    }
                    childObject = workingDescriptor.wrapObjectInXMLRoot(childObject, xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), prefix, false, unmarshalRecord.isNamespaceAware(), unmarshalRecord.getUnmarshaller());
                    if(xmlAnyCollectionMapping.getConverter() != null) {
                        childObject = xmlAnyCollectionMapping.getConverter().convertDataValueToObjectValue(childObject, unmarshalRecord.getSession(), unmarshalRecord.getUnmarshaller());
                    }
                    unmarshalRecord.addAttributeValue(this, childObject);
                }
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLDescriptor.wrapObjectInXMLRoot()

          String elementLocalName = xmlRow.getDOM().getLocalName();
          if (elementLocalName == null) {
              elementLocalName = xmlRow.getDOM().getNodeName();
          }
          String elementPrefix = xmlRow.getDOM().getPrefix();
          return descriptor.wrapObjectInXMLRoot(object, elementNamespaceUri, elementLocalName, elementPrefix, xmlEncoding, xmlVersion, this.isResultAlwaysXMLRoot, true, xmlUnmarshaller);
      }finally{       
            xmlUnmarshaller.getStringBuffer().reset();          
      }
    }
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.