Package org.eclipse.persistence.oxm

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


                    mapping.setXPath(DEFAULT_SIMPLE_XML_FORMAT_TAG + "/" +
                        DEFAULT_SIMPLE_XML_TAG + "/attachment");
                    mapping.setSwaRef(true);
                    mapping.setShouldInlineBinaryData(false);
                    mapping.setMimeType(attachment.getMimeType());
                    descriptor.addMapping(mapping);
                    NamespaceResolver nr = new NamespaceResolver();
                    descriptor.setNamespaceResolver(nr);
                    oxSession.getProject().addDescriptor(descriptor);
                    ((DatabaseSessionImpl)oxSession)
                        .initializeDescriptorIfSessionAlive(descriptor);
View Full Code Here


            descriptor.setAlias("ValueObject");
            descriptor.setJavaClass(ValueObject.class);
            XMLDirectMapping mapping = new XMLDirectMapping();
            mapping.setAttributeName("value");
            mapping.setXPath("value");
            descriptor.addMapping(mapping);
            NamespaceResolver nr = new NamespaceResolver();
            descriptor.setNamespaceResolver(nr);
            oxSession.getProject().addDescriptor(descriptor);
            ((DatabaseSessionImpl)oxSession)
                .initializeDescriptorIfSessionAlive(descriptor);
View Full Code Here

                simpleXMLFormatDescriptor.setAlias(DEFAULT_SIMPLE_XML_FORMAT_TAG);
                simpleXMLFormatDescriptor.setDefaultRootElement(DEFAULT_SIMPLE_XML_FORMAT_TAG);
                XMLFragmentCollectionMapping xmlTag = new XMLFragmentCollectionMapping();
                xmlTag.setAttributeName("simpleXML");
                xmlTag.setXPath(DEFAULT_SIMPLE_XML_TAG);
                simpleXMLFormatDescriptor.addMapping(xmlTag);
                NamespaceResolver nr = new NamespaceResolver();
                simpleXMLFormatDescriptor.setNamespaceResolver(nr);
                XMLSchemaURLReference schemaReference = new XMLSchemaURLReference("");
                schemaReference.setSchemaContext("/any");
                schemaReference.setType(XMLSchemaReference.COMPLEX_TYPE);
View Full Code Here

                if (queryOperation.isSimpleXMLFormat()) {
                    XMLAnyObjectMapping mapping = new XMLAnyObjectMapping();
                    mapping.setUseXMLRoot(true);
                    mapping.setAttributeName("result");
                    mapping.setXPath(SERVICE_NAMESPACE_PREFIX + ":" + "result");
                    descriptor.addMapping(mapping);
                    mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
                }
                else if (queryOperation.isAttachment()) {
                    Attachment attachment = queryOperation.getResult().getAttachment();
                    XMLBinaryDataMapping mapping = new XMLBinaryDataMapping();
View Full Code Here

                    mapping.setAttributeName("result");
                    mapping.setXPath(SERVICE_NAMESPACE_PREFIX + ":" + "result");
                    mapping.setSwaRef(true);
                    mapping.setShouldInlineBinaryData(false);
                    mapping.setMimeType(attachment.getMimeType());
                    descriptor.addMapping(mapping);
                }
                else {
                    QName type = queryOperation.getResult().getType();
                    String localElement = type.getLocalPart();
                    // look for top-level complex types
View Full Code Here

        descriptor.setSchemaReference(schemaReference);

        XMLFragmentCollectionMapping fragMapping = new XMLFragmentCollectionMapping();
        fragMapping.setAttributeName("simpleXML");
        fragMapping.setXPath(DEFAULT_SIMPLE_XML_TAG);
        descriptor.addMapping(fragMapping);
        return descriptor;
    }

}
View Full Code Here

        procedureParameterMapping.setReferenceClass(StoredProcedureParameterMetadata.class);
        procedureParameterMapping.setXPath("orm:parameter");
        descriptor.addMapping(procedureParameterMapping);
       
        descriptor.addMapping(getNameAttributeMapping());
        descriptor.addMapping(getResultClassAttributeMapping());
        descriptor.addMapping(getResultSetMappingAttributeMapping());
       
        XMLDirectMapping procedureNameMapping = new XMLDirectMapping();
        procedureNameMapping.setAttributeName("m_procedureName");
        procedureNameMapping.setGetMethodName("getProcedureName");
View Full Code Here

        procedureParameterMapping.setXPath("orm:parameter");
        descriptor.addMapping(procedureParameterMapping);
       
        descriptor.addMapping(getNameAttributeMapping());
        descriptor.addMapping(getResultClassAttributeMapping());
        descriptor.addMapping(getResultSetMappingAttributeMapping());
       
        XMLDirectMapping procedureNameMapping = new XMLDirectMapping();
        procedureNameMapping.setAttributeName("m_procedureName");
        procedureNameMapping.setGetMethodName("getProcedureName");
        procedureNameMapping.setSetMethodName("setProcedureName");
View Full Code Here

        XMLDirectMapping procedureNameMapping = new XMLDirectMapping();
        procedureNameMapping.setAttributeName("m_procedureName");
        procedureNameMapping.setGetMethodName("getProcedureName");
        procedureNameMapping.setSetMethodName("setProcedureName");
        procedureNameMapping.setXPath("@procedure-name");
        descriptor.addMapping(procedureNameMapping);
       
        XMLDirectMapping returnsResultSetMapping = new XMLDirectMapping();
        returnsResultSetMapping.setAttributeName("m_returnsResultSet");
        returnsResultSetMapping.setGetMethodName("getReturnsResultSet");
        returnsResultSetMapping.setSetMethodName("setReturnsResultSet");
View Full Code Here

        XMLDirectMapping returnsResultSetMapping = new XMLDirectMapping();
        returnsResultSetMapping.setAttributeName("m_returnsResultSet");
        returnsResultSetMapping.setGetMethodName("getReturnsResultSet");
        returnsResultSetMapping.setSetMethodName("setReturnsResultSet");
        returnsResultSetMapping.setXPath("@returns-result-set");
        descriptor.addMapping(returnsResultSetMapping);
       
        return descriptor;
    }

    /**
 
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.