Examples of generateSchema()


Examples of com.atlassian.json.schema.JsonSchemaGenerator.generateSchema()

                String ifaceJson = Files.toString(interfacesFile, Charsets.UTF_8);
                interfaceList = gson.fromJson(ifaceJson,InterfaceList.class);
            }

            JsonSchemaGenerator generator = provider.provide(getEnumCase(enumCase),interfaceList,schemaDocs,ignoreFilter);
            JsonSchema schema = generator.generateSchema(getRootClass());
           
            File rawFile = new File(rawOutput);
            File prettyFile = new File(prettyOutput);
           
            Files.createParentDirs(rawFile);
View Full Code Here

Examples of com.azaptree.services.command.http.WebRequestCommand.generateSchema()

      return;
    }
    response.setStatus(HttpStatus.OK_200);
    response.setContentType("application/xml");
    response.setCharacterEncoding("UTF-8");
    command.generateSchema(response.getOutputStream());
  }

  private void generateWADL(final Request baseRequest, final HttpServletResponse response) {
    // TODO: implement HTTP caching
    response.setStatus(HttpStatus.OK_200);
View Full Code Here

Examples of com.caucho.jaxb.skeleton.ClassSkeleton.generateSchema()

  public void generateSchemaParticle(XMLStreamWriter out, Class cl)
    throws XMLStreamException, JAXBException
  {
    ClassSkeleton skeleton = _context.getSkeleton(cl);
    skeleton.generateSchema(out);
  }
}
View Full Code Here

Examples of com.fasterxml.jackson.module.jsonSchema.JsonSchemaGenerator.generateSchema()

        Class<?> returnType = method.getReturnType();
        if (returnType.equals(Void.TYPE)) {
            return null;
        }
        JsonSchemaGenerator generator = new JsonSchemaGenerator(mapper);
        return generator.generateSchema(method.getReturnType());
    }

    private static String getQualifiedName(Method method) {
        return method.getDeclaringClass().getName() + "." + method.getName();
    }
View Full Code Here

Examples of com.sun.tools.internal.xjc.api.J2SJAXBModel.generateSchema()

                J2SJAXBModel model = XJC.createJavaCompiler().bind(decls,Collections.<QName,Reference>emptyMap(),null,env);
                if(model==null)
                    return; // error

                try {
                    model.generateSchema(
                        new SchemaOutputResolver() {
                            public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
                                File file;
                                OutputStream out;
                                if(schemaLocations.containsKey(namespaceUri)) {
View Full Code Here

Examples of com.sun.tools.internal.xjc.api.J2SJAXBModel.generateSchema()

                        J2SJAXBModel model = XJC.createJavaCompiler().bind(
                                classesToBeIncluded,Collections.<QName,Reference>emptyMap(),null,env);

                        SchemaOutputResolver schemaOutputResolver = configReader.getSchemaOutputResolver();

                        model.generateSchema(schemaOutputResolver,errorListener);
                    } catch (IOException e) {
                        errorListener.error(e.getMessage(),e);
                    } catch (SAXException e) {
                        // the error should have already been reported
                    }
View Full Code Here

Examples of com.sun.tools.xjc.api.J2SJAXBModel.generateSchema()

                J2SJAXBModel model = XJC.createJavaCompiler().bind(decls,Collections.<QName,Reference>emptyMap(),null,env);
                if(model==null)
                    return; // error

                try {
                    model.generateSchema(
                        new SchemaOutputResolver() {
                            public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
                                File file;
                                OutputStream out;
                                if(schemaLocations.containsKey(namespaceUri)) {
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

    }

    JAXBContext jaxbContext = JAXBContext.newInstance(javaClasses.toArray(new Class<?>[javaClasses.size()]));

    MemorySchemaOutputResolver schemaOutputResolver = new MemorySchemaOutputResolver();
    jaxbContext.generateSchema(schemaOutputResolver);

    Map<String, StringWriter> writers = schemaOutputResolver.getWriters();
    StringWriter writer = writers.get(namespace);
    if (writer == null) {
      throw new IllegalArgumentException();
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

     */
    public <T> String generateSchema(Class<T> type) {
        try {
            JAXBContext context = this.getJaxbContext(type);
            SchemaResolver resolver = new SchemaResolver();
            context.generateSchema(resolver);
            return resolver.getWriter().toString();
        } catch (IOException e) {
            throw new CedarRuntimeException("Error generating schema: " + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of javax.xml.bind.JAXBContext.generateSchema()

         }
      }
      JAXBContext context = JAXBContext.newInstance(InfinispanConfiguration.class);
      if (!baseDir.exists()) {
         if (baseDir.mkdirs()) {
            context.generateSchema(new InfinispanSchemaOutputResolver(baseDir));
         }
      }
   }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.