Package com.sun.research.ws.wadl

Examples of com.sun.research.ws.wadl.Grammars



        // Add a reference to this grammar
        //

        Grammars grammars;
        if (application.getGrammars() != null) {
            LOG.info("The wadl application already contains a grammars element,"
                    + " we're adding elements of the provided grammars file.");
            grammars = application.getGrammars();
        } else {
            grammars = new Grammars();
            application.setGrammars(grammars);
        }

        // Create a reference back to the root WADL
        //

        for (String path : applicationDescription.getExternalMetadataKeys()) {
            ApplicationDescription.ExternalGrammar eg =
                    applicationDescription.getExternalGrammar(path);
           
            if (!eg.isIncludedInGrammar()) {
                continue;
            }
           
            URI schemaURI =
                    extendedPath.clone().path(path).build();

            String schemaURIS = schemaURI.toString();
            String requestURIs = requestURI.toString();

            String schemaPath = rootURI != null
                    ? requestURI.relativize(schemaURI).toString()
                    : schemaURI.toString();

            Include include = new Include();
            include.setHref(schemaPath);
            Doc doc = new Doc();
            doc.setLang("en");
            doc.setTitle("Generated");
            include.getDoc().add(doc);

            // Finally add to list
            grammars.getInclude().add(include);
        }
    }
View Full Code Here



            // Add a reference to this grammar
            //

            Grammars grammars;
            if (application.getGrammars() != null) {
                LOGGER.info(LocalizationMessages.ERROR_WADL_GRAMMAR_ALREADY_CONTAINS());
                grammars = application.getGrammars();
            } else {
                grammars = new Grammars();
                application.setGrammars(grammars);
            }

            // Create a reference back to the root WADL
            //

            for (String path : applicationDescription.getExternalMetadataKeys()) {
                URI schemaURI =
                        extendedPath.clone().path(path).build();

                String schemaPath = rootURI != null ?
                        requestURI.relativize(schemaURI).toString()
                        : schemaURI.toString();

                Include include = new Include();
                include.setHref(schemaPath);
                Doc doc = new Doc();
                doc.setLang("en");
                doc.setTitle("Generated");
                include.getDoc().add(doc);

                // Finally add to list
                grammars.getInclude().add(include);
            }
        } catch (Exception e) {
            throw new ProcessingException(LocalizationMessages.ERROR_WADL_EXTERNAL_GRAMMAR(), e);
        }
    }
View Full Code Here


            // Add a reference to this grammar
            //

            final Grammars grammars;
            if (application.getGrammars() != null) {
                LOGGER.info(LocalizationMessages.ERROR_WADL_GRAMMAR_ALREADY_CONTAINS());
                grammars = application.getGrammars();
            } else {
                grammars = new Grammars();
                application.setGrammars(grammars);
            }

            // Create a reference back to the root WADL
            //

            for (final String path : applicationDescription.getExternalMetadataKeys()) {
                final URI schemaURI = extendedPath.clone().path(path).build();
                final String schemaPath = rootURI != null ? requestURI.relativize(schemaURI).toString() : schemaURI.toString();

                final Include include = new Include();
                include.setHref(schemaPath);
                final Doc doc = new Doc();
                doc.setLang("en");
                doc.setTitle("Generated");
                include.getDoc().add(doc);

                // Finally add to list
                grammars.getInclude().add(include);
            }
        } catch (final Exception e) {
            throw new ProcessingException(LocalizationMessages.ERROR_WADL_EXTERNAL_GRAMMAR(), e);
        }
    }
View Full Code Here


        // Add a reference to this grammar
        //

        Grammars grammars;
        if ( application.getGrammars() != null ) {
            LOG.info( "The wadl application already contains a grammars element," +
                      " we're adding elements of the provided grammars file." );
            grammars = application.getGrammars();
        } else {
            grammars = new Grammars();
            application.setGrammars( grammars );
        }

        // Create a reference back to the root WADL
        //

        for (String path : applicationDescription.getExternalMetadataKeys())
        {
            URI schemaURI =
                extendedPath.clone().path( path ).build();

            String schemaURIS = schemaURI.toString();
            String requestURIs = requestURI.toString();

            String schemaPath = rootURI!=null ?
                    requestURI.relativize(schemaURI).toString()
                    : schemaURI.toString();

            Include include = new Include();
            include.setHref( schemaPath );
            Doc doc = new Doc();
            doc.setLang( "en" );
            doc.setTitle( "Generated" );
            include.getDoc().add( doc );

            // Finally add to list
            grammars.getInclude().add(include);
        }
    }
View Full Code Here


            // Add a reference to this grammar
            //

            Grammars grammars;
            if (application.getGrammars() != null) {
                LOGGER.info(LocalizationMessages.ERROR_WADL_GRAMMAR_ALREADY_CONTAINS());
                grammars = application.getGrammars();
            } else {
                grammars = new Grammars();
                application.setGrammars(grammars);
            }

            // Create a reference back to the root WADL
            //

            for (String path : applicationDescription.getExternalMetadataKeys()) {
                URI schemaURI =
                        extendedPath.clone().path(path).build();

                String schemaPath = rootURI != null ?
                        requestURI.relativize(schemaURI).toString()
                        : schemaURI.toString();

                Include include = new Include();
                include.setHref(schemaPath);
                Doc doc = new Doc();
                doc.setLang("en");
                doc.setTitle("Generated");
                include.getDoc().add(doc);

                // Finally add to list
                grammars.getInclude().add(include);
            }
        } catch (Exception e) {
            throw new ProcessingException(LocalizationMessages.ERROR_WADL_EXTERNAL_GRAMMAR(), e);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.research.ws.wadl.Grammars

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.