Examples of XPathQName


Examples of org.eclipse.persistence.internal.oxm.XPathQName

                Class newElementClass = aDescriptor.getInheritancePolicy().classFromRow(nestedRow, executionSession);
                if (newElementClass == null) {
                    // no xsi:type attribute - look for type indicator on the field
                    QName leafElementType = ((XMLField) getField()).getLeafElementType();
                    if (leafElementType != null) {                     
                      XPathQName leafElementXPathQName = new XPathQName(leafElementType, ((XMLRecord) nestedRow).isNamespaceAware());
                        Object indicator = aDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementXPathQName);
                        if(indicator != null) {
                            newElementClass = (Class) indicator;
                        }
                    }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

                Class classValue = aDescriptor.getInheritancePolicy().classFromRow(nestedRow, executionSession);
                if (classValue == null) {
                    // no xsi:type attribute - look for type indicator on the field
                    QName leafElementType = ((XMLField) getField()).getLeafElementType();
                    if (leafElementType != null) {
                      XPathQName leafElementXPathQName = new XPathQName(leafElementType, ((XMLRecord) nestedRow).isNamespaceAware());
                      Object indicator = aDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementXPathQName);
                        if(indicator != null) {
                            classValue = (Class) indicator;
                        }
                    }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

        return object;

    }
   
    private void setDeclaredTypeOnXMLRoot(XMLRoot xmlRoot, String elementNamespaceUri, String elementLocalName, boolean isNamespaceAware, XMLUnmarshaller unmarshaller){
      XPathQName xpathQName = new XPathQName(elementNamespaceUri, elementLocalName, isNamespaceAware);
      XMLDescriptor desc = unmarshaller.getXMLContext().getDescriptor(xpathQName);
      if(desc != null){
        xmlRoot.setDeclaredType(desc.getJavaClass());
      }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

    /**
     * INTERNAL: Return the XMLDescriptor with the default root mapping matching
     * the QName parameter.
     */
    public XMLDescriptor getDescriptor(QName qName) {
      XPathQName xpathQName = new XPathQName(qName, true);
      return xmlContextState.getDescriptor(xpathQName);
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

                storeXMLDescriptorsByQName((DatabaseSession) sessions.get(x));
            }
        }

        private void addDescriptorByQName(QName qName, XMLDescriptor descriptor) {
          XPathQName xpathQName = new XPathQName(qName, true);
          addDescriptorByQName(xpathQName, descriptor);
        }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

        /**
         * INTERNAL: Return the XMLDescriptor with the default root mapping matching
         * the QName parameter.
         */
        private XMLDescriptor getDescriptor(QName qName) {
          XPathQName xpathQName = new XPathQName(qName, true);
          return (XMLDescriptor) descriptorsByQName.get(xpathQName);
        }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

        /**
         * INTERNAL:
         */
        private void storeXMLDescriptorByQName(XMLDescriptor xmlDescriptor, Platform platform) {
            XPathQName descriptorQName;
            String defaultRootName;

            List tableNames = xmlDescriptor.getTableNames();
            for (int i = 0; i < tableNames.size(); i++) {
                defaultRootName = (String) tableNames.get(i);

                if (null != defaultRootName) {
                    int index = defaultRootName.indexOf(':');
                    String defaultRootLocalName = defaultRootName.substring(index + 1);
                    if(defaultRootLocalName != null && !(defaultRootLocalName.equals(XMLConstants.EMPTY_STRING))){
                        if (index > -1) {
                            String defaultRootPrefix = defaultRootName.substring(0, index);
                            String defaultRootNamespaceURI = xmlDescriptor.getNamespaceResolver().resolveNamespacePrefix(defaultRootPrefix);
                            descriptorQName = new XPathQName(defaultRootNamespaceURI, defaultRootLocalName, true);
                        } else {
                            if(xmlDescriptor.getNamespaceResolver() != null) {
                                descriptorQName = new XPathQName(xmlDescriptor.getNamespaceResolver().getDefaultNamespaceURI(), defaultRootLocalName, true);
                            } else {
                                descriptorQName = new XPathQName(defaultRootLocalName, true);
                            }
                        }
                        if (!xmlDescriptor.hasInheritance() || xmlDescriptor.getInheritancePolicy().isRootParentDescriptor()) {
                          addDescriptorByQName(descriptorQName, xmlDescriptor);
                        } else {
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

                Class newElementClass = aDescriptor.getInheritancePolicy().classFromRow(nestedRow, executionSession);
                if (newElementClass == null) {
                    // no xsi:type attribute - look for type indicator on the field
                    QName leafElementType = ((XMLField) getField()).getLeafElementType();
                    if (leafElementType != null) {                     
                      XPathQName leafElementXPathQName = new XPathQName(leafElementType, ((XMLRecord) nestedRow).isNamespaceAware());
                        Object indicator = aDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementXPathQName);
                        if(indicator != null) {
                            newElementClass = (Class) indicator;
                        }
                    }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

    /**
     * INTERNAL:
     */
    public void setLeafElementType(QName type) {
      if(type != null){
          setLeafElementType(new XPathQName(type, isNamespaceAware()));
      }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.XPathQName

             // no xsi:type attribute - look for type indicator on the default root element
             QName leafElementType = xmlDescriptor.getDefaultRootElementType();

             // if we have a user-set type, try to get the class from the inheritance policy
             if (leafElementType != null) {
                  XPathQName xpathQName = new XPathQName(leafElementType, isNamespaceAware());
                 Object indicator = inheritancePolicy.getClassIndicatorMapping().get(xpathQName);
                 if(indicator != null) {
                     classValue = (Class)indicator;
                 }
             }
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.