Package org.eclipse.persistence.oxm.schema

Examples of org.eclipse.persistence.oxm.schema.XMLSchemaClassPathReference


                schemaContext = prefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + schemaContext;
            }
        }
        String schemaContextWithSlash = SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + schemaContext;

        XMLSchemaReference schemaRef = new XMLSchemaClassPathReference();
        schemaRef.setSchemaContext(schemaContextWithSlash);
        schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE);
        getXmlDescriptor().setSchemaReference(schemaRef);

    }
View Full Code Here


    protected ClassDescriptor buildProjectDescriptor() {
        XMLDescriptor descriptor = new XMLDescriptor();
        descriptor.setJavaClass(Project.class);
        descriptor.setDefaultRootElement(getPrimaryNamespaceXPath() + "object-persistence");

        descriptor.setSchemaReference(new XMLSchemaClassPathReference(SCHEMA_DIR + TOPLINK_10_SCHEMA));

        XMLTransformationMapping versionMapping = new XMLTransformationMapping();
        versionMapping.addFieldTransformer("@version", getConstantTransformerForProjectVersionMapping());
        descriptor.addMapping(versionMapping);
View Full Code Here

        descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("@xsi:type"));
        descriptor.getInheritancePolicy().addClassIndicator(DatabaseField.class, getSecondaryNamespaceXPath() + "column");
        descriptor.getInheritancePolicy().addClassIndicator(XMLField.class, getPrimaryNamespaceXPath() + "node");
        descriptor.getInheritancePolicy().addClassIndicator(XMLUnionField.class, getPrimaryNamespaceXPath() + "union-node");

        XMLSchemaReference reference = new XMLSchemaClassPathReference();
        reference.setSchemaContext("/"+ getSecondaryNamespaceXPath() + "column");
        descriptor.setSchemaReference(reference);
       
        XMLDirectMapping tableMapping = new XMLDirectMapping();
        tableMapping.setAttributeName("table");
        tableMapping.setGetMethodName("getTableName");
View Full Code Here

    public ClassDescriptor buildSessionConfigsDescriptor() {
        XMLDescriptor descriptor = new XMLDescriptor();
        descriptor.setDefaultRootElement("sessions");
        descriptor.setJavaClass(SessionConfigs.class);
        descriptor.setSchemaReference(new XMLSchemaClassPathReference(ECLIPSELINK_SESSIONS_SCHEMA));

        XMLDirectMapping versionMapping = new XMLDirectMapping();
        versionMapping.setAttributeName("m_version");
        versionMapping.setGetMethodName("getVersion");
        versionMapping.setSetMethodName("setVersion");
View Full Code Here

    }

    @Override
    protected ClassDescriptor buildProjectDescriptor() {
        XMLDescriptor descriptor = (XMLDescriptor)super.buildProjectDescriptor();       
        descriptor.setSchemaReference(new XMLSchemaClassPathReference(SCHEMA_DIR + ECLIPSELINK_SCHEMA));

        return descriptor;
    }
View Full Code Here

     */
    protected ClassDescriptor buildEntityMappingsDescriptor(String xsdLocation) {
        XMLDescriptor descriptor = new XMLDescriptor();
        descriptor.setDefaultRootElement("orm:entity-mappings");
        descriptor.setJavaClass(XMLEntityMappings.class);
        descriptor.setSchemaReference(new XMLSchemaClassPathReference(xsdLocation));
       
        descriptor.addMapping(getDescriptionMapping());
       
        XMLCompositeObjectMapping persistenceUnitMetadataMapping = new XMLCompositeObjectMapping();
        persistenceUnitMetadataMapping.setAttributeName("m_persistenceUnitMetadata");
View Full Code Here

    protected ClassDescriptor buildProjectDescriptor() {
        XMLDescriptor descriptor = new XMLDescriptor();
        descriptor.setJavaClass(Project.class);
        descriptor.setDefaultRootElement(getPrimaryNamespaceXPath() + "object-persistence");

        descriptor.setSchemaReference(new XMLSchemaClassPathReference(SCHEMA_DIR + TOPLINK_10_SCHEMA));

        XMLTransformationMapping versionMapping = new XMLTransformationMapping();
        versionMapping.addFieldTransformer("@version", getConstantTransformerForProjectVersionMapping());
        descriptor.addMapping(versionMapping);
View Full Code Here

                schemaContext = prefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + schemaContext;
            }
        }
        String schemaContextWithSlash = SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + schemaContext;

        XMLSchemaReference schemaRef = new XMLSchemaClassPathReference();
        schemaRef.setSchemaContext(schemaContextWithSlash);
        schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE);
        getXmlDescriptor().setSchemaReference(schemaRef);

    }
View Full Code Here

            desc.addPrimaryKeyFieldName(pkFieldName);
        }
        descriptor = desc;
       
        // TODO: do we need to relocate this code?
        XMLSchemaClassPathReference schemaRef = new XMLSchemaClassPathReference();
        schemaRef.setSchemaContext("/" + schemaTypeName);
        schemaRef.setSchemaContextAsQName(new QName(classNamespace, schemaTypeName));
        // the default type is complex;  need to check for simple type case
        if(isEnumerationType() || (propertyNames.size() == 1 && helper.isAnnotationPresent(getProperties().get(propertyNames.get(0)).getElement(), XmlValue.class))) {
            schemaRef.setType(XMLSchemaReference.SIMPLE_TYPE)
        }
        descriptor.setSchemaReference(schemaRef);
    }
View Full Code Here

        getInstanceClass();
        Class implClass = getImplClass();

        xmlDescriptor.setJavaClass(implClass);
       
        XMLSchemaReference schemaReference = new XMLSchemaClassPathReference();
        schemaReference.setSchemaContext("/sdo:Property");
        xmlDescriptor.setSchemaReference(schemaReference);
        // these properties are ordered as listed page 74 sect. 8.3 of the spec in "SDO Model for Types and Properties"
        SDOProperty aliasNameProperty = new SDOProperty(aHelperContext);
        aliasNameProperty.setName("aliasName");
        aliasNameProperty.setMany(true);
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.oxm.schema.XMLSchemaClassPathReference

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.