Package com.sun.jersey.server.wadl

Examples of com.sun.jersey.server.wadl.ApplicationDescription


                    wadlGenerator = loadWadlGenerator( wadlGeneratorDescription, wadlGenerator );
                }
            }
            wadlGenerator.init();

            final ApplicationDescription ad = this.createApplicationDescription(this._packagesResourceConfig, wadlGenerator);
            final Application a = ad.getApplication();
            for(Resources resources : a.getResources())
                resources.setBase(_baseUri);

            this.writeExternalGrammars(ad);
View Full Code Here


        if (baseUri == null || baseUri.length() == 0) {
            throw new BuildException("baseUri attribute required", getLocation());
        }
       
        try {
            ApplicationDescription ad = createApplication(classpath.list());
           
            WRITE_OUT_WADL : {
                Application a = ad.getApplication();
                for(Resources resources : a.getResources())
                        resources.setBase(baseUri);
                JAXBContext c = JAXBContext.newInstance("com.sun.research.ws.wadl",
                        this.getClass().getClassLoader());
                Marshaller m = c.createMarshaller();
                OutputStream out = new BufferedOutputStream(new FileOutputStream(wadlFile));
                try {
                    m.marshal(a, out);
                }
                finally {
                    out.close();
                }
            }
           
            WRITE_OUT_EXTERNAL_DATA : {
                // TODO work out how to reconsile the different paths
                File wadlChildren = new File(wadlFile.getPath() + "-/");
                wadlChildren.mkdirs();
                for (String key : ad.getExternalMetadataKeys()) {
                   
                    // Create the next file based on the key
                    //
                    File nextFile = new File(wadlChildren, "key");
                    ApplicationDescription.ExternalGrammar em = ad.getExternalGrammar( key );

                    // Write a copy to disk
                    //
                    OutputStream out = new BufferedOutputStream(new FileOutputStream(nextFile));
                    try {
View Full Code Here

TOP

Related Classes of com.sun.jersey.server.wadl.ApplicationDescription

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.