JAXBUtils.getParamClass(compiler, "setErrorListener")); compiler.setErrorListener(elForRun); compiler.parseSchema(new InputSource(schemaUrl)); S2JJAXBModel intermediateModel = compiler.bind(); listener.throwException();
private void addSchemas(List<SchemaInfo> schemas, SchemaCompiler compiler) { compiler.parseSchema(schemaPackageFiles.get(i)); is.setSystemId(key); is.setPublicId(key); compiler.getOptions().addGrammar(is); compiler.parseSchema(key, schema.getElement());
is.setPublicId(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, ele); InputSource is = new InputSource(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, reader); reader.close(); } catch (RuntimeException ex) { is.setPublicId(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, StaxUtils.createXMLStreamReader(ele, key)); is.setPublicId(el.getKey()); opts.addGrammar(is); schemaCompiler.parseSchema(el.getKey(), StaxUtils.createXMLStreamReader(el.getValue(), el.getKey()));
is.setPublicId(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, ele); InputSource is = new InputSource(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, reader); reader.close(); } catch (RuntimeException ex) { is.setPublicId(key); opts.addGrammar(is); schemaCompiler.parseSchema(key, StaxUtils.createXMLStreamReader(ele, key)); is.setPublicId(el.getKey()); opts.addGrammar(is); schemaCompiler.parseSchema(el.getKey(), StaxUtils.createXMLStreamReader(el.getValue(), el.getKey()));
JAXBUtils.getParamClass(compiler, "setErrorListener")); compiler.setErrorListener(elForRun); addSchemas(compiler.getOptions(), compiler, svc.getServiceInfos(), schemas); addBindingFiles(bindingFiles, compiler); S2JJAXBModel intermediateModel = compiler.bind();
JAXBUtils.getParamClass(compiler, "setErrorListener")); compiler.setErrorListener(elForRun); addSchemas(compiler.getOptions(), compiler, svc.getServiceInfos(), schemas); addBindingFiles(bindingFiles, compiler); S2JJAXBModel intermediateModel = compiler.bind();
JAXBUtils.getParamClass(compiler, "setErrorListener")); compiler.setErrorListener(elForRun); compiler.parseSchema(new InputSource(schemaUrl)); S2JJAXBModel intermediateModel = compiler.bind(); listener.throwException();
private JCodeModel createCodeModel(List<SchemaInfo> schemaElements, Set<String> type) { SchemaCompiler compiler = createCompiler(type); Object elForRun = ReflectionInvokationHandler .createProxyWrapper(new InnerErrorListener(), JAXBUtils.getParamClass(compiler, "setErrorListener")); compiler.setErrorListener(elForRun); compiler.setEntityResolver(OASISCatalogManager.getCatalogManager(bus) .getEntityResolver()); if (!compilerArgs.isEmpty()) { compiler.getOptions().addGrammar(new InputSource("null")); compiler.getOptions().parseArguments(compilerArgs.toArray(new String[0])); } addSchemas(schemaElements, compiler); for (InputSource is : bindingFiles) { compiler.getOptions().addBindFile(is); } S2JJAXBModel intermediateModel = compiler.bind(); JCodeModel codeModel = intermediateModel.generateCode(null, elForRun); JAXBUtils.logGeneratedClassNames(LOG, codeModel); return codeModel; }
private void addBindingFiles(List<String> bindingFiles, SchemaCompiler compiler) { if (bindingFiles != null) { for (String s : bindingFiles) { URL url = composeUrl(s); try { InputStream ins = url.openStream(); InputSource is = new InputSource(ins); is.setSystemId(url.toString()); is.setPublicId(url.toString()); compiler.getOptions().addBindFile(is); } catch (IOException e) { throw new RuntimeException(e); } } } }
private void addBindingFiles(List<String> bindingFiles, SchemaCompiler compiler) { if (bindingFiles != null) { for (String s : bindingFiles) { URL url = composeUrl(s); try { InputStream ins = url.openStream(); InputSource is = new InputSource(ins); is.setSystemId(url.toString()); is.setPublicId(url.toString()); compiler.getOptions().addBindFile(is); } catch (IOException e) { throw new RuntimeException(e); } } } }
public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }
public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<String>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<String>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }
public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
protected SchemaCompiler createSchemaCompiler() { SchemaCompiler compiler = JAXBUtils.createSchemaCompilerWithDefaultAllocator(new HashSet<>()); if (schemaCompilerOptions != null && schemaCompilerOptions.length > 0) { compiler.getOptions().parseArguments(schemaCompilerOptions); } return compiler; }