incubator-wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngalla...@apache.org
Subject svn commit: r787557 [5/12] - in /incubator/wink/contrib/ibm-jaxrs: ./ lib/ src/ src/com/ src/com/ibm/ src/com/ibm/ws/ src/com/ibm/ws/jaxrs/ src/com/ibm/ws/jaxrs/annotations/ src/com/ibm/ws/jaxrs/context/ src/com/ibm/ws/jaxrs/core/ src/com/ibm/ws/jaxrs/...
Date Tue, 23 Jun 2009 05:41:55 GMT
Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/ReflectiveJAXRSInfoBuilder.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/ReflectiveJAXRSInfoBuilder.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/ReflectiveJAXRSInfoBuilder.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/ReflectiveJAXRSInfoBuilder.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,378 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ibm.ws.jaxrs.model;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.Path;
+import javax.ws.rs.ext.Provider;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.jaxrs.model.MethodDispatcher;
+import org.apache.cxf.jaxrs.model.OperationResourceInfo;
+import org.apache.cxf.jaxrs.model.ProviderInfo;
+import org.apache.cxf.jaxrs.model.URITemplate;
+import org.apache.cxf.jaxrs.utils.AnnotationUtils;
+
+import com.ibm.ws.jaxrs.i18n.Messages;
+import com.ibm.ws.jaxrs.lifecycle.LifecycleManagerFactory;
+import com.ibm.ws.jaxrs.model.reflective.ClassResourceInfoImpl;
+import com.ibm.ws.jaxrs.model.reflective.OperationResourceInfoImpl;
+import com.ibm.ws.jaxrs.model.reflective.ProviderInfoImpl;
+
+/**
+ * This class is an implementation of the ResourceBuilder interface that builds
+ * a list of ClassResourceInfo objects using reflection.
+ *
+ */
+public class ReflectiveJAXRSInfoBuilder implements JAXRSInfoBuilder {
+
+    private static Log log = LogFactory
+            .getLog(ReflectiveJAXRSInfoBuilder.class);
+
+    ReflectiveJAXRSInfoBuilder() {
+    }
+
+    /**
+     * This method will build the appropriate ClassResourceInfo objects by
+     * reflecting on the input provided by the ResourceBuilderSource.
+     *
+     */
+    public JAXRSInfoOutput buildRESTInfo(JAXRSInfoInput source) {
+        List<ClassResourceInfo> classInfoList = new ArrayList<ClassResourceInfo>();
+        List<ProviderInfo> providerInfoList = new ArrayList<ProviderInfo>();
+        Map<String, JAXRSInfo> infos = source.getInfos();
+        // for each Class object in the list, we will build a corresponding
+        // ClassResourceInfo if it is indeed annotated as a JAX-RS resource
+        if (infos != null && !infos.isEmpty()) {
+            for (JAXRSInfo restInfo : infos.values()) {
+                Class<?> clazz = restInfo.getRESTClass();
+                boolean isClassProcessed = false;
+                if (clazz.getAnnotation(Path.class) != null) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Processing the " + clazz.getName()
+                                + " because of the @Path annotation");
+                    }
+                    ClassResourceInfo info = processResourceClass(restInfo
+                            .getRESTClass(), null, restInfo.getInstance(), true);
+                    if (info != null) {
+                        classInfoList.add(info);
+                    }
+                    isClassProcessed = true;
+                }
+
+                if (clazz.getAnnotation(Provider.class) != null) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Processing the " + clazz.getName()
+                                + " because of the @Provider annotation");
+                    }
+                    ProviderInfo providerInfo = processProviderClass(restInfo);
+                    if (providerInfo != null) {
+                        if (!providerInfo.isSingleton()) {
+                            if (log.isDebugEnabled()) {
+                                log
+                                        .debug("Provider class "
+                                                + clazz.getName()
+                                                + " was not in the singletons list but will turn into singleton due to default life cycle.");
+                            }
+                            Object providerSingleton = LifecycleManagerFactory
+                                    .getLifeCycleManager(providerInfo)
+                                    .createInstance(providerInfo, null);
+                            if (providerSingleton != null) {
+                                providerInfo = new ProviderInfoImpl(
+                                        providerSingleton);
+                            } else {
+                                providerInfo = null;
+                            }
+                        }
+                        isClassProcessed = true;
+                    }
+
+                    if (providerInfo != null) {
+                        providerInfoList.add(providerInfo);
+                    }
+                }
+
+                if (!isClassProcessed) {
+                    if (log.isDebugEnabled()) {
+                        log
+                                .debug("Not processing the "
+                                        + clazz.getName()
+                                        + " because there was no @Path or @Provider annotation.");
+                    }
+                }
+            }
+        }
+        JAXRSInfoOutput output = new JAXRSInfoOutput();
+        output.setClassInfoList(classInfoList);
+        output.setProviderInfoList(providerInfoList);
+        return output;
+    }
+
+    /**
+     * This method will build a ClassResourceInfo object from a Class object.
+     * This will be done if the class represented by the Class object is a
+     * JAX-RS resource. If the class is not a JAX-RS resource, null will be
+     * returned;
+     *
+     */
+    ClassResourceInfo processResourceClass(Class<?> clazz, Class<?> parentClazz, Object singleton, boolean isRoot) {
+        ClassResourceInfo info = new ClassResourceInfoImpl(clazz, singleton,
+                isRoot);
+        setTemplates(info);
+        processMethods(clazz, parentClazz, info);
+        return info;
+    }
+
+    void setTemplates(ClassResourceInfo info) {
+
+        // first get the @Path template
+        URITemplate tmpl = URITemplate.createTemplate(info, info.getPath());
+        info.setURITemplate(tmpl);
+
+        // now get the @Aliases/@Alias template
+        String[] aliasPaths = info.getAliasPaths();
+        if (aliasPaths != null) {
+            for (String aliasPath : aliasPaths) {
+                tmpl = URITemplate.createTemplate(info, aliasPath);
+                info.addURIAliasTemplate(tmpl);
+            }
+        }
+
+    }
+
+    /**
+     * This method will be responsible for building the appropriate
+     * OperationResourceInfo or ClassResourceInfo objects from the methods
+     * within a resource class. If the method is a resource method, subresource
+     * method, or sublocator method, an OperationResourceInfo object will be
+     * built. If it is a sublocator method, a ClassResourceInfo object will also
+     * be built.
+     *
+     */
+    void processMethods(Class<?> clazz, Class<?> parentClazz, ClassResourceInfo classInfo) {
+        Method[] methods = clazz.getDeclaredMethods();
+        MethodDispatcher md = new MethodDispatcher();
+        classInfo.setMethodDispatcher(md);
+        for (Method method : methods) {
+            boolean resourceMethod = AnnotationUtils.isResourceMethod(method);
+            boolean subResourceMethod = AnnotationUtils
+                    .isSubResourceMethod(method);
+            boolean subResourceLocator = AnnotationUtils
+                    .isSubResourceLocator(method);
+
+            if (!resourceMethod && !subResourceMethod && !subResourceLocator) {
+                method = getInheritedMethod(clazz, method);
+                if (method != null) {
+                    resourceMethod = AnnotationUtils.isResourceMethod(method);
+                    subResourceMethod = AnnotationUtils
+                            .isSubResourceMethod(method);
+                    subResourceLocator = AnnotationUtils
+                            .isSubResourceLocator(method);
+                }
+            }
+
+            // we will only collect it if is one of the three types we are
+            // looking for
+            if ((resourceMethod || subResourceMethod || subResourceLocator)
+                    && method != null) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Creating OperationResourceInfo for method: "
+                            + method.getName() + " in the class: "
+                            + clazz.getName());
+                }
+                OperationResourceInfo ori = new OperationResourceInfoImpl(
+                        method, classInfo);
+                ori.setIsSubResourceLocator(subResourceLocator);
+                ori.setIsSubResourceMethod(subResourceMethod);
+                URITemplate t = URITemplate.createTemplate(classInfo, ori
+                        .getPath());
+                ori.setURITemplate(t);
+                setHttpMethodType(ori);
+                md.bind(ori, method);
+            }
+
+            // if this is a subResourceLocator we need to create the appropriate
+            // ClassResourceInfo
+            if (subResourceLocator && method != null) {
+                Class<?> subResource = method.getReturnType();
+
+                if (parentClazz != null
+                        && subResource.getName().equals(parentClazz.getName())) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Already created info from class: "
+                                + subResource.getName());
+                    }
+                } else {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Creating subresource from class: "
+                                + subResource.getName());
+                    }
+                    ClassResourceInfo subResourceInfo = processResourceClass(
+                            subResource, clazz, null, false);
+                    classInfo.addSubClassResourceInfo(subResourceInfo);
+                }
+
+            }
+        }
+    }
+
+    /**
+     * This method will check to see if, for a given method, there is a method
+     * on a super class that is a JAX-RS resource method, subresource method,
+     * or subresource locator.
+     */
+    Method getInheritedMethod(Class<?> clazz, Method method) {
+        Class<?> parent = clazz.getSuperclass();
+        while (parent != null && Object.class != parent) {
+            Method inheritedMethod = null;
+            try {
+                inheritedMethod = parent.getMethod(method.getName(), method
+                        .getParameterTypes());
+            } catch (NoSuchMethodException e) {
+                // suppress
+            }
+            if (inheritedMethod != null) {
+                boolean resourceMethod = AnnotationUtils
+                        .isResourceMethod(inheritedMethod);
+                boolean subResourceMethod = AnnotationUtils
+                        .isSubResourceMethod(inheritedMethod);
+                boolean subResourceLocator = AnnotationUtils
+                        .isSubResourceLocator(inheritedMethod);
+                if (resourceMethod || subResourceMethod || subResourceLocator) {
+                    return inheritedMethod;
+                }
+            }
+            parent = parent.getSuperclass();
+        }
+        return getInheritedMethod(clazz.getInterfaces(), method);
+    }
+
+    /**
+     * This method will check to see if, for a given method, there is a method
+     * on a super interface that is a JAX-RS resource method, subresource method,
+     * or subresource locator.
+     */
+    Method getInheritedMethod(Class<?>[] interfaces, Method method) {
+        Method inheritedMethod = null;
+        if (interfaces != null) {
+            for (Class<?> inter : interfaces) {
+                try {
+                    inheritedMethod = inter.getMethod(method.getName(), method
+                            .getParameterTypes());
+                    boolean resourceMethod = AnnotationUtils
+                            .isResourceMethod(inheritedMethod);
+                    boolean subResourceMethod = AnnotationUtils
+                            .isSubResourceMethod(inheritedMethod);
+                    boolean subResourceLocator = AnnotationUtils
+                            .isSubResourceLocator(inheritedMethod);
+                    if (resourceMethod || subResourceMethod
+                            || subResourceLocator) {
+                        break;
+                    }
+                    inheritedMethod = null;
+                } catch (NoSuchMethodException e) {
+                    // suppress
+                }
+                inheritedMethod = getInheritedMethod(inter.getInterfaces(),
+                        method);
+                if (inheritedMethod != null) {
+                    break;
+                }
+            }
+        }
+        return inheritedMethod;
+    }
+
+    /**
+     * This method will determine the appropriate HTTP method type of the
+     * supplied OperationResourceInfo object. If multiple HTTP methods types
+     * are declared on the method, a warning will be logged.
+     */
+    void setHttpMethodType(OperationResourceInfo ori) {
+        Annotation[] annotations = ori.getAnnotatedMethod().getAnnotations();
+        for (Annotation annotation : annotations) {
+            if (annotation.annotationType().getAnnotation(HttpMethod.class) != null) {
+                String value = annotation.annotationType().getAnnotation(
+                        HttpMethod.class).value();
+                if (ori.getHttpMethod() == null) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("For the "
+                                + ori.getAnnotatedMethod().getName()
+                                + " method in "
+                                + "the "
+                                + ori.getAnnotatedMethod().getDeclaringClass()
+                                        .getName()
+                                + " class, setting HTTP method to: " + value);
+                    }
+                    ori.setHttpMethod(value);
+                }
+
+                // log a warning
+                else {
+                    if (log.isWarnEnabled()) {
+                        String msg = Messages.getMessage(
+                                "methodInvalidAnnot00", ori
+                                        .getAnnotatedMethod().getName(), ori
+                                        .getAnnotatedMethod()
+                                        .getDeclaringClass().getName());
+                        log.warn(msg);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * This method will build a ProviderInfo instance based on a class that was
+     * annotated with the
+     *
+     * @Provider annotation.
+     */
+    ProviderInfo processProviderClass(JAXRSInfo restInfo) {
+        Class<?> providerClass = restInfo.getRESTClass();
+        Object singleton = restInfo.getInstance();
+        ProviderInfo providerInfo = null;
+
+        // if it is a singleton, set it
+        if (singleton != null) {
+            if (log.isDebugEnabled()) {
+                log.debug("Creating singleton ProviderInfo for class: "
+                        + singleton.getClass().getName());
+            }
+            providerInfo = new ProviderInfoImpl(singleton);
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug("Creating ProviderInfo for class: "
+                        + providerClass.getName());
+            }
+            providerInfo = new ProviderInfoImpl(providerClass);
+        }
+
+        return providerInfo;
+    }
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLJAXRSInfoBuilder.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLJAXRSInfoBuilder.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLJAXRSInfoBuilder.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLJAXRSInfoBuilder.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,465 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ibm.ws.jaxrs.model;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ws.rs.core.MediaType;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.jaxrs.model.MethodDispatcher;
+import org.apache.cxf.jaxrs.model.OperationResourceInfo;
+import org.apache.cxf.jaxrs.model.ProviderInfo;
+import org.apache.cxf.jaxrs.model.URITemplate;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
+
+import com.ibm.ws.jaxrs.i18n.Messages;
+import com.ibm.ws.jaxrs.lifecycle.LifecycleManagerFactory;
+import com.ibm.ws.jaxrs.model.dd.jaxb.MethodType;
+import com.ibm.ws.jaxrs.model.dd.jaxb.MethodsType;
+import com.ibm.ws.jaxrs.model.dd.jaxb.ObjectFactory;
+import com.ibm.ws.jaxrs.model.dd.jaxb.ParameterType;
+import com.ibm.ws.jaxrs.model.dd.jaxb.ProviderType;
+import com.ibm.ws.jaxrs.model.dd.jaxb.ResourceType;
+import com.ibm.ws.jaxrs.model.dd.jaxb.ResourcesType;
+import com.ibm.ws.jaxrs.model.reflective.ClassResourceInfoImpl;
+import com.ibm.ws.jaxrs.model.reflective.OperationResourceInfoImpl;
+import com.ibm.ws.jaxrs.model.reflective.ProviderInfoImpl;
+import com.ibm.ws.jaxrs.utils.ClassUtils;
+
+/**
+ * This class will be responsible for building up our JAX-RS
+ * configuration from an ibm-jaxrs.xml file.
+ *
+ */
+public class XMLJAXRSInfoBuilder implements JAXRSInfoBuilder {
+
+    private static Log log = LogFactory.getLog(XMLJAXRSInfoBuilder.class);
+
+    public List<String> classesProcessed = new ArrayList<String>();
+
+    private ResourcesType resources;
+
+    private ClassLoader classLoader;
+
+    private JAXRSInfoOutput output;
+
+    private JAXRSInfoOutput classOutput;
+
+    public XMLJAXRSInfoBuilder() {
+        this(null);
+    }
+
+    public XMLJAXRSInfoBuilder(JAXRSInfoOutput classOutput) {
+        this.classOutput = classOutput;
+    }
+
+    /**
+     * Creates and returns an instance of JAXRSInfoOutput based
+     * on the XML configuration data.
+     */
+    public JAXRSInfoOutput buildRESTInfo(JAXRSInfoInput source)
+            throws Exception {
+        if (source == null || source.getConfigFile() == null
+                || source.getClassLoader() == null) {
+            throw new IllegalArgumentException();
+        }
+        List<ClassResourceInfo> classInfoList = new ArrayList<ClassResourceInfo>();
+        List<ProviderInfo> providerInfoList = new ArrayList<ProviderInfo>();
+        output = new JAXRSInfoOutput();
+
+        File configFile = source.getConfigFile();
+        classLoader = source.getClassLoader();
+        try {
+            JAXBContext context = JAXBContext.newInstance(ObjectFactory.class);
+            Unmarshaller u = context.createUnmarshaller();
+            JAXBElement<ResourcesType> element = (JAXBElement<ResourcesType>) u
+                    .unmarshal(new FileInputStream(configFile));
+            resources = element.getValue();
+            List<ResourceType> resourceTypes = resources.getResource();
+            for (ResourceType resource : resourceTypes) {
+
+                // process root-level resources
+                if (resource.getPath() != null
+                        && !"".equals(resource.getPath())) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Processing root resource from config file: "
+                                + resource.getClassName());
+                    }
+                    classesProcessed.add(resource.getClassName());
+                    ClassResourceInfo classInfo = processResource(resource,
+                            null, null);
+                    classInfoList.add(classInfo);
+                }
+            }
+
+            // now let's process the Provider configuration
+            List<ProviderType> providers = resources.getProvider();
+            for (ProviderType provider : providers) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Processing provider from config file: "
+                            + provider.getClassName());
+                }
+                ProviderInfo providerInfo = processProvider(provider);
+                if (providerInfo != null) {
+                    if (!providerInfo.isSingleton()) {
+                        if (log.isDebugEnabled()) {
+                            log
+                                    .debug("Provider class "
+                                            + provider.getClassName()
+                                            + " was not in the singletons list but will turn into singleton due to default life cycle.");
+                        }
+                        Object providerSingleton = LifecycleManagerFactory
+                                .getLifeCycleManager(providerInfo)
+                                .createInstance(providerInfo, null);
+                        if (providerSingleton != null) {
+                            ProviderInfo oldInfo = providerInfo;
+
+                            providerInfo = new ProviderInfoImpl(
+                                    providerSingleton, oldInfo
+                                            .getConsumesTypes(), oldInfo
+                                            .getProducesTypes());
+                        } else {
+                            providerInfo = null;
+                        }
+                    }
+                }
+
+                providerInfoList.add(providerInfo);
+            }
+        } catch (Exception e) {
+            if (log.isErrorEnabled()) {
+                log.error("A configuration could not be built from XML", e);
+            }
+            throw e;
+        }
+
+        output.setClassInfoList(classInfoList);
+        output.setProviderInfoList(providerInfoList);
+        return output;
+    }
+
+    /**
+     * This method will be responsible for driving the processing of the
+     * 'resource' element in the ibm-jaxrs.xml.
+     * @param resource
+     * @throws Exception
+     */
+    ClassResourceInfo processResource(ResourceType resource, ClassResourceInfo subResourceInfo, Class<?> parentClazz)
+            throws Exception {
+        Class<?> resourceClass = ClassUtils.loadClass(resource.getClassName()
+                .trim(), classLoader);
+
+        ClassResourceInfo ddClassInfo = subResourceInfo;
+        if (ddClassInfo == null && classOutput != null) {
+            ddClassInfo = classOutput.getClassResourceInfo(resourceClass
+                    .getName());
+        }
+
+        // process the resource class
+        ddClassInfo = ddClassInfo == null ? new ClassResourceInfoImpl(
+                resourceClass) : ddClassInfo;
+
+        if (!StringUtils.isEmpty(resource.getPath())) {
+            ddClassInfo.setValue(ClassResourceInfo.Property.PATH, resource
+                    .getPath());
+        }
+
+        // get the value of the consumes mime types
+        if (resource.getConsumes() != null
+                && resource.getConsumes().getMimeType() != null) {
+            String[] consumesTypes = new String[resource.getConsumes()
+                    .getMimeType().size()];
+            consumesTypes = resource.getConsumes().getMimeType().toArray(
+                    consumesTypes);
+            ddClassInfo.setValue(ClassResourceInfo.Property.CONSUMES,
+                    JAXRSUtils.getMediaTypes(consumesTypes));
+        }
+
+        // get the value of the produces mime types
+        if (resource.getProduces() != null
+                && resource.getProduces().getMimeType() != null) {
+            String[] producesTypes = new String[resource.getProduces()
+                    .getMimeType().size()];
+            resource.getProduces().getMimeType().toArray(producesTypes);
+            ddClassInfo.setValue(ClassResourceInfo.Property.PRODUCES,
+                    JAXRSUtils.getMediaTypes(producesTypes));
+        }
+
+        // create the URI template
+        URITemplate template = URITemplate.createTemplate(ddClassInfo, resource
+                .getPath());
+        ddClassInfo.setURITemplate(template);
+
+        processMethods(resource.getMethods(), ddClassInfo);
+        return ddClassInfo;
+    }
+
+    /**
+     * Returns the specified ClassResourceInfo from the list of subresources on
+     * the supplied 'parentInfo'. Returns null if a ClassResourceInfo is not found.
+     */
+    ClassResourceInfo getSubResourceInfo(String className, ClassResourceInfo parentInfo) {
+        List<ClassResourceInfo> srInfos = parentInfo.getSubClassResourceInfo();
+        if (srInfos != null) {
+            for (ClassResourceInfo srInfo : srInfos) {
+                if (className.equals(srInfo.getResourceClass().getName())) {
+                    return srInfo;
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * This method will drive the processing of the 'methods' element in the
+     * ibm-jaxrs.xml configuration file.
+     */
+    void processMethods(MethodsType methods, ClassResourceInfo classInfo)
+            throws Exception {
+        Class<?> resourceClass = classInfo.getResourceClass();
+        MethodDispatcher md = classInfo.getMethodDispatcher() != null ? classInfo
+                .getMethodDispatcher()
+                : new MethodDispatcher();
+        classInfo.setMethodDispatcher(md);
+        List<MethodType> methodTypes = methods.getMethod();
+
+        // go through all the methods defined in XML
+        for (MethodType method : methodTypes) {
+            String methodName = method.getMethodName();
+            if (log.isDebugEnabled()) {
+                log.debug("Processing the " + methodName + " method in the "
+                        + resourceClass.getName() + " class from config file");
+            }
+            Method javaMethod = getJavaMethod(methodName,
+                    method.getParameter(), resourceClass);
+            OperationResourceInfo opInfo = md
+                    .getOperationResourceInfo(javaMethod);
+            opInfo = opInfo == null ? new OperationResourceInfoImpl(javaMethod,
+                    classInfo) : opInfo;
+
+            // set the path if it was specified
+            if (!StringUtils.isEmpty(method.getPath())) {
+                opInfo.setValue(OperationResourceInfo.Property.PATH, method
+                        .getPath());
+            }
+
+            // set the HTTP method type if it was specified
+            if (!StringUtils.isEmpty(method.getMethodType())) {
+                opInfo.setHttpMethod(method.getMethodType());
+            }
+
+            // get the value of the consumes mime types
+            if (method.getConsumes() != null
+                    && method.getConsumes().getMimeType() != null) {
+                String[] consumesTypes = new String[method.getConsumes()
+                        .getMimeType().size()];
+                consumesTypes = method.getConsumes().getMimeType().toArray(
+                        consumesTypes);
+                opInfo.setValue(OperationResourceInfo.Property.CONSUMES,
+                        JAXRSUtils.getMediaTypes(consumesTypes));
+            }
+
+            // get the value of the produces mime types
+            if (method.getProduces() != null
+                    && method.getProduces().getMimeType() != null) {
+                String[] producesTypes = new String[method.getProduces()
+                        .getMimeType().size()];
+                method.getProduces().getMimeType().toArray(producesTypes);
+                opInfo.setValue(OperationResourceInfo.Property.PRODUCES,
+                        JAXRSUtils.getMediaTypes(producesTypes));
+            }
+
+            if (method.isEncoded() != null) {
+                opInfo.setValue(OperationResourceInfo.Property.ENCODED, method
+                        .isEncoded());
+            }
+
+            if (method.getDefaultValue() != null) {
+                opInfo.setValue(OperationResourceInfo.Property.DEFAULT_VALUE,
+                        method.getDefaultValue());
+            }
+
+            // now we need to determine the resource method type, if it has an HTTP
+            // method designator it is a sub resource method, the assumption here is
+            // that the method would NOT be defined in the XML unless it was either
+            // a resource, subresource, or subresource locator method
+
+            // if it is a subresource locator, we need to process the return type
+            // as a resource class unless we have already done so
+            if (opInfo.getHttpMethod() == null) {
+                if (log.isDebugEnabled()) {
+                    log.debug("The " + javaMethod.getName()
+                            + " method is a subresource " + "locator method");
+                }
+                opInfo.setIsSubResourceLocator(true);
+                opInfo.setIsSubResourceMethod(false);
+                Class<?> returnType = javaMethod.getReturnType();
+                if (!classesProcessed.contains(returnType.getName())) {
+                    classesProcessed.add(returnType.getName());
+                    ResourceType subResource = findResourceForClass(returnType
+                            .getName());
+                    if (subResource == null) {
+                        String msg = Messages.getMessage("subResourceNotInXML",
+                                returnType.getName(), javaMethod.getName(),
+                                resourceClass.getName());
+                        throw new RuntimeException(msg);
+                    }
+                    if (log.isDebugEnabled()) {
+                        log.debug("Processing the " + returnType.getName()
+                                + " subresource class");
+                    }
+                    ClassResourceInfo subInfo = getSubResourceInfo(subResource
+                            .getClassName(), classInfo);
+                    ClassResourceInfo subResourceInfo = processResource(
+                            subResource, subInfo, classInfo.getResourceClass());
+                    if (subInfo == null) {
+                        classInfo.addSubClassResourceInfo(subResourceInfo);
+                    }
+                } else {
+                    if (log.isDebugEnabled()) {
+                        log.debug("The " + returnType.getName()
+                                + " subresource class "
+                                + "has already been processed");
+                    }
+                }
+            } else {
+                opInfo.setIsSubResourceLocator(false);
+                opInfo.setIsSubResourceMethod(true);
+            }
+            URITemplate template = URITemplate.createTemplate(classInfo, opInfo
+                    .getPath());
+            opInfo.setURITemplate(template);
+            md.bind(opInfo, javaMethod);
+        }
+    }
+
+    /**
+     * This method will drive the processing of a 'provider' element in the
+     * ibm-jaxrs.xml configuration file.
+     */
+    ProviderInfo processProvider(ProviderType provider) throws Exception {
+        Class<?> providerClass = ClassUtils.loadClass(provider.getClassName()
+                .trim(), classLoader);
+        List<MediaType> consumes = null;
+        List<MediaType> produces = null;
+
+        // now get the consumes/produces types
+        if (provider.getConsumes() != null
+                && provider.getConsumes().getMimeType() != null) {
+            String[] consumesTypes = new String[provider.getConsumes()
+                    .getMimeType().size()];
+            provider.getConsumes().getMimeType().toArray(consumesTypes);
+            consumes = JAXRSUtils.getMediaTypes(consumesTypes);
+        }
+
+        if (provider.getProduces() != null
+                && provider.getProduces().getMimeType() != null) {
+            String[] producesTypes = new String[provider.getProduces()
+                    .getMimeType().size()];
+            provider.getProduces().getMimeType().toArray(producesTypes);
+            produces = JAXRSUtils.getMediaTypes(producesTypes);
+        }
+
+        ProviderInfo providerInfo = null;
+
+        if (classOutput != null) {
+            providerInfo = classOutput.getProviderInfo(provider.getClassName());
+            /*
+             * if the provider info existed previously (i.e. from the reflection output), then merge the two data
+             */
+            if (providerInfo != null) {
+                if (providerInfo.isSingleton()) {
+                    return new ProviderInfoImpl(providerInfo.getSingleton(),
+                            (consumes != null) ? consumes : providerInfo
+                                    .getConsumesTypes(),
+                            (produces != null) ? produces : providerInfo
+                                    .getProducesTypes());
+                }
+                return new ProviderInfoImpl(providerInfo.getProviderClass(),
+                        (consumes != null) ? consumes : providerInfo
+                                .getConsumesTypes(),
+                        (produces != null) ? produces : providerInfo
+                                .getProducesTypes());
+            }
+        }
+
+        return new ProviderInfoImpl(providerClass, consumes, produces);
+    }
+
+    /**
+     * This method will identify and return a Method object based on a name
+     * and input parameters.
+     */
+    Method getJavaMethod(String methodName, List<ParameterType> paramTypes, Class<?> resourceClass)
+            throws Exception {
+        List<String> paramNames = null;
+
+        // first get all of the parameter types for the method we are
+        // searching for
+        if (paramTypes != null) {
+            for (ParameterType paramType : paramTypes) {
+                if (paramType.getType() != null
+                        && !"".equals(paramType.getType())) {
+                    if (paramNames == null) {
+                        paramNames = new ArrayList<String>();
+                    }
+                    paramNames.add(paramType.getType());
+                }
+            }
+        }
+
+        // now convert the parameters to an array
+        Class<?>[] params = null;
+        if (paramNames != null) {
+            params = new Class<?>[paramNames.size()];
+            int i = 0;
+            for (String paramName : paramNames) {
+                params[i] = ClassUtils.loadClass(paramName.trim(), classLoader);
+                i++;
+            }
+        }
+        return resourceClass.getDeclaredMethod(methodName, params);
+    }
+
+    /**
+     * This method will be used to find a 'resource' element by a given class
+     * name. If one cannot be found null will be returned.
+     */
+    ResourceType findResourceForClass(String className) {
+        for (ResourceType resource : resources.getResource()) {
+            if (resource.getClassName().equals(className)) {
+                return resource;
+            }
+        }
+        return null;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLReflectionInfoBuilder.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLReflectionInfoBuilder.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLReflectionInfoBuilder.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/XMLReflectionInfoBuilder.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ibm.ws.jaxrs.model;
+
+/**
+ * This is an implementation of hte JAXRSInfoBuilder that will consider
+ * both class metadata (that gained through reflection), and XML configuration
+ * metadata from the ibm-jaxrs.xml. The class will produce output that
+ * is a merged set of metadata.
+ *
+ */
+public class XMLReflectionInfoBuilder implements JAXRSInfoBuilder {
+
+    /**
+     * Creates and returns an instance of JAXRSInfoOutput based
+     * on the XML configuration data and class metadata.
+     */
+    public JAXRSInfoOutput buildRESTInfo(JAXRSInfoInput source)
+            throws Exception {
+        ReflectiveJAXRSInfoBuilder classBuilder = new ReflectiveJAXRSInfoBuilder();
+        JAXRSInfoOutput classOutput = classBuilder.buildRESTInfo(source);
+        XMLJAXRSInfoBuilder xmlBuilder = new XMLJAXRSInfoBuilder(classOutput);
+        JAXRSInfoOutput xmlOutput = xmlBuilder.buildRESTInfo(source);
+        return xmlOutput;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/AliasesType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/AliasesType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/AliasesType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/AliasesType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for aliasesType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="aliasesType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="alias" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "aliasesType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = { "alias" })
+public class AliasesType {
+
+    protected List<String> alias;
+
+    /**
+     * Gets the value of the alias property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the alias property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAlias().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     *
+     *
+     */
+    public List<String> getAlias() {
+        if (alias == null) {
+            alias = new ArrayList<String>();
+        }
+        return this.alias;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ConsumesType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ConsumesType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ConsumesType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ConsumesType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for consumesType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="consumesType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="mimeType" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "consumesType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = { "mimeType" })
+public class ConsumesType {
+
+    protected List<String> mimeType;
+
+    /**
+     * Gets the value of the mimeType property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the mimeType property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMimeType().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     *
+     *
+     */
+    public List<String> getMimeType() {
+        if (mimeType == null) {
+            mimeType = new ArrayList<String>();
+        }
+        return this.mimeType;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,277 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for methodType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="methodType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="method-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="parameter" type="{http://www.ibm.com/xml/ns/jaxrs}parameterType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="method-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="path" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="consumes" type="{http://www.ibm.com/xml/ns/jaxrs}consumesType" minOccurs="0"/>
+ *         &lt;element name="produces" type="{http://www.ibm.com/xml/ns/jaxrs}producesType" minOccurs="0"/>
+ *         &lt;element name="encoded" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         &lt;element name="defaultValue" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "methodType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = {
+        "methodName", "parameter", "methodType", "path", "consumes",
+        "produces", "encoded", "defaultValue" })
+public class MethodType {
+
+    @XmlElement(name = "method-name", required = true)
+    protected String methodName;
+    protected List<ParameterType> parameter;
+    @XmlElement(name = "method-type")
+    protected String methodType;
+    protected String path;
+    protected ConsumesType consumes;
+    protected ProducesType produces;
+    protected Boolean encoded;
+    protected String defaultValue;
+
+    /**
+     * Gets the value of the methodName property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getMethodName() {
+        return methodName;
+    }
+
+    /**
+     * Sets the value of the methodName property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setMethodName(String value) {
+        this.methodName = value;
+    }
+
+    /**
+     * Gets the value of the parameter property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the parameter property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getParameter().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ParameterType }
+     *
+     *
+     */
+    public List<ParameterType> getParameter() {
+        if (parameter == null) {
+            parameter = new ArrayList<ParameterType>();
+        }
+        return this.parameter;
+    }
+
+    /**
+     * Gets the value of the methodType property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getMethodType() {
+        return methodType;
+    }
+
+    /**
+     * Sets the value of the methodType property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setMethodType(String value) {
+        this.methodType = value;
+    }
+
+    /**
+     * Gets the value of the path property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * Sets the value of the path property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setPath(String value) {
+        this.path = value;
+    }
+
+    /**
+     * Gets the value of the consumes property.
+     *
+     * @return
+     *     possible object is
+     *     {@link ConsumesType }
+     *
+     */
+    public ConsumesType getConsumes() {
+        return consumes;
+    }
+
+    /**
+     * Sets the value of the consumes property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link ConsumesType }
+     *
+     */
+    public void setConsumes(ConsumesType value) {
+        this.consumes = value;
+    }
+
+    /**
+     * Gets the value of the produces property.
+     *
+     * @return
+     *     possible object is
+     *     {@link ProducesType }
+     *
+     */
+    public ProducesType getProduces() {
+        return produces;
+    }
+
+    /**
+     * Sets the value of the produces property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link ProducesType }
+     *
+     */
+    public void setProduces(ProducesType value) {
+        this.produces = value;
+    }
+
+    /**
+     * Gets the value of the encoded property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *
+     */
+    public Boolean isEncoded() {
+        return encoded;
+    }
+
+    /**
+     * Sets the value of the encoded property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *
+     */
+    public void setEncoded(Boolean value) {
+        this.encoded = value;
+    }
+
+    /**
+     * Gets the value of the defaultValue property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    /**
+     * Sets the value of the defaultValue property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDefaultValue(String value) {
+        this.defaultValue = value;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodsType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodsType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodsType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/MethodsType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for methodsType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="methodsType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="method" type="{http://www.ibm.com/xml/ns/jaxrs}methodType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "methodsType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = { "method" })
+public class MethodsType {
+
+    protected List<MethodType> method;
+
+    /**
+     * Gets the value of the method property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the method property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMethod().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link MethodType }
+     *
+     *
+     */
+    public List<MethodType> getMethod() {
+        if (method == null) {
+            method = new ArrayList<MethodType>();
+        }
+        return this.method;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ObjectFactory.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ObjectFactory.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ObjectFactory.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.ibm.ws.jaxrs.model.dd.jaxb package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups.  Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _Resources_QNAME = new QName(
+            "http://www.ibm.com/xml/ns/jaxrs", "resources");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.ibm.ws.jaxrs.model.dd.jaxb
+     *
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link MethodsType }
+     *
+     */
+    public MethodsType createMethodsType() {
+        return new MethodsType();
+    }
+
+    /**
+     * Create an instance of {@link ResourceType }
+     *
+     */
+    public ResourceType createResourceType() {
+        return new ResourceType();
+    }
+
+    /**
+     * Create an instance of {@link ProducesType }
+     *
+     */
+    public ProducesType createProducesType() {
+        return new ProducesType();
+    }
+
+    /**
+     * Create an instance of {@link ConsumesType }
+     *
+     */
+    public ConsumesType createConsumesType() {
+        return new ConsumesType();
+    }
+
+    /**
+     * Create an instance of {@link ResourcesType }
+     *
+     */
+    public ResourcesType createResourcesType() {
+        return new ResourcesType();
+    }
+
+    /**
+     * Create an instance of {@link ProviderType }
+     *
+     */
+    public ProviderType createProviderType() {
+        return new ProviderType();
+    }
+
+    /**
+     * Create an instance of {@link AliasesType }
+     *
+     */
+    public AliasesType createAliasesType() {
+        return new AliasesType();
+    }
+
+    /**
+     * Create an instance of {@link ParameterType }
+     *
+     */
+    public ParameterType createParameterType() {
+        return new ParameterType();
+    }
+
+    /**
+     * Create an instance of {@link MethodType }
+     *
+     */
+    public MethodType createMethodType() {
+        return new MethodType();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link ResourcesType }{@code >}}
+     *
+     */
+    @XmlElementDecl(namespace = "http://www.ibm.com/xml/ns/jaxrs", name = "resources")
+    public JAXBElement<ResourcesType> createResources(ResourcesType value) {
+        return new JAXBElement<ResourcesType>(_Resources_QNAME,
+                ResourcesType.class, null, value);
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ParameterType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ParameterType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ParameterType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ParameterType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for parameterType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="parameterType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "parameterType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = { "type" })
+public class ParameterType {
+
+    protected String type;
+
+    /**
+     * Gets the value of the type property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProducesType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProducesType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProducesType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProducesType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for producesType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="producesType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="mimeType" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "producesType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = { "mimeType" })
+public class ProducesType {
+
+    protected List<String> mimeType;
+
+    /**
+     * Gets the value of the mimeType property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the mimeType property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMimeType().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     *
+     *
+     */
+    public List<String> getMimeType() {
+        if (mimeType == null) {
+            mimeType = new ArrayList<String>();
+        }
+        return this.mimeType;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProviderType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProviderType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProviderType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ProviderType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for providerType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="providerType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="class-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="consumes" type="{http://www.ibm.com/xml/ns/jaxrs}consumesType" minOccurs="0"/>
+ *         &lt;element name="produces" type="{http://www.ibm.com/xml/ns/jaxrs}producesType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "providerType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = {
+        "className", "consumes", "produces" })
+public class ProviderType {
+
+    @XmlElement(name = "class-name", required = true)
+    protected String className;
+    protected ConsumesType consumes;
+    protected ProducesType produces;
+
+    /**
+     * Gets the value of the className property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getClassName() {
+        return className;
+    }
+
+    /**
+     * Sets the value of the className property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setClassName(String value) {
+        this.className = value;
+    }
+
+    /**
+     * Gets the value of the consumes property.
+     *
+     * @return
+     *     possible object is
+     *     {@link ConsumesType }
+     *
+     */
+    public ConsumesType getConsumes() {
+        return consumes;
+    }
+
+    /**
+     * Sets the value of the consumes property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link ConsumesType }
+     *
+     */
+    public void setConsumes(ConsumesType value) {
+        this.consumes = value;
+    }
+
+    /**
+     * Gets the value of the produces property.
+     *
+     * @return
+     *     possible object is
+     *     {@link ProducesType }
+     *
+     */
+    public ProducesType getProduces() {
+        return produces;
+    }
+
+    /**
+     * Sets the value of the produces property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link ProducesType }
+     *
+     */
+    public void setProduces(ProducesType value) {
+        this.produces = value;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourceType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourceType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourceType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourceType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,298 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for resourceType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="resourceType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="class-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="path" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="provider" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         &lt;choice minOccurs="0">
+ *           &lt;element name="aliases" type="{http://www.ibm.com/xml/ns/jaxrs}aliasesType" minOccurs="0"/>
+ *           &lt;element name="alias" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;element name="consumes" type="{http://www.ibm.com/xml/ns/jaxrs}consumesType" minOccurs="0"/>
+ *         &lt;element name="produces" type="{http://www.ibm.com/xml/ns/jaxrs}producesType" minOccurs="0"/>
+ *         &lt;element name="encoded" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         &lt;element name="methods" type="{http://www.ibm.com/xml/ns/jaxrs}methodsType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "resourceType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = {
+        "className", "path", "provider", "aliases", "alias", "consumes",
+        "produces", "encoded", "methods" })
+public class ResourceType {
+
+    @XmlElement(name = "class-name", required = true)
+    protected String className;
+    protected String path;
+    @XmlElement(defaultValue = "false")
+    protected Boolean provider;
+    protected AliasesType aliases;
+    protected String alias;
+    protected ConsumesType consumes;
+    protected ProducesType produces;
+    protected Boolean encoded;
+    @XmlElement(required = true)
+    protected MethodsType methods;
+
+    /**
+     * Gets the value of the className property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getClassName() {
+        return className;
+    }
+
+    /**
+     * Sets the value of the className property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setClassName(String value) {
+        this.className = value;
+    }
+
+    /**
+     * Gets the value of the path property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * Sets the value of the path property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setPath(String value) {
+        this.path = value;
+    }
+
+    /**
+     * Gets the value of the provider property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *
+     */
+    public Boolean isProvider() {
+        return provider;
+    }
+
+    /**
+     * Sets the value of the provider property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *
+     */
+    public void setProvider(Boolean value) {
+        this.provider = value;
+    }
+
+    /**
+     * Gets the value of the aliases property.
+     *
+     * @return
+     *     possible object is
+     *     {@link AliasesType }
+     *
+     */
+    public AliasesType getAliases() {
+        return aliases;
+    }
+
+    /**
+     * Sets the value of the aliases property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link AliasesType }
+     *
+     */
+    public void setAliases(AliasesType value) {
+        this.aliases = value;
+    }
+
+    /**
+     * Gets the value of the alias property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getAlias() {
+        return alias;
+    }
+
+    /**
+     * Sets the value of the alias property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setAlias(String value) {
+        this.alias = value;
+    }
+
+    /**
+     * Gets the value of the consumes property.
+     *
+     * @return
+     *     possible object is
+     *     {@link ConsumesType }
+     *
+     */
+    public ConsumesType getConsumes() {
+        return consumes;
+    }
+
+    /**
+     * Sets the value of the consumes property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link ConsumesType }
+     *
+     */
+    public void setConsumes(ConsumesType value) {
+        this.consumes = value;
+    }
+
+    /**
+     * Gets the value of the produces property.
+     *
+     * @return
+     *     possible object is
+     *     {@link ProducesType }
+     *
+     */
+    public ProducesType getProduces() {
+        return produces;
+    }
+
+    /**
+     * Sets the value of the produces property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link ProducesType }
+     *
+     */
+    public void setProduces(ProducesType value) {
+        this.produces = value;
+    }
+
+    /**
+     * Gets the value of the encoded property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *
+     */
+    public Boolean isEncoded() {
+        return encoded;
+    }
+
+    /**
+     * Sets the value of the encoded property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *
+     */
+    public void setEncoded(Boolean value) {
+        this.encoded = value;
+    }
+
+    /**
+     * Gets the value of the methods property.
+     *
+     * @return
+     *     possible object is
+     *     {@link MethodsType }
+     *
+     */
+    public MethodsType getMethods() {
+        return methods;
+    }
+
+    /**
+     * Sets the value of the methods property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link MethodsType }
+     *
+     */
+    public void setMethods(MethodsType value) {
+        this.methods = value;
+    }
+
+}

Added: incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourcesType.java
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourcesType.java?rev=787557&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourcesType.java (added)
+++ incubator/wink/contrib/ibm-jaxrs/src/com/ibm/ws/jaxrs/model/dd/jaxb/ResourcesType.java Tue Jun 23 05:41:49 2009
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.12.05 at 12:47:27 PM CST
+//
+
+package com.ibm.ws.jaxrs.model.dd.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for resourcesType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="resourcesType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="resource" type="{http://www.ibm.com/xml/ns/jaxrs}resourceType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="provider" type="{http://www.ibm.com/xml/ns/jaxrs}providerType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "resourcesType", namespace = "http://www.ibm.com/xml/ns/jaxrs", propOrder = {
+        "resource", "provider" })
+public class ResourcesType {
+
+    protected List<ResourceType> resource;
+    protected List<ProviderType> provider;
+
+    /**
+     * Gets the value of the resource property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the resource property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getResource().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ResourceType }
+     *
+     *
+     */
+    public List<ResourceType> getResource() {
+        if (resource == null) {
+            resource = new ArrayList<ResourceType>();
+        }
+        return this.resource;
+    }
+
+    /**
+     * Gets the value of the provider property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the provider property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getProvider().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ProviderType }
+     *
+     *
+     */
+    public List<ProviderType> getProvider() {
+        if (provider == null) {
+            provider = new ArrayList<ProviderType>();
+        }
+        return this.provider;
+    }
+
+}



Mime
View raw message