Package org.restlet.ext.odata.internal.edm

Examples of org.restlet.ext.odata.internal.edm.Schema


            }
        }
        if (metadata.getContainers() != null
                && !metadata.getContainers().isEmpty()) {
            for (EntityContainer entityContainer : metadata.getContainers()) {
                Schema schema = entityContainer.getSchema();
                // Generate Service subclass
                StringBuffer className = new StringBuffer();

                if (serviceClassName != null) {
                    // Try to use the Client preference
                    if (entityContainer.isDefaultEntityContainer()) {
                        className.append(serviceClassName);
                    } else if (metadata.getContainers().size() == 1) {
                        className.append(serviceClassName);
                    } else {
                        className.append(schema.getNamespace()
                                .getNormalizedName().substring(0, 1)
                                .toUpperCase());
                        className.append(schema.getNamespace()
                                .getNormalizedName().substring(1));
                        className.append("Service");
                    }
                } else {
                    className.append(schema.getNamespace().getNormalizedName()
                            .substring(0, 1).toUpperCase());
                    className.append(schema.getNamespace().getNormalizedName()
                            .substring(1));
                    className.append("Service");
                }

                Map<String, Object> dataModel = new HashMap<String, Object>();
View Full Code Here

TOP

Related Classes of org.restlet.ext.odata.internal.edm.Schema

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.